ec
ec copied to clipboard
SDCC 4.5.0 + objcopy produces incorrectly sized image
On the current master (commit d15bc38de8e2c5eb28e2231701f56199385b6d65), building the ec.rom for the darp10-b results in a wrong size, where it is 262080 bytes instead of 262144 bytes.
Steps to reproduce
- Clone the repository and initialize submodules
- Build with
make BOARD=system76/darp10-b - Check the size of the
ec.romwith, e.g.,wc -c build/ec.rom
Disclaimer: I currently do not have another platform where I can try it out so I am not 100% sure if there is something wrong on my machine causing this issue.
Sorry, this clearly appears to be a bug on my system as objcopy -I ihex -O binary --gap-fill=0xFF --pad-to=262144 build/ec.ihx build/ec.rom results in a file build/ec.rom of size 262080 bytes...
I found the problem: This bug happens with sdcc=4.5.0 but not with sdcc=4.4.0. I leave this issue here for reference. You may close it.
Reverting to SDCC's makebin might work.
If so, would also remove the need for installing the host GCC toolchain (gcc-avr would still be needed for the Arduino tools). Well, not entirely: The tool needs cc available.