How to get a program checksum

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get a program checksum

Jump to solution
6,986 Views
glork
Contributor I
I've always found a program checksum to be handy when tracking/verifying program revisions. Does Code Warrior have some (hidden?) utility to calculate checksums? Wouldn't it be nice to be able to checksum the program before its flashed (i.e. the S19 file or similar) as well as to checksum the flash?
ron
Labels (1)
Tags (1)
0 Kudos
1 Solution
1,383 Views
CrasyCat
Specialist III

Hello

I was asking as the answer is different for HC08, HC12, Coldfire, or PPC :smileyhappy:

The description below is valid for HC08 & Hc12, HCS12.

If you are using HC08 tools there is a CHECKSUM command that you can use in the linker .prm file.

For information how to use that command look in the Linker manual. There is a description of the command CHECKSUM in there.

You can also find some example project using the CHECKSUM command in the {Install}\(CodeWarrior_Examples)\HC08\Checksums directory for HC08 and
{Install}\(CodeWarrior_Examples)\HC12\Checksums for HC12.

I hope this helps.

CrasyCat

View solution in original post

0 Kudos
5 Replies
1,383 Views
glork
Contributor I
I currently have active projects with the QT/QY family(3 projects), QB family (1 proj.), GB family (3 proj.) and the MC9S12UF32(1 proj). My question was generic (not device specific).
ron
0 Kudos
1,384 Views
CrasyCat
Specialist III

Hello

I was asking as the answer is different for HC08, HC12, Coldfire, or PPC :smileyhappy:

The description below is valid for HC08 & Hc12, HCS12.

If you are using HC08 tools there is a CHECKSUM command that you can use in the linker .prm file.

For information how to use that command look in the Linker manual. There is a description of the command CHECKSUM in there.

You can also find some example project using the CHECKSUM command in the {Install}\(CodeWarrior_Examples)\HC08\Checksums directory for HC08 and
{Install}\(CodeWarrior_Examples)\HC12\Checksums for HC12.

I hope this helps.

CrasyCat

0 Kudos
1,383 Views
glork
Contributor I
Thanks, I'll try this as soon as I can get back to the development system. Sounds helpful.
ron
0 Kudos
1,383 Views
irob
Contributor V
Sorry for resurrecting a very old topic.  But I too have a need for finding the checksum of a project.  My vendor is going to start pre-programming my chips and they require the checksum as an extra layer of verification.

I'm using the MC9S08QG8.  In-house, I use the P&E suite of tools and I see that they all have a checksum verification command, "VC".  I've run this but the output I get is only "Success", no actual value.

I don't have those checksum examples in my install directory of CodeWarrior.  But from the help, this worked well for me:

Code:
CHECKSUM  CHECKSUM_ENTRY METHOD_CRC16    OF      READ_ONLY   0xE000 TO 0xFBFF    INTO    READ_ONLY   0xFF70 SIZE 2    UNDEFINED 0xFF  ENDEND

 


Then, I programmed my part and inspected address FF70.  There's my number.


0 Kudos
1,383 Views
CrasyCat
Specialist III

Hello

Which processor are you targeting (HC08, MPC, ...)?

CrasyCat

0 Kudos