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/nutiny_nuc126v/board.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/nutiny_nuc126v/board.mk')
-rwxr-xr-x | tinyusb/hw/bsp/nutiny_nuc126v/board.mk | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/nutiny_nuc126v/board.mk b/tinyusb/hw/bsp/nutiny_nuc126v/board.mk new file mode 100755 index 00000000..848b19f9 --- /dev/null +++ b/tinyusb/hw/bsp/nutiny_nuc126v/board.mk @@ -0,0 +1,59 @@ +DEPS_SUBMODULES += hw/mcu/nuvoton + +CFLAGS += \ + -flto \ + -mthumb \ + -mabi=aapcs-linux \ + -mcpu=cortex-m0 \ + -D__ARM_FEATURE_DSP=0 \ + -DUSE_ASSERT=0 \ + -D__CORTEX_SC=0 \ + -DCFG_TUSB_MCU=OPT_MCU_NUC126 + +# All source paths should be relative to the top level. +LD_FILE = hw/bsp/$(BOARD)/nuc126_flash.ld + +SRC_C += \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ + hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/system_NUC126.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/acmp.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/adc.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/clk.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/crc.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/ebi.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/fmc.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/gpio.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/pdma.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/pwm.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/rtc.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/sc.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/scuart.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/spi.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/sys.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/timer.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/timer_pwm.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/uart.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/usbd.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/usci_spi.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/usci_uart.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/wdt.c \ + hw/mcu/nuvoton/nuc126/StdDriver/src/wwdt.c + +SRC_S += \ + hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/GCC/startup_NUC126.S + +INC += \ + $(TOP)/hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Include \ + $(TOP)/hw/mcu/nuvoton/nuc126/StdDriver/inc \ + $(TOP)/hw/mcu/nuvoton/nuc126/CMSIS/Include + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM0 + +# For flash-jlink target +JLINK_DEVICE = NUC126VG4AE + +# 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" |