This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

An error occurs when generating a signed binary file. Error: Header padding was not requested and image does not start with zeros

Hi Support Team,

An error occurs when generating a signed binary file for central_dfu_smp.

Error: Header padding was not requested and image does not start with zeros

[environment]

windows10

nRF Connect SDK tor Desktop v3.5.0

nRF Connect SDK v1.3.0

python3.8.3

nRF52840DK

[command]

%NCS%\bootloader\mcuboot\scripts\imgtool.py sign --header-size 0x200 --key %NCS%\bootloader\mcuboot\mykey-rsa-2048.pem --align 8 --version 1.2 --slot-size 0x60000 .\build_nrf52840dk_nrf52840\zephyr\zephyr.bin .\build_nrf52840dk_nrf52840\signed-zephyr.bin

[output]

Usage: imgtool.py sign [OPTIONS] INFILE OUTFILE

Error: Header padding was not requested and image does not start with zeros

Parents
  • Hi Nobuhiro, 

    As mentioned in the documentation of imgtool, you may need to use --pad-header if the header is not padded. 

    Note that when you build Zephyr application, the signed image is also generated. You can find the app_update.bin in the build\zephyr folder. It is the signed image that you can use with mcumgr to update. 

    If you want to change the key you can use 

     -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE=\"bootloader/mcuboot/root-rsa-2048.pem\" for example. 

    It's described here.
Reply
  • Hi Nobuhiro, 

    As mentioned in the documentation of imgtool, you may need to use --pad-header if the header is not padded. 

    Note that when you build Zephyr application, the signed image is also generated. You can find the app_update.bin in the build\zephyr folder. It is the signed image that you can use with mcumgr to update. 

    If you want to change the key you can use 

     -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE=\"bootloader/mcuboot/root-rsa-2048.pem\" for example. 

    It's described here.
Children
Related