CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

checksum related doubts

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
isotopus



Joined: 04 Oct 2007
Posts: 1

View user's profile Send private message

checksum related doubts
PostPosted: Thu Oct 04, 2007 7:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Oct 04, 2007 11:02 am     Reply with quote

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








PostPosted: Fri Oct 05, 2007 12:36 am     Reply with quote

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







PostPosted: Fri Oct 05, 2007 2:21 am     Reply with quote

Yes.
One very simple comment. :-)
How many 'zeros' should there be in the ROM address for the ID bytes?.

Best Wishes
Guest








PostPosted: Mon Oct 08, 2007 12:50 am     Reply with quote

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...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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