Re: Removing padding from generated hex files

Sebastian Boe


try enabling


IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.

From: devel@... <devel@...> on behalf of via Lists.Zephyrproject.Org <>
Sent: Thursday, April 4, 2019 2:14 PM
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] Removing padding from generated hex files

Is it possible when building projects to have the flash sections that are defined in the dts but unused (in this instance, the Nordic MBR) and not have them filled but instead left blank/empty? I have created a simple project and enabled mcuboot support in the build options, it uses the flash partition table correctly and places the code at 0x1000 instead of 0x0, but it has filled 0x0 – 0x1000 with 0x00 bytes, which if flashed will overwrite the Nordic MBR and leave a dead module. Instead, I would like to have code start at 0x1000, nothing at all placed between 0x0 – 0x1000, and the same in another section which is defined later, this is so that there can be external data present which isn’t overwritten when the application hex file is flashed to the module.

Join { to automatically receive all group messages.