| 
									
										
										
										
											2020-01-04 10:31:55 -06:00
										 |  |  | CFLAGS += \
 | 
					
						
							|  |  |  |   -flto \
 | 
					
						
							|  |  |  |   -mthumb \
 | 
					
						
							|  |  |  |   -mabi=aapcs-linux \
 | 
					
						
							|  |  |  |   -mcpu=cortex-m0 \
 | 
					
						
							|  |  |  |   -D__ARM_FEATURE_DSP=0 \
 | 
					
						
							|  |  |  |   -DUSE_ASSERT=0 \
 | 
					
						
							| 
									
										
										
										
											2020-01-07 16:57:18 +07:00
										 |  |  |   -DCFG_EXAMPLE_MSC_READONLY \
 | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06:00
										 |  |  |   -DCFG_TUSB_MCU=OPT_MCU_NUC121 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-29 14:06:44 +07:00
										 |  |  | # mcu driver cause following warnings
 | 
					
						
							|  |  |  | CFLAGS += -Wno-error=redundant-decls | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-23 12:43:13 +07:00
										 |  |  | LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06:00
										 |  |  | # All source paths should be relative to the top level.
 | 
					
						
							| 
									
										
										
										
											2020-03-07 17:49:30 +07:00
										 |  |  | LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | SRC_C += \
 | 
					
						
							| 
									
										
										
										
											2021-03-17 21:36:52 +07:00
										 |  |  |   src/portable/nuvoton/nuc121/dcd_nuc121.c \
 | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06: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/fmc.c \
 | 
					
						
							|  |  |  |   hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c \
 | 
					
						
							|  |  |  |   hw/mcu/nuvoton/nuc121_125/StdDriver/src/sys.c \
 | 
					
						
							|  |  |  |   hw/mcu/nuvoton/nuc121_125/StdDriver/src/timer.c \
 | 
					
						
							| 
									
										
										
										
											2021-10-17 17:32:03 +07:00
										 |  |  |   hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06: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
 | 
					
						
							| 
									
										
										
										
											2023-03-16 23:11:11 +07:00
										 |  |  | FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0 | 
					
						
							| 
									
										
										
										
											2020-01-04 10:31:55 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | # For flash-jlink target
 | 
					
						
							|  |  |  | JLINK_DEVICE = NUC121SC2AE | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-14 18:13:42 +07:00
										 |  |  | # Flash using Nuvoton's openocd fork at https://github.com/OpenNuvoton/OpenOCD-Nuvoton
 | 
					
						
							|  |  |  | # Please compile and install it from github source
 | 
					
						
							| 
									
										
										
										
											2021-01-26 12:46:24 +07:00
										 |  |  | flash: $(BUILD)/$(PROJECT).elf | 
					
						
							| 
									
										
										
										
											2020-01-14 18:19:33 +07:00
										 |  |  | 	openocd -f interface/nulink.cfg -f target/numicroM0.cfg -c "program $< reset exit" |