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

Format of Hex file

Hi,

I have some problem about Keil hex output file.

At the end of hex file, there have some line as following image.

In (a) of above image, why "hex file" need to write "0xFEFFFFFF" into address 0x1000120C? What is the purpose of nRF82832 address 0x1xxxxxxxx?

In (b) of above image, what the purpose of this line? 

If I want to write my "DOS tool to convert hex file to binary file", who can I convert above  (a) and (b)?

Thank you,

Chianglin

Parents
  • Hi,

    In (a) of above image, why "hex file" need to write "0xFEFFFFFF" into address 0x1000120C? What is the purpose of nRF82832 address 0x1xxxxxxxx?

    The register at 0x1000120C is NFCPINS, and is used to select wether pin P0.09 and P0.10 should be used as NFC pins or normal GPIO pins. This is part of the User information configuration registers (UICR), which starts from 0x10001000. (The FICR which is non-writable, starts at 0x10000000).

    In (b) of above image, what the purpose of this line? 

    This is record type 05, so it is "linear start address". I don't think it makes sense in this context, and had never noticed this before. I have not been able to find out why it is there, but by experimenting I see that some toolchains put it there (at least Keil uVistion) while others do not (such as SES, gcc). In any case, it seems it can be ignored in the context of nRF development.

    If I want to write my "DOS tool to convert hex file to binary file", who can I convert above  (a) and (b)?

    When it comes to a), your tool needs to handle that it is a separate address space (not part of the normal flash address range). Note that since this is UICR it is only programmed once, so you do not need to include it in, for instance, DFU updates. I suggest you just use an available conversion tool, though, such as hex2bin.py for the hex to bin conversion.

  • Hi,

    The means of sentence "since this is UICR it is only programmed once" is "UICR only need execute one time every time power-on"?

    Thank you,

    Chianglin

Reply Children
Related