| 
									
										
										
										
											2021-04-29 00:22:28 +07:00
										 |  |  | SDK_DIR = hw/mcu/nxp/nxp_sdk | 
					
						
							|  |  |  | DEPS_SUBMODULES += $(SDK_DIR) | 
					
						
							| 
									
										
										
										
											2021-03-04 22:50:45 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-27 00:49:25 +09:00
										 |  |  | CFLAGS += \
 | 
					
						
							|  |  |  |   -mthumb \
 | 
					
						
							|  |  |  |   -mabi=aapcs \
 | 
					
						
							|  |  |  |   -mcpu=cortex-m0plus \
 | 
					
						
							|  |  |  |   -DCPU_MKL25Z128VLK4 \
 | 
					
						
							|  |  |  |   -DCFG_TUSB_MCU=OPT_MCU_MKL25ZXX | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # mcu driver cause following warnings
 | 
					
						
							|  |  |  | CFLAGS += -Wno-error=unused-parameter | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-29 00:22:28 +07:00
										 |  |  | MCU_DIR = $(SDK_DIR)/devices/MKL25Z4 | 
					
						
							| 
									
										
										
										
											2020-11-27 00:49:25 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | # All source paths should be relative to the top level.
 | 
					
						
							|  |  |  | LD_FILE = $(MCU_DIR)/gcc/MKL25Z128xxx4_flash.ld | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SRC_C += \
 | 
					
						
							| 
									
										
										
										
											2021-03-17 16:52:07 +07:00
										 |  |  | 	src/portable/nxp/khci/dcd_khci.c \
 | 
					
						
							| 
									
										
										
										
											2020-11-27 00:49:25 +09:00
										 |  |  | 	$(MCU_DIR)/system_MKL25Z4.c \
 | 
					
						
							|  |  |  | 	$(MCU_DIR)/project_template/clock_config.c \
 | 
					
						
							|  |  |  | 	$(MCU_DIR)/drivers/fsl_clock.c \
 | 
					
						
							|  |  |  | 	$(MCU_DIR)/drivers/fsl_gpio.c \
 | 
					
						
							|  |  |  | 	$(MCU_DIR)/drivers/fsl_lpsci.c | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | INC += \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/bsp/$(BOARD) \
 | 
					
						
							| 
									
										
										
										
											2021-04-29 00:33:03 +07:00
										 |  |  | 	$(TOP)/$(SDK_DIR)/CMSIS/Include \
 | 
					
						
							| 
									
										
										
										
											2020-11-27 00:49:25 +09:00
										 |  |  | 	$(TOP)/$(MCU_DIR) \
 | 
					
						
							|  |  |  | 	$(TOP)/$(MCU_DIR)/drivers \
 | 
					
						
							|  |  |  | 	$(TOP)/$(MCU_DIR)/project_template \
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SRC_S += $(MCU_DIR)/gcc/startup_MKL25Z4.S | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # For freeRTOS port source
 | 
					
						
							|  |  |  | FREERTOS_PORT = ARM_CM0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # For flash-jlink target
 | 
					
						
							|  |  |  | JLINK_DEVICE = MKL25Z128xxx4 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # For flash-pyocd target
 | 
					
						
							|  |  |  | PYOCD_TARGET = mkl25zl128 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # flash using pyocd
 | 
					
						
							|  |  |  | flash: flash-pyocd |