2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CFLAGS += \
							 | 
						
					
						
							
								
									
										
										
										
											2019-11-20 16:06:40 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -flto \
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-14 13:31:12 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -mthumb \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mabi=aapcs \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mcpu=cortex-m4 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mfloat-abi=hard \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -mfpu=fpv4-sp-d16 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -DNRF52840_XXAA \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -DCONFIG_GPIO_AS_PINRESET \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -DCFG_TUSB_MCU=OPT_MCU_NRF5X
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-20 01:35:52 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# nrfx issue undef _ARMCC_VERSION usage https://github.com/NordicSemiconductor/nrfx/issues/49
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-27 00:15:43 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CFLAGS += -Wno-error=undef -Wno-error=unused-parameter
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# due to tusb_hal_nrf_power_event
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-01 15:43:28 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifeq ($(shell expr $(GCCVERSION) \>= 8), 1)
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-27 00:15:43 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CFLAGS += -Wno-error=cast-function-type
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-01 15:43:28 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-20 01:35:52 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# All source paths should be relative to the top level.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								SRC_C += \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-18 18:30:09 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c \
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-08 13:25:14 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									hw/mcu/nordic/nrfx/mdk/system_nrf52840.c
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								INC += \
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 08:51:11 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(TOP)/lib/CMSIS_4/CMSIS/Include \
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic/nrfx \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic/nrfx/mdk \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic/nrfx/hal \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic/nrfx/drivers/include \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/nordic/nrfx/drivers/src \
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_nrf52840.S
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ASFLAGS += -D__HEAP_SIZE=0
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# For TinyUSB port source
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-02 22:35:42 +07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								VENDOR = nordic
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CHIP_FAMILY = nrf5x
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# For freeRTOS port source
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								FREERTOS_PORT = ARM_CM4F
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# For flash-jlink target
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-20 01:23:49 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								JLINK_DEVICE = nRF52840_xxAA
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								JLINK_IF = swd
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-20 01:23:49 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# flash using jlink
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								flash: flash-jlink
							 |