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