From 39a5c822a2a2e798e2e39ff8a98b7af84253026c Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sat, 28 Aug 2021 12:50:18 -0400 Subject: add tinyusb --- tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk (limited to 'tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk') diff --git a/tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk b/tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk new file mode 100755 index 00000000..90b3e91f --- /dev/null +++ b/tinyusb/hw/bsp/nutiny_sdk_nuc120/board.mk @@ -0,0 +1,55 @@ +DEPS_SUBMODULES += hw/mcu/nuvoton + +CFLAGS += \ + -flto \ + -mthumb \ + -mabi=aapcs-linux \ + -mcpu=cortex-m0 \ + -DCFG_EXAMPLE_MSC_READONLY \ + -DCFG_TUSB_MCU=OPT_MCU_NUC120 + +# All source paths should be relative to the top level. +LD_FILE = hw/bsp/nutiny_sdk_nuc120/nuc120_flash.ld + +SRC_C += \ + src/portable/nuvoton/nuc120/dcd_nuc120.c \ + hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/system_NUC100Series.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/acmp.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/adc.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/clk.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/crc.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/fmc.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/gpio.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2c.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2s.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/pdma.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/ps2.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/pwm.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/rtc.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/sc.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/spi.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/sys.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/timer.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/usbd.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/wdt.c \ + hw/mcu/nuvoton/nuc100_120/StdDriver/src/wwdt.c + +SRC_S += \ + hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/GCC/startup_NUC100Series.S + +INC += \ + $(TOP)/hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Include \ + $(TOP)/hw/mcu/nuvoton/nuc100_120/StdDriver/inc \ + $(TOP)/hw/mcu/nuvoton/nuc100_120/CMSIS/Include + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM0 + +# For flash-jlink target +JLINK_DEVICE = NUC120LE3 + +# Flash using Nuvoton's openocd fork at https://github.com/OpenNuvoton/OpenOCD-Nuvoton +# Please compile and install it from github source +flash: $(BUILD)/$(PROJECT).elf + openocd -f interface/nulink.cfg -f target/numicroM0.cfg -c "program $< reset exit" -- cgit v1.2.3