move fomu to its own family, update ci with build risv

This commit is contained in:
hathach
2021-03-02 12:24:12 +07:00
parent 71313d934d
commit b066fdc2c6
5 changed files with 153 additions and 51 deletions
+32
View File
@@ -0,0 +1,32 @@
CFLAGS += \
-flto \
-march=rv32i \
-mabi=ilp32 \
-nostdlib \
-DCFG_TUSB_MCU=OPT_MCU_VALENTYUSB_EPTRI
# Cross Compiler for RISC-V
CROSS_COMPILE = riscv-none-embed-
# All source paths should be relative to the top level.
LD_FILE = $(FAMILY_PATH)/fomu.ld
SRC_S += $(FAMILY_PATH)/crt0-vexriscv.S
INC += \
$(TOP)/$(FAMILY_PATH)/include
# For TinyUSB port source
VENDOR = valentyusb
CHIP_FAMILY = eptri
# For freeRTOS port source
FREERTOS_PORT = RISC-V
# flash using dfu-util
$(BUILD)/$(PROJECT).dfu: $(BUILD)/$(PROJECT).bin
@echo "Create $@"
python $(TOP)/hw/bsp/$(BOARD)/dfu.py -b $^ -D 0x1209:0x5bf0 $@
flash: $(BUILD)/$(PROJECT).dfu
dfu-util -D $^