
This string ensures that the MCUxpresso IDE generates a
*.hex
file with the same name as your project. After this, call the
crc_hex.bat
file with the correct parameters as follows:
•
-${ConfigName}/${BuildArtifactFileBaseName}.hex
- the path to your application
*.hex
file.
•
-${ConfigName}/${BuildArtifactFileBaseName}_crc.hex
- the path to the generated
*.hex
file with the CRC added.
•
-tools\\srecord\\srec_cat.exe
- the path to the
screcat.exe
utility.
Because the name of your poject is set as the "${BuildArtifactFileBaseName}" variable, this postbuild is independent on your
project name.
Figure 10. Configuration of post-build steps
5.2.3.2 Place information table
The
crc-hex.bat
file expects the information table in the last 16 bytes of the input
*.hex
file. This table can be defined as the
following structure:
/* The safety-related FLASH CRC value. */
fs_crc_t c_sfsCRC __attribute__((used, section(".flshcrc"))) =
{
Post-build CRC calculation
LPC CM0 Safety Example , Rev. 3, 07/2021
NXP Semiconductors
20