rules.mk: Create an LDINC variable for linker script search path.

This commit is contained in:
William D. Jones 2019-09-14 21:16:10 -04:00
parent d464c26ab2
commit 772b0c17bf
2 changed files with 4 additions and 3 deletions

View File

@ -28,6 +28,7 @@ ifeq ($(BOARD), msp_exp430f5529lp)
else
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
endif
LDFLAGS += $(addprefix -L,$(LDINC))
ASFLAGS += $(CFLAGS)
# Assembly files can be name with upper case .S, convert it to .s

View File

@ -4,7 +4,7 @@ CFLAGS += \
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/msp_exp430f5529lp/msp430f5529.ld
LDFLAGS += -L$(TOP)/hw/bsp/$(BOARD)
LDINC += $(TOP)/hw/bsp/$(BOARD)
INC += $(TOP)/hw/bsp/$(BOARD)
@ -12,9 +12,9 @@ INC += $(TOP)/hw/bsp/$(BOARD)
VENDOR = ti
CHIP_FAMILY = msp430x5xx
# Path to STM32 Cube Programmer CLI, should be added into system path
# Path to mspdebug, should be added into system path
MSPDEBUG = mspdebug
# flash target using on-board stlink
# flash target using mspdebug.
flash: $(BUILD)/$(BOARD)-firmware.elf
$(MSPDEBUG) tilib "prog $<"