|
|
View previous topic :: View next topic |
Author |
Message |
isotopus
Joined: 04 Oct 2007 Posts: 1
|
checksum related doubts |
Posted: Thu Oct 04, 2007 7:13 am |
|
|
Until now, I have been working with PIC16F, and I've managed "checksum" with directive #id. this way, I may store a fixed version to any code that I have compiled.
But now I have just started working with PIC18F4510, and I have the following problem. I try the same instruction that before:
#id VERSION_01, VERSION_02,VERSION_03,VERSION_04
But now, when I compile any source code change, MPLAB IDE "checksum" field changes, although VERSION_0X macros have not changed.
I have also tried with:
#rom 0x20000={VERSION_ID0, VERSION_ID1, VERSION_ID2, VERSION_ID3, VERSION_ID4, VERSION_ID5, VERSION_ID6, VERSION_ID7}
But the same problem....
Sorry because of my ignorance about the checksum calculation, but I'm a beginner... Does anyone know how does MPLAB generate the checksum (which data is used)??
Could somebody help me please?
Thank you very much!! |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Thu Oct 04, 2007 11:02 am |
|
|
So you wish to have a checksum for the HEX file match your program version? I suppose if you have a macro that edits a few bytes of program memory to the right value this could be achieved. I have never heard of this being done before.
Whats your macro look like? |
|
|
Guest
|
|
Posted: Fri Oct 05, 2007 12:36 am |
|
|
Thanks for your reply Neutone !
An example of macro used until now (PIC16F):
#define VERSION_ID0 0
#define VERSION_ID1 1
#define VERSION_ID2 2
#define VERSION_ID2 3
#id VERSION_ID0, VERSION_ID1, VERSION_ID2, VERSION_ID3
With the PIC18F4510 I have tried the same and as it doesn't seem to work I have used as well:
#rom 0x20000={VERSION_ID0, VERSION_ID1, VERSION_ID2, VERSION_ID3, VERSION_ID4, VERSION_ID5, VERSION_ID6, VERSION_ID7}
What do you think about it ? Have you got any other idea ?
Thanks for your help !! |
|
|
Ttelmah Guest
|
|
Posted: Fri Oct 05, 2007 2:21 am |
|
|
Yes.
One very simple comment. :-)
How many 'zeros' should there be in the ROM address for the ID bytes?.
Best Wishes |
|
|
Guest
|
|
Posted: Mon Oct 08, 2007 12:50 am |
|
|
Hi and Thanks again !!
Yes, I know that I must put #rom 0x200000 (One more zero )...but it does not work as well...
I do not know what more can I do...
As people say in my country " I see phantoms everywhere with this stuff..."
Thanks... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|