Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to crosscheck if the firmware hash generated by hash function .


Hello Everyone,

I am generating firmware hash using an hash function provided by an external library and using CODE_START and CODE_SIZE macros in app_util.h ,
So i wanted to crosscheck if the hash generated is correct or not,

Is there any external site or tool which takes the hex file as input and gives the genrated firmware hash as output.
Parents
  • Hi,

    If you convert the application to a .bin file, you should be able to use any SHA256 Hash calculator for this task.

    You can convert using following command (given that application.hex is present in C:\FW\ directory):

    arm-none-eabi-objcopy -I ihex C:\FW\application.hex -O binary C:\FW\application.bin

    I verified that the following online tool calculates the same hash as Notepad++ (Tools > SHA-256 > Generate from files):

    I verified that nrf_crypto_hash produce the same hash:

    I will post the code I used for calculation in the other thread.

    Best regards,
    Jørgen

Reply
  • Hi,

    If you convert the application to a .bin file, you should be able to use any SHA256 Hash calculator for this task.

    You can convert using following command (given that application.hex is present in C:\FW\ directory):

    arm-none-eabi-objcopy -I ihex C:\FW\application.hex -O binary C:\FW\application.bin

    I verified that the following online tool calculates the same hash as Notepad++ (Tools > SHA-256 > Generate from files):

    I verified that nrf_crypto_hash produce the same hash:

    I will post the code I used for calculation in the other thread.

    Best regards,
    Jørgen

Children
No Data
Related