cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while adding padding to generated file

In my project I need to add padding to few flash address. I generated hex file which has flash data till 0x1000(Suppose) but I want to pad till 0x4000 with 0xFF. I am using below gcc commands but unable to get desired output.

arm-none-eabi-objcopy --set-start 0x08000000 --pad-to=0x4000 --gap-fill=0xFF BootloaderDiscovery.elf BootloaderDiscovery.bin -O binary

any suggestions ?

2 REPLIES 2
TDK
Guru

> --set-start 0x080000000

0x080000000 = 0x8000 0000 = not the start of the flash. You want 0x0800 0000.

If you feel a post has answered your question, please click "Accept as Solution".

Oh that's typo. I updated, Still same result.

arm-none-eabi-objcopy --set-start 0x08000000 --pad-to=0x4000 BootloaderDiscovery.elf BootloaderDiscovery.bin -O binary