Open antonverburg opened 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
Hi @antonverburg ! Could you please provide some instructions on how to reproduce the problem?
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.
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