allow a board to override link.ld
This commit is contained in:
parent
77fcb8a5a3
commit
9caa65cf28
@ -276,12 +276,13 @@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_M
|
||||
|
||||
all: $(BUILD)/firmware.uf2
|
||||
|
||||
$(BUILD)/firmware.elf: $(OBJ) link.ld
|
||||
LINK_LD := $(firstword $(wildcard boards/$(BOARD)/link.ld link.ld))
|
||||
$(BUILD)/firmware.elf: $(OBJ) $(LINK_LD)
|
||||
$(STEPECHO) "LINK $@"
|
||||
$(Q)echo $(OBJ) > $(BUILD)/firmware.objs
|
||||
$(Q)echo $(PICO_LDFLAGS) > $(BUILD)/firmware.ldflags
|
||||
$(Q)$(CC) -o $@ $(CFLAGS) @$(BUILD)/firmware.ldflags -Wl,-T,link.ld -Wl,-Map=$@.map -Wl,-cref -Wl,--gc-sections @$(BUILD)/firmware.objs
|
||||
$(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py link.ld
|
||||
$(Q)$(CC) -o $@ $(CFLAGS) @$(BUILD)/firmware.ldflags -Wl,-T,$(LINK_LD) -Wl,-Map=$@.map -Wl,-cref -Wl,--gc-sections @$(BUILD)/firmware.objs
|
||||
$(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py $(LINK_LD)
|
||||
|
||||
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
|
||||
$(STEPECHO) "Create $@"
|
||||
|
Loading…
Reference in New Issue
Block a user