Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

comparing code versions

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
ecoology

Bascom Member



Joined: 07 Nov 2006
Posts: 340
Location: USA - California

usa.gif
PostPosted: Sun Oct 07, 2007 1:36 am    Post subject: comparing code versions Reply with quote

I have a large program that has gone through several hundred versions. now I have a unit that works more or less as desired, but I can't find which version of the code I used tro generate the HEX [ yes, I know, I should be more organized, but with hundreds of modifications, that gets difficult].

Is there any reasonable way to compare a HEX file against a BAS file to see what the difference is? Obviously I can compile the BAS file, now I would have two HEX files, Can they be reverse compiled into machine language, so I can then compare two files? Or is there some better way to figure out which of several hundred Bas files compiles to a given HEX file?

thanks for any and all comments, even if I am told I should find something better to do with my time!
George
Back to top
View user's profile Visit poster's website
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Sun Oct 07, 2007 8:12 am    Post subject: Reply with quote

Hi George,

Try that:


(Click to enlarge).

Best regards,

Luciano
Back to top
View user's profile
jasreb

Bascom Member



Joined: 03 Dec 2004
Posts: 41

uk.gif
PostPosted: Sun Oct 07, 2007 10:11 am    Post subject: Reply with quote

This won't help you now, but you can always add a couple of lines to your prog in future to write the .bas version to eram each time the program runs (not in a loop or you will kill the eram!!) All you have to do is before you compile a new version of the .bas file, edit the "Const Swvers = xx" line in your bas file to the current version number.

Then when the chip gets programmed you will be able to see the version of the bas file in the chip eram memory itself, so you can connect a programmer months later and see which version of .bas file you programmed it with. Wink

I'm sure there is an easier way but this works for me!

Code:


Dim Vers As Eram Byte                                     ' software version
Const Swvers = 12                                         ' software version for eeprom
Vers = Swvers                                               'write SW version to eeprom

 
Back to top
View user's profile
ecoology

Bascom Member



Joined: 07 Nov 2006
Posts: 340
Location: USA - California

usa.gif
PostPosted: Sun Oct 07, 2007 3:11 pm    Post subject: Reply with quote

HI luciano:
That gives me a modify date for the HEX file, but how can I tell the program date of a chip? It would be neat if there were a way to program into EEPROM a date [optionally] at the same time the flash is prgorammed. Studio does allow dor programming of EEPROM, but I don't know how to prepare a HEX file to do that.

Good to hear from you,
George
Back to top
View user's profile Visit poster's website
Luciano

Bascom Member



Joined: 29 Nov 2004
Posts: 3149
Location: Italy

blank.gif
PostPosted: Sun Oct 07, 2007 3:38 pm    Post subject: Reply with quote

Hi George,

See Bascom help file "Version".

Best regards,

Luciano
Back to top
View user's profile
ecoology

Bascom Member



Joined: 07 Nov 2006
Posts: 340
Location: USA - California

usa.gif
PostPosted: Sun Oct 07, 2007 4:03 pm    Post subject: Reply with quote

Never saw that!
It's amazing what the eye does NOT see.
As always, thank you!
George
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
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
You cannot attach files in this forum
You cannot download files in this forum