mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-12-29 17:36:26 -05:00
Refuse to produce a .bin if .elf has non-empty data or bss section
Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
parent
d77654bb8e
commit
3ddd6e83a3
@ -144,6 +144,8 @@ testfw.hex: testfw.bin testfw_size_mismatch
|
||||
|
||||
%.bin: %.elf
|
||||
$(SIZE) $<
|
||||
@test "$$($(SIZE) $< | awk 'NR==2{print $$2, $$3}')" = "0 0" \
|
||||
|| { printf "Non-empty data or bss section!\n"; false; }
|
||||
$(OBJCOPY) --input-target=elf32-littleriscv --output-target=binary $< $@
|
||||
chmod -x $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user