Przeglądaj źródła

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

William D. Jones 6 lat temu
rodzic
commit
772b0c17bf
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 1 0
      examples/rules.mk
  2. 3 3
      hw/bsp/msp_exp430f5529lp/board.mk

+ 1 - 0
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

+ 3 - 3
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 $<"