diff options
| author | Dave Hylands | 2016-09-27 23:11:36 -0700 |
|---|---|---|
| committer | Damien George | 2016-10-04 14:31:19 +1100 |
| commit | 1f433c719b1d29a44c52befdf1476d154ebb3c68 (patch) | |
| tree | e5daed73647319899ca1da9652de51f443e4316e /stmhal/Makefile | |
| parent | bd925b59c3177542fa69c3c95f9f1a40ced18039 (diff) | |
stmhal: Fix linker map for STM32L476 chips.
In particular, this makes the L4 .isr_vector section 16K in size so it's
the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to
the end of flash, which allows for 512K filesystem on the 1Mb devices
like the STM32L476DISC.
Diffstat (limited to 'stmhal/Makefile')
| -rw-r--r-- | stmhal/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 532846234..a135fbb5c 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -313,11 +313,13 @@ else $(Q)$(DFU_UTIL) -a 0 -d $(DEVICE) -D $< endif +TEXT_ADDR ?= 0x08020000 + deploy-stlink: $(BUILD)/firmware.dfu $(ECHO) "Writing $(BUILD)/firmware0.bin to the board via ST-LINK" $(Q)$(STFLASH) write $(BUILD)/firmware0.bin 0x08000000 $(ECHO) "Writing $(BUILD)/firmware1.bin to the board via ST-LINK" - $(Q)$(STFLASH) --reset write $(BUILD)/firmware1.bin 0x08020000 + $(Q)$(STFLASH) --reset write $(BUILD)/firmware1.bin $(TEXT_ADDR) deploy-openocd: $(BUILD)/firmware.dfu $(ECHO) "Writing $(BUILD)/firmware{0,1}.bin to the board via ST-LINK using OpenOCD" @@ -327,7 +329,7 @@ $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf $(ECHO) "Create $@" $(Q)$(OBJCOPY) -O binary -j .isr_vector $^ $(BUILD)/firmware0.bin $(Q)$(OBJCOPY) -O binary -j .text -j .data $^ $(BUILD)/firmware1.bin - $(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware0.bin -b 0x08020000:$(BUILD)/firmware1.bin $@ + $(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware0.bin -b $(TEXT_ADDR):$(BUILD)/firmware1.bin $@ $(BUILD)/firmware.hex: $(BUILD)/firmware.elf $(ECHO) "Create $@" |
