Skip to main content
Chandan Bhatia1
Associate III
October 2, 2020
Question

Issue while adding padding to generated file

  • October 2, 2020
  • 1 reply
  • 1118 views

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 ?

    This topic has been closed for replies.

    1 reply

    TDK
    Super User
    October 2, 2020

    > --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""."
    Chandan Bhatia1
    Associate III
    October 2, 2020

    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