esp32-s2_dfu/hw/bsp/nutiny_nuc125s/board.mk

43 lines
1.2 KiB
Makefile
Raw Normal View History

2021-03-18 10:28:44 +01:00
DEPS_SUBMODULES += hw/mcu/nuvoton
2020-01-04 17:31:55 +01:00
CFLAGS += \
-flto \
-mthumb \
-mabi=aapcs-linux \
-mcpu=cortex-m0 \
-D__ARM_FEATURE_DSP=0 \
-DUSE_ASSERT=0 \
-DCFG_EXAMPLE_MSC_READONLY \
2020-01-04 17:31:55 +01:00
-DCFG_TUSB_MCU=OPT_MCU_NUC121
2022-06-29 09:06:44 +02:00
# mcu driver cause following warnings
CFLAGS += -Wno-error=redundant-decls
2020-01-04 17:31:55 +01:00
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/nuc125_flash.ld
2020-01-04 17:31:55 +01:00
SRC_C += \
src/portable/nuvoton/nuc121/dcd_nuc121.c \
2020-01-04 17:31:55 +01:00
hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c
2020-01-04 17:31:55 +01:00
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 = NUC125SC2AE
# 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
2020-01-14 12:19:33 +01:00
openocd -f interface/nulink.cfg -f target/numicroM0.cfg -c "program $< reset exit"