
.ui32FlashStart = (uint32_t)__ROM_start__,
.ui32FlashEnd = (uint32_t)&Load$$ER_IROM3$$Limit,
.ui32CRC = (uint32_t)FS_CFG_FLASH_TST_CRC,
.ui16End = 0x5AA5U
};
5.1.3 MCUxpresso postbuild CRC
The invariable memoty test example uses the
crc-hex.bat file for the post-build calculation, so this example does
not work on Unix/Mac operating systems.
NOTE
To use the
crc-hec.bat
file in the MCUXpresso IDE, do some settings in the IDE.
1. Set the "Options → C/C++ Build → Settings → Build steps → Post-build steps" options correctly.
2. Set the debug sesion (or the GUI Flash tool) configuration correctly.
3. Put the "Information table" at the end of the invariable memory.
5.1.3.1 Post-build configuration
It is necessary to set the post-build string, so go to the "Options → C/C++ Build → Settings → Build steps → Post-build steps" menu.
Copy and paste the following post-build string into it:
arm-none-eabi-objcopy -v -O ihex "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.hex"
${ProjDirPath}/crc_hex.bat -${ConfigName}/${BuildArtifactFileBaseName}.hex -${ConfigName}/$
{BuildArtifactFileBaseName}_crc.hex -tools\\srecord\\srec_cat.exe
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.
Post-build CRC calculation
i.MX8M Safety Example , Rev. 3, 07/2021
NXP Semiconductors
17