Skip to content

Commit 0d0b6a7

Browse files
committed
Align image size to flash size
1 parent 9de2640 commit 0d0b6a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

firmware/bootloader/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dirs:
6161

6262
$(PROG).elf: $(OBJS)
6363
$(CC) $(LDFLAGS) -o $@ $^ -L$(SPL_PATH) -l$(SPL_LIB) -T$(LINKER_SCRIPT)
64-
$(OBJCOPY) -O ihex $(PROG).elf $(PROG).hex
64+
$(OBJCOPY) --pad-to 0x8003800 -O ihex $(PROG).elf $(PROG).hex
6565
$(OBJCOPY) -O binary $(PROG).elf $(PROG).bin
6666
$(OBJDUMP) -St $(PROG).elf > $(PROG).lst
6767
$(SIZE) $(PROG).elf

firmware/programmer/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ dirs:
7474
$(APP_1).elf: $(OBJS)
7575
$(CC) $(LDFLAGS_1) -o $@ $^ -L$(SPL_PATH) -l$(SPL_LIB) \
7676
-T$(LINKER_SCRIPT_1)
77-
$(OBJCOPY) -O ihex $(APP_1).elf $(APP_1).hex
77+
$(OBJCOPY) --pad-to 0x08022000 -O ihex $(APP_1).elf $(APP_1).hex
7878
$(OBJCOPY) -O binary $(APP_1).elf $(APP_1).bin
7979
$(OBJDUMP) -St $(APP_1).elf > $(APP_1).lst
8080
$(SIZE) $(APP_1).elf
8181

8282
$(APP_2).elf: $(OBJS)
8383
$(CC) $(LDFLAGS_2) -o $@ $^ -L$(SPL_PATH) -l$(SPL_LIB) \
8484
-T$(LINKER_SCRIPT_2)
85-
$(OBJCOPY) -O ihex $(APP_2).elf $(APP_2).hex
85+
$(OBJCOPY) --pad-to 0x08040000 -O ihex $(APP_2).elf $(APP_2).hex
8686
$(OBJCOPY) -O binary $(APP_2).elf $(APP_2).bin
8787
$(OBJDUMP) -St $(APP_2).elf > $(APP_2).lst
8888
$(SIZE) $(APP_2).elf

0 commit comments

Comments
 (0)