2019-09-15 00:01:52 +02:00
|
|
|
CFLAGS += \
|
|
|
|
-D__MSP430F5529__ \
|
2019-09-23 23:48:18 +02:00
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \
|
2019-09-24 08:41:11 +02:00
|
|
|
-DCFG_EXAMPLE_MSC_READONLY \
|
2019-09-27 18:41:46 +02:00
|
|
|
-DCFG_TUD_ENDPOINT0_SIZE=8
|
2019-09-15 00:01:52 +02:00
|
|
|
|
2019-10-29 11:36:53 +01:00
|
|
|
#-mmcu=msp430f5529
|
|
|
|
|
2020-03-25 08:06:51 +01:00
|
|
|
# Cross Compiler for MSP430
|
|
|
|
CROSS_COMPILE = msp430-elf-
|
|
|
|
|
2019-09-15 00:01:52 +02:00
|
|
|
# All source paths should be relative to the top level.
|
2019-10-29 16:43:26 +01: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 05:40:25 +01:00
|
|
|
LDFLAGS += $(addprefix -L,$(LDINC))
|
2019-09-15 00:01:52 +02:00
|
|
|
|
2019-10-29 16:43:26 +01:00
|
|
|
INC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include
|
2019-09-15 00:01:52 +02:00
|
|
|
|
|
|
|
# For TinyUSB port source
|
|
|
|
VENDOR = ti
|
|
|
|
CHIP_FAMILY = msp430x5xx
|
|
|
|
|
2020-03-22 13:11:24 +01:00
|
|
|
# export for libmsp430.so to same installation
|
2020-03-24 05:40:25 +01:00
|
|
|
ifneq ($(OS),Windows_NT)
|
2020-03-22 13:11:24 +01:00
|
|
|
export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher))
|
2020-03-24 05:40:25 +01:00
|
|
|
endif
|
|
|
|
|
2020-03-22 13:11:24 +01:00
|
|
|
# flash target using TI MSP430-Flasher
|
|
|
|
# http://www.ti.com/tool/MSP430-FLASHER
|
|
|
|
# Please add its installation dir to PATH
|
2021-01-26 06:46:24 +01:00
|
|
|
flash: $(BUILD)/$(PROJECT).hex
|
2020-03-22 13:11:24 +01:00
|
|
|
MSP430Flasher -w $< -z [VCC]
|
2020-03-24 05:40:25 +01:00
|
|
|
|
|
|
|
# flash target using mspdebug.
|
2021-01-26 06:46:24 +01:00
|
|
|
flash-mspdebug: $(BUILD)/$(PROJECT).elf
|
2020-03-24 05:40:25 +01:00
|
|
|
$(MSPDEBUG) tilib "prog $<" --allow-fw-update
|