2021-03-18 16:28:44 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								DEPS_SUBMODULES += hw/mcu/nuvoton
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-04 22:50:45 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:10:32 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CFLAGS += \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -flto \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mthumb \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mabi=aapcs-linux \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mcpu=cortex-m0 \
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:32:31 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -DCFG_EXAMPLE_MSC_READONLY \
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-09 23:02:18 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -DCFG_EXAMPLE_VIDEO_READONLY \
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:10:32 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -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 += \
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-17 16:52:07 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  src/portable/nuvoton/nuc120/dcd_nuc120.c \
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:10:32 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/system_NUC100Series.c \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/StdDriver/src/clk.c \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/StdDriver/src/gpio.c \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/StdDriver/src/sys.c \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/StdDriver/src/timer.c \
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-17 17:32:03 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:10:32 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								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
							 | 
						
					
						
							
								
									
										
										
										
											2021-01-26 12:46:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								flash: $(BUILD)/$(PROJECT).elf
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 13:10:32 -06:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									openocd -f interface/nulink.cfg -f target/numicroM0.cfg -c "program $< reset exit"
							 |