How to use CRCgen in CodeWarrior for MCU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to use CRCgen in CodeWarrior for MCU

How to use CRCgen in CodeWarrior for MCU

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.

171177_171177.pngpastedImage_1.png

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

171178_171178.pngpastedImage_2.png

 

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

171183_171183.pngpastedImage_4.png

I used following code (it is only example)

171184_171184.pngpastedImage_7.png

 

5) Build your project.

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

171185_171185.pngpastedImage_8.png

 

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

标签 (1)
无评分
版本历史
最后更新:
‎12-08-2016 04:03 AM
更新人: