Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Code Checksum

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi
Is there anyway to allow the PICKIT2 programming checksum to be accessible to the code in the MCU?
I'd like to autodisplay a firmware version on MCU bootup.
 
Normally the checksum is not programmed to the micro processor memory.

It changes each time you change your program. So encoding it in the program is not possible because you do not know what it will be.

I think you could place it in EEPROM and not screw up the flash checksum.
 
I was hoping for a way for the value to be automatically visible to the code . I observe that the PICKIT2 checksum appears to literally be a hex sum of the code bytes.

Perhaps there's a way to emulate this in the code itself and self generate the pickit2 checksum?

I kinda want to use the checksum as my own ref for code versions as it's a reasonably foolproof way to identify different code versions.
 
Blue:
I am debugging several thousand lines of code in its destination hardware device. I need an automated way to track which 'version' is running . The code displays a 2 byte firmware hex # on bootup on a 4 dig. display. This firmware # is set in eeprom. In the long run when things are debugged etc, I can use that Firmware revision system, but right now I want a convenient automated way to differentiate and compare code running in multiple prototypes.
 
I hope you are using a source code control system.

Have the code print out the revision number generated by SCCS.

I am sure a mechanism exists to update the SCCS revesion number in the source code during the check in process.

The revision number will allow you to know how files and builds relate by date. Much nicer then the checksum.

EDIT: Some systems are call Revision Control Systems. RCS
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top