How to use CRCgen in CodeWarrior for MCU

Document created by Martin Kovar Employee on Dec 8, 2016Last modified by Diana Torres on Feb 24, 2017
Version 2Show Document
  • View in full screen mode

This document shows, how to use CRC gen utility in CodeWarrior for MCU IDE.

 

1) Create new project in CodeWarrior.

2) Create a file calc_crc.crc in the Project/Project_Settings/Linker_File directory.

3) Open project settings, choose C/C++ Build ->Settings and add the following command to Post-build steps:

"${MCU_TOOLS_HOME}/bin/crcgen.exe" "${BuildLocation}/${BuildArtifactFileName}" -crc "${ProjDirPath}/Project_Settings/Linker_Files/calc_crc.crc" -srec "${BuildLocation}/${BuildArtifactFileName}.crc.mot" 26

 

4) Open calc_crc.crc and configure required parameters. Meaning of single lines is described in CodeWarrior reference manual called Targeting_Microcontrollers

I used following code (it is only example)

 

5) Build your project.

6) File MPC5604B-CRCTest.elf.crc.mot was created

 

Now you have s-record, which contains CRC and which could be loaded to microcontroller.

1 person found this helpful

Attachments

    Outcomes