Generating binaries on vscode with prepended zeroed header to the image

Hello ,

I am using nrf Connect SDK v1.9.1 with nRF Connect extension for my application development.

With reference to the nordic documentation : https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/imgtool.html#incorporating-the-public-key-into-the-code:~:text=Zephyr%20build%20system%20will%20already%20prepended%20a%20zeroed%20header%20to%20the%20image

Please find as in below snap the binaries generated from vscode and nCS I am using, There is no padded zeroed header to my build binaries at 0x000000 (Right image below)

While the left image below is the binary i generated with just zephyr and no nCS. It clearly has zero padded header.

So my question is, How can I have zero padded header to binaries generated out of nCS..?
Can i use any config..?

Thanks,

Ubaid

Parents Reply
  • Hello Sigurd,

    Sorry, there seems to have been some miscommunication.

    2 cases:

    1. With the attached image, If image starts at 0x000210 address in memory, you can see the on LHS image that from address 0x00000 up until 000210 there is zeros prepended.! 

    2. Whereas same image, when built with nCS on vscode, starts with 000000, straight away with data without no prepended zeros. Now I assume linker scripts may copy this at appropriate memory location as it is working.

    But my problem is, how do I generate binary as in the first case using nCS VScode..?

    Thanks,

Children
Related