2019-10-11 18:00:36 +02:00
|
|
|
CFLAGS += \
|
2019-11-20 10:06:40 +01:00
|
|
|
-flto \
|
2019-10-11 18:00:36 +02:00
|
|
|
-march=rv32i \
|
|
|
|
-mabi=ilp32 \
|
|
|
|
-nostdlib \
|
2019-11-13 06:11:46 +01:00
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_VALENTYUSB_EPTRI
|
2019-10-11 18:00:36 +02:00
|
|
|
|
2021-08-15 12:19:25 +02:00
|
|
|
# Toolchain from https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack
|
2020-03-25 08:06:51 +01:00
|
|
|
CROSS_COMPILE = riscv-none-embed-
|
|
|
|
|
2019-10-11 18:00:36 +02:00
|
|
|
# All source paths should be relative to the top level.
|
2021-03-02 06:24:12 +01:00
|
|
|
LD_FILE = $(FAMILY_PATH)/fomu.ld
|
2019-10-11 18:00:36 +02:00
|
|
|
|
2021-03-17 10:52:07 +01:00
|
|
|
SRC_C += src/portable/valentyusb/eptri/dcd_eptri.c
|
|
|
|
|
2021-03-02 06:24:12 +01:00
|
|
|
SRC_S += $(FAMILY_PATH)/crt0-vexriscv.S
|
2019-10-11 18:00:36 +02:00
|
|
|
|
|
|
|
INC += \
|
2021-03-02 06:24:12 +01:00
|
|
|
$(TOP)/$(FAMILY_PATH)/include
|
2019-10-11 18:00:36 +02:00
|
|
|
|
2020-03-10 18:09:37 +01:00
|
|
|
# For freeRTOS port source
|
2023-03-16 17:11:11 +01:00
|
|
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/RISC-V
|
2020-03-10 18:09:37 +01:00
|
|
|
|
2019-10-11 18:00:36 +02:00
|
|
|
# flash using dfu-util
|
2021-01-26 06:46:24 +01:00
|
|
|
$(BUILD)/$(PROJECT).dfu: $(BUILD)/$(PROJECT).bin
|
2020-04-16 17:11:00 +02:00
|
|
|
@echo "Create $@"
|
|
|
|
python $(TOP)/hw/bsp/$(BOARD)/dfu.py -b $^ -D 0x1209:0x5bf0 $@
|
2023-03-16 17:11:11 +01:00
|
|
|
|
2021-01-26 06:46:24 +01:00
|
|
|
flash: $(BUILD)/$(PROJECT).dfu
|
2019-10-11 18:00:36 +02:00
|
|
|
dfu-util -D $^
|