| 
									
										
										
										
											2019-03-20 01:35:52 +07:00
										 |  |  | CFLAGS += \
 | 
					
						
							| 
									
										
										
										
											2018-11-24 10:55:51 -08:00
										 |  |  | 	-DCFG_TUSB_MCU=OPT_MCU_SAMD21 \
 | 
					
						
							|  |  |  | 	-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
 | 
					
						
							|  |  |  | 	-D__SAMD21G18A__ \
 | 
					
						
							|  |  |  | 	-mthumb \
 | 
					
						
							|  |  |  | 	-mabi=aapcs-linux \
 | 
					
						
							|  |  |  | 	-mcpu=cortex-m0plus \
 | 
					
						
							|  |  |  | 	-msoft-float \
 | 
					
						
							| 
									
										
										
										
											2019-03-20 01:23:49 +07:00
										 |  |  | 	-mfloat-abi=soft \
 | 
					
						
							| 
									
										
										
										
											2019-03-22 22:06:48 +07:00
										 |  |  | 	-nostdlib -nostartfiles | 
					
						
							| 
									
										
										
										
											2018-11-24 10:55:51 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # All source paths should be relative to the top level.
 | 
					
						
							|  |  |  | LD_FILE = hw/bsp/metro_m0_express/samd21g18a_flash.ld | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LD_FLAGS += -mthumb -mcpu=cortex-m0plus | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | SRC_C += \
 | 
					
						
							|  |  |  | 	hw/mcu/microchip/samd/asf4/samd21/gcc/gcc/startup_samd21.c \
 | 
					
						
							|  |  |  | 	hw/mcu/microchip/samd/asf4/samd21/gcc/system_samd21.c \
 | 
					
						
							|  |  |  | 	hw/mcu/microchip/samd/asf4/samd21/hpl/gclk/hpl_gclk.c \
 | 
					
						
							|  |  |  | 	hw/mcu/microchip/samd/asf4/samd21/hpl/pm/hpl_pm.c \
 | 
					
						
							| 
									
										
										
										
											2019-04-01 18:31:20 +07:00
										 |  |  | 	hw/mcu/microchip/samd/asf4/samd21/hpl/sysctrl/hpl_sysctrl.c \
 | 
					
						
							|  |  |  | 	hw/mcu/microchip/samd/asf4/samd21/hal/src/hal_atomic.c | 
					
						
							| 
									
										
										
										
											2018-11-24 10:55:51 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | INC += \
 | 
					
						
							| 
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/ \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/config \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/include \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/hal/include \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/hal/utils/include \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd51/hpl/pm/ \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/hpl/port \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/hri \
 | 
					
						
							|  |  |  | 	$(TOP)/hw/mcu/microchip/samd/asf4/samd21/CMSIS/Include | 
					
						
							| 
									
										
										
										
											2018-11-24 10:55:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 |  |  | # For TinyUSB port source 
 | 
					
						
							| 
									
										
										
										
											2018-11-24 10:55:51 -08:00
										 |  |  | VENDOR = microchip | 
					
						
							|  |  |  | CHIP_FAMILY = samd21 | 
					
						
							| 
									
										
										
										
											2019-03-17 15:42:57 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 |  |  | # For freeRTOS port source
 | 
					
						
							|  |  |  | FREERTOS_PORT = ARM_CM0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # For flash-jlink target
 | 
					
						
							| 
									
										
										
										
											2019-03-17 15:42:57 +07:00
										 |  |  | JLINK_DEVICE = ATSAMD21G18 | 
					
						
							| 
									
										
										
										
											2019-05-01 14:27:17 +07:00
										 |  |  | JLINK_IF = swd | 
					
						
							| 
									
										
										
										
											2019-03-17 15:42:57 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | # flash using jlink
 | 
					
						
							|  |  |  | flash: flash-jlink |