diff options
author | joeycastillo <joeycastillo@utexas.edu> | 2021-08-30 14:42:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 14:42:11 -0400 |
commit | eb3d9b26cbda2d2612f11eb39843b221224f1fa7 (patch) | |
tree | 7a514b4d21dd0d2a324a5e1313a144f26bf20799 /tinyusb/hw/bsp/nutiny_nuc121s/board.mk | |
parent | ee9cc322d301631c9ff0751d9bed717c6492b6a5 (diff) | |
parent | b0845cc3f1a8234a30c980eccf10e44765e4e105 (diff) | |
download | Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.tar.gz Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.tar.bz2 Sensor-Watch-eb3d9b26cbda2d2612f11eb39843b221224f1fa7.zip |
Merge pull request #9 from joeycastillo/usb-refactor
USB refactor / Makefile simplification
Diffstat (limited to 'tinyusb/hw/bsp/nutiny_nuc121s/board.mk')
-rwxr-xr-x | tinyusb/hw/bsp/nutiny_nuc121s/board.mk | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/nutiny_nuc121s/board.mk b/tinyusb/hw/bsp/nutiny_nuc121s/board.mk new file mode 100755 index 00000000..a0a208ca --- /dev/null +++ b/tinyusb/hw/bsp/nutiny_nuc121s/board.mk @@ -0,0 +1,55 @@ +DEPS_SUBMODULES += hw/mcu/nuvoton + +CFLAGS += \ + -flto \ + -mthumb \ + -mabi=aapcs-linux \ + -mcpu=cortex-m0 \ + -D__ARM_FEATURE_DSP=0 \ + -DUSE_ASSERT=0 \ + -DCFG_EXAMPLE_MSC_READONLY \ + -DCFG_TUSB_MCU=OPT_MCU_NUC121 + +# All source paths should be relative to the top level. +LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld + +SRC_C += \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ + hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/adc.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/bpwm.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/fmc.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/i2c.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/pdma.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/pwm.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/spi_i2s.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/sys.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/timer.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/usbd.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_i2c.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_spi.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_uart.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/wdt.c \ + hw/mcu/nuvoton/nuc121_125/StdDriver/src/wwdt.c + +SRC_S += \ + hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/GCC/startup_NUC121.S + +INC += \ + $(TOP)/hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Include \ + $(TOP)/hw/mcu/nuvoton/nuc121_125/StdDriver/inc \ + $(TOP)/hw/mcu/nuvoton/nuc121_125/CMSIS/Include + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM0 + +# For flash-jlink target +JLINK_DEVICE = NUC121SC2AE + +# 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" |