mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
rules.mk: Create an LDINC variable for linker script search path.
This commit is contained in:
parent
d464c26ab2
commit
772b0c17bf
@ -28,6 +28,7 @@ ifeq ($(BOARD), msp_exp430f5529lp)
|
|||||||
else
|
else
|
||||||
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
|
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
|
||||||
endif
|
endif
|
||||||
|
LDFLAGS += $(addprefix -L,$(LDINC))
|
||||||
ASFLAGS += $(CFLAGS)
|
ASFLAGS += $(CFLAGS)
|
||||||
|
|
||||||
# Assembly files can be name with upper case .S, convert it to .s
|
# Assembly files can be name with upper case .S, convert it to .s
|
||||||
|
@ -4,7 +4,7 @@ CFLAGS += \
|
|||||||
|
|
||||||
# All source paths should be relative to the top level.
|
# All source paths should be relative to the top level.
|
||||||
LD_FILE = hw/bsp/msp_exp430f5529lp/msp430f5529.ld
|
LD_FILE = hw/bsp/msp_exp430f5529lp/msp430f5529.ld
|
||||||
LDFLAGS += -L$(TOP)/hw/bsp/$(BOARD)
|
LDINC += $(TOP)/hw/bsp/$(BOARD)
|
||||||
|
|
||||||
INC += $(TOP)/hw/bsp/$(BOARD)
|
INC += $(TOP)/hw/bsp/$(BOARD)
|
||||||
|
|
||||||
@ -12,9 +12,9 @@ INC += $(TOP)/hw/bsp/$(BOARD)
|
|||||||
VENDOR = ti
|
VENDOR = ti
|
||||||
CHIP_FAMILY = msp430x5xx
|
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
|
MSPDEBUG = mspdebug
|
||||||
|
|
||||||
# flash target using on-board stlink
|
# flash target using mspdebug.
|
||||||
flash: $(BUILD)/$(BOARD)-firmware.elf
|
flash: $(BUILD)/$(BOARD)-firmware.elf
|
||||||
$(MSPDEBUG) tilib "prog $<"
|
$(MSPDEBUG) tilib "prog $<"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user