On Montag, 10. Mai 2021 15:02:38 CEST you wrote:
Hi Richard,
indeed here are my steps
git clone -b m65-dev --recurse-submodules https://github.com/alinelena/qmk_firmware.git cd qmk_firmware virtualenv ~/venv/qmk2 source ~/venv/qmk2/bin/activate pip install qmk make m65/rev1:uk .rwxr-xr-x 1 134M drFaustroll users 10 May 13:52 -I m65_rev1_uk.bin
now edit keyboards/m65/rev1/rules.mk and add at the end EXTRALDFLAGS = -Wl,--build-id=none make clean .rwxr-xr-x 1 30k drFaustroll users 10 May 13:55 -I m65_rev1_uk.bin
[...] for the big size bin this is the output of you big command
objdump -h .build/m65_rev1_uk.elf 10/05/21 14:00:43
.build/m65_rev1_uk.elf: file format elf32-littlearm
Sections: Idx Name Size VMA LMA File off Algn 0 .note.gnu.build-id 00000024 00000000 00000000 00010000 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .mstack 00000400 20000000 20000000 00030000 2**0 ALLOC 2 .pstack 00000800 20000400 20000400 00030000 2**0 ALLOC 3 .vectors 00000160 08002000 08002000 00012000 2**10 CONTENTS, ALLOC, LOAD, READONLY, CODE
Now with this output, the difference is obvious: Your .bin file contains mostly 0-padding (~128MByte), between the .build-id and the real code (starting with the interrupt .vector). The .build-id is tagged as CONTENTS, so it is copied into the bin file. For embedded targets, you *dont* want the build id, at least not at its default location (i.e. before everything else). @Alin - edit your .ld script to omit the .build-id section. @Richard - the Linaro/ARM toolchain omits the .build-id for the embedded targets (like arm-eabi-none) by default. Regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen phone: +49 241 53809034 mobile: +49 151 50412019