intel hex and binary formats

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

intel hex and binary formats

1,798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Tue Apr 06 11:10:34 MST 2010
When I build my project it generates that axf format.
Reading: http://lpcxpresso.code-red-tech.com/LPCXpresso/node/34 I can generate intel hex and binary format.
But I still have a question:
Does any of those generated files have some kind of a header?
I need some information about the binary one, for example: the time/date, project name, version...

If not, how can I do such header?

Renan
0 Kudos
Reply
2 Replies

1,673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Wed Apr 07 04:33:26 MST 2010
NXP_USA

Thank you. It works as expected.

Quote:

The linker script for this project is modified to place the .crp section  at a specific address in flash.



Is there any way to do this without modifying the linker script?

Renan
0 Kudos
Reply

1,673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Apr 06 12:11:53 MST 2010
Hello renan,

Neither the Intel Hex neither the binary file format has a header including the project time/date, project name, or version. The binary file format only contains the constant data and code generated by the compiler. The Intel Hex format contains the same information, but as hex bytes instead of binary ones. The Intel Hex format also includes the addresses where the data is stored.

To incorporate the date and version information into the program, it is possible to define a block of constant data at a specific location in flash. This constant data could be the GCC __DATE__ variable or other information such as the current project name. External software could read the Intel Hex file or the binary file generated by the linker and retrieve this string.

For an example of how to put values into the flash at a specific address, look at the LPCXpresso CRP example. In the CRP example, a 32-bit integer is placed into the CRP_WORD variable. A compiler keyword is used to place the CRP_WORD variable into a .crp section. The linker script for this project is modified to place the .crp section at a specific address in flash.

-NXP
0 Kudos
Reply