- Home
- :
- CodeWarrior
- :
- CodeWarrior Development Tools
- :
- Re: Flash CRC checksum calculation

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

SOLVED

03-29-2018
10:14 AM

2,015 Views

taimurwajad123

Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi All,

I'm using Kinetis K10 and codewarriors 10.7 IDE. I wants to do the following:

- calculate CRC checksum of flash

- Place the calculated CRC checksum in .hex file

- On startup (reset), verify the corresponding CRC .

Can someone please guide me how to proceed further?

I tried the procedure described in

CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse | MCU on Eclipse

without any success. I think I'm not able to follow above link properly.

Best Regards

Taimur

Solved! Go to Solution.

1 Solution

01-02-2019
08:32 AM

52 Views

padmanabhlanke

Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hello Taimur,

Q1. Calculate CRC of hex file and place it into particular memory location follow below link

HEX file CRC calculation using SREC Tool: Hex file CRC calculation using Srecord tool

In this link it clearly mentioned how to calculate CRC and place it into particular memory with steps.

Q2. On startup (reset), verify the corresponding CRC .

Load the hex file with CRC appended from Q1 to target.

Also write down a routine to calculate CRC using same algo. (e.g. CRC32).

Call same routine at startup/init function.

Compare calculated CRC with Stored CRC (appended at particular address From Q1)

2 Replies

01-02-2019
08:32 AM

53 Views

padmanabhlanke

Contributor III

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hello Taimur,

Q1. Calculate CRC of hex file and place it into particular memory location follow below link

HEX file CRC calculation using SREC Tool: Hex file CRC calculation using Srecord tool

In this link it clearly mentioned how to calculate CRC and place it into particular memory with steps.

Q2. On startup (reset), verify the corresponding CRC .

Load the hex file with CRC appended from Q1 to target.

Also write down a routine to calculate CRC using same algo. (e.g. CRC32).

Call same routine at startup/init function.

Compare calculated CRC with Stored CRC (appended at particular address From Q1)

03-29-2018
08:51 PM

52 Views

Alice_Yang

NXP TechSupport

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hello Taimur,

About CRC Checksum caculation, you can use CRCgen under CW,

there is a document shows a demo how to do it :

How to use CRCgen in CodeWarrior for MCU

Also the doc of "Targeting_Microcontrollers.pdf" (under the CW installation: CW MCU v10.7\MCU\Help\PDF)

->18.1 Using CRCgen on Microcontrollers describe it in detail.

Hope it heps

Have a great day,

TIC

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------