From 772b0c17bf59df89bfc011b6c97cb63612afa8b8 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Sat, 14 Sep 2019 21:16:10 -0400 Subject: [PATCH] rules.mk: Create an LDINC variable for linker script search path. --- examples/rules.mk | 1 + hw/bsp/msp_exp430f5529lp/board.mk | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/rules.mk b/examples/rules.mk index f57b506c..a56b3668 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -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 diff --git a/hw/bsp/msp_exp430f5529lp/board.mk b/hw/bsp/msp_exp430f5529lp/board.mk index 5e4b7255..741b3e00 100644 --- a/hw/bsp/msp_exp430f5529lp/board.mk +++ b/hw/bsp/msp_exp430f5529lp/board.mk @@ -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 $<"