family.mk 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. CROSS_COMPILE = msp430-elf-
  2. DEPS_SUBMODULES += hw/mcu/ti
  3. SKIP_NANOLIB = 1
  4. CFLAGS += \
  5. -D__MSP430F5529__ \
  6. -DCFG_TUSB_MCU=OPT_MCU_MSP430x5xx \
  7. -DCFG_EXAMPLE_MSC_READONLY \
  8. -DCFG_TUD_ENDPOINT0_SIZE=8
  9. # All source paths should be relative to the top level.
  10. LD_FILE = hw/mcu/ti/msp430/msp430-gcc-support-files/include/msp430f5529.ld
  11. LDINC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include
  12. LDFLAGS += $(addprefix -L,$(LDINC))
  13. SRC_C += src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
  14. INC += \
  15. $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include \
  16. $(TOP)/$(BOARD_PATH)
  17. # export for libmsp430.so to same installation
  18. ifneq ($(OS),Windows_NT)
  19. export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher))
  20. endif
  21. # flash target using TI MSP430-Flasher
  22. # http://www.ti.com/tool/MSP430-FLASHER
  23. # Please add its installation dir to PATH
  24. flash: $(BUILD)/$(PROJECT).hex
  25. MSP430Flasher -w $< -z [VCC]
  26. # flash target using mspdebug.
  27. flash-mspdebug: $(BUILD)/$(PROJECT).elf
  28. $(MSPDEBUG) tilib "prog $<" --allow-fw-update