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
|
|
|
|
2019-10-29 17:36:53 +07:00
|
|
|
#-mmcu=msp430f5529
|
|
|
|
|
2020-03-25 14:06:51 +07:00
|
|
|
# Cross Compiler for MSP430
|
|
|
|
CROSS_COMPILE = msp430-elf-
|
|
|
|
|
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
|
|
|
|
2019-10-29 11:43:26 -04:00
|
|
|
INC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include
|
2019-09-14 18:01:52 -04:00
|
|
|
|
|
|
|
# For TinyUSB port source
|
|
|
|
VENDOR = ti
|
|
|
|
CHIP_FAMILY = msp430x5xx
|
|
|
|
|
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
|
|
|
|
flash: $(BUILD)/$(BOARD)-firmware.hex
|
|
|
|
MSP430Flasher -w $< -z [VCC]
|
2020-03-24 00:40:25 -04:00
|
|
|
|
|
|
|
# flash target using mspdebug.
|
|
|
|
flash-mspdebug: $(BUILD)/$(BOARD)-firmware.elf
|
|
|
|
$(MSPDEBUG) tilib "prog $<" --allow-fw-update
|