platformio / platform-nxplpc

NXP LPC: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/nxplpc
Apache License 2.0
8 stars 12 forks source link

Fix bin size of LPC15xx devices #26

Open antonverburg opened 2 years ago

antonverburg commented 2 years ago

When compiling and objcopy for LPC15xx devices, the content of RAM is included in the bin file ,resulting in a large firmware.bin file. In order to ommit this, please add the flags "-R.heap -R.bss -R.stack_dummy" to the objcopy command in main.py, function ElfToBin, line 54 to 63: https://github.com/platformio/platform-nxplpc/blob/d4be89bc96138d1f076b1c4bf19b514d6a7ac443/builder/main.py#L54-L63

antonverburg commented 2 years ago

See also this discussion: https://community.platformio.org/t/programing-nxp-lpc-via-usb-as-a-flash-disk-usb-isp-msc/22542/5

valeros commented 2 years ago

Hi @antonverburg ! Could you please provide some instructions on how to reproduce the problem?

antonverburg commented 2 years ago

Just generate a bin file for LPC1549, that will be way too big to copy to USB-mounted LPC device in USB programming mode. So it should be stripped.