2021-03-02 11:50:57 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CROSS_COMPILE = msp430-elf-
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-18 16:28:44 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								DEPS_SUBMODULES += hw/mcu/ti
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-02 11:50:57 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								SKIP_NANOLIB = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-14 18:01:52 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CFLAGS += \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  -D__MSP430F5529__ \
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-23 17:48:18 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-24 02:41:11 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									-DCFG_EXAMPLE_MSC_READONLY \
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-27 12:41:46 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									-DCFG_TUD_ENDPOINT0_SIZE=8
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-14 18:01:52 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# All source paths should be relative to the top level.
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-29 11:43:26 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								LD_FILE = hw/mcu/ti/msp430/msp430-gcc-support-files/include/msp430f5529.ld
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								LDINC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 00:40:25 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								LDFLAGS += $(addprefix -L,$(LDINC))
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-14 18:01:52 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-17 16:52:07 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								SRC_C += src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-02 11:08:44 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								INC += \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(TOP)/$(BOARD_PATH)
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-14 18:01:52 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-22 19:11:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# export for libmsp430.so to same installation
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 00:40:25 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ifneq ($(OS),Windows_NT)
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-22 19:11:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher))
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 00:40:25 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-22 19:11:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# flash target using TI MSP430-Flasher
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# http://www.ti.com/tool/MSP430-FLASHER
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Please add its installation dir to PATH
							 | 
						
					
						
							
								
									
										
										
										
											2021-01-26 12:46:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								flash: $(BUILD)/$(PROJECT).hex
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-22 19:11:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									MSP430Flasher -w $< -z [VCC]
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 00:40:25 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# flash target using mspdebug.
							 | 
						
					
						
							
								
									
										
										
										
											2021-01-26 12:46:24 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								flash-mspdebug: $(BUILD)/$(PROJECT).elf
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-24 00:40:25 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(MSPDEBUG) tilib "prog $<" --allow-fw-update
							 |