diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
commit | 39a5c822a2a2e798e2e39ff8a98b7af84253026c (patch) | |
tree | fa157c98d3aea0d4f996e4415aa2a7ad1093ac05 /tinyusb/hw/bsp/fomu/family.mk | |
parent | c9e00b83bbdcb05058806d915ec4fff3cf4e596f (diff) | |
download | Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.gz Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.bz2 Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.zip |
add tinyusb
Diffstat (limited to 'tinyusb/hw/bsp/fomu/family.mk')
-rwxr-xr-x | tinyusb/hw/bsp/fomu/family.mk | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/fomu/family.mk b/tinyusb/hw/bsp/fomu/family.mk new file mode 100755 index 00000000..165535c6 --- /dev/null +++ b/tinyusb/hw/bsp/fomu/family.mk @@ -0,0 +1,30 @@ +CFLAGS += \ + -flto \ + -march=rv32i \ + -mabi=ilp32 \ + -nostdlib \ + -DCFG_TUSB_MCU=OPT_MCU_VALENTYUSB_EPTRI + +# Toolchain from https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack +CROSS_COMPILE = riscv-none-embed- + +# All source paths should be relative to the top level. +LD_FILE = $(FAMILY_PATH)/fomu.ld + +SRC_C += src/portable/valentyusb/eptri/dcd_eptri.c + +SRC_S += $(FAMILY_PATH)/crt0-vexriscv.S + +INC += \ + $(TOP)/$(FAMILY_PATH)/include + +# 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 $^ |