diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 12:50:18 -0400 |
commit | 39a5c822a2a2e798e2e39ff8a98b7af84253026c (patch) | |
tree | fa157c98d3aea0d4f996e4415aa2a7ad1093ac05 /tinyusb/hw/bsp/msp430/family.mk | |
parent | c9e00b83bbdcb05058806d915ec4fff3cf4e596f (diff) | |
download | Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.gz Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.tar.bz2 Sensor-Watch-39a5c822a2a2e798e2e39ff8a98b7af84253026c.zip |
add tinyusb
Diffstat (limited to 'tinyusb/hw/bsp/msp430/family.mk')
-rwxr-xr-x | tinyusb/hw/bsp/msp430/family.mk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tinyusb/hw/bsp/msp430/family.mk b/tinyusb/hw/bsp/msp430/family.mk new file mode 100755 index 00000000..ceafa6ec --- /dev/null +++ b/tinyusb/hw/bsp/msp430/family.mk @@ -0,0 +1,35 @@ +CROSS_COMPILE = msp430-elf- +DEPS_SUBMODULES += hw/mcu/ti +SKIP_NANOLIB = 1 + +CFLAGS += \ + -D__MSP430F5529__ \ + -DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \ + -DCFG_EXAMPLE_MSC_READONLY \ + -DCFG_TUD_ENDPOINT0_SIZE=8 + +# All source paths should be relative to the top level. +LD_FILE = hw/mcu/ti/msp430/msp430-gcc-support-files/include/msp430f5529.ld +LDINC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include +LDFLAGS += $(addprefix -L,$(LDINC)) + +SRC_C += src/portable/ti/msp430x5xx/dcd_msp430x5xx.c + +INC += \ + $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include \ + $(TOP)/$(BOARD_PATH) + +# export for libmsp430.so to same installation +ifneq ($(OS),Windows_NT) +export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher)) +endif + +# flash target using TI MSP430-Flasher +# http://www.ti.com/tool/MSP430-FLASHER +# Please add its installation dir to PATH +flash: $(BUILD)/$(PROJECT).hex + MSP430Flasher -w $< -z [VCC] + +# flash target using mspdebug. +flash-mspdebug: $(BUILD)/$(PROJECT).elf + $(MSPDEBUG) tilib "prog $<" --allow-fw-update |