Recover program from picaxe 08M?

orko007

New Member
I lost my program due to storing it on a flash drive that was lost. Is there anyway possible with the programming software or other methods to recover my program from my 08M?

Thanks.
 

MiB1986

Member
Hello,

sadly the simple answer is no!

it is 99.9% impossible due to the way it compiles it.

and even if you could get the hex back, you could still only convert it to ASM which i doubt u'd understand, hence picaxe.

kind regards
 

MiB1986

Member
Hello,

Yes multiple backups in various locations is the key i have found even if its an online drive, such as yahoo, you also have the advantage you can access it from anywhere which has internet.

Also always keep a printed copy so if the worse does come to it, you can type it all back in :( but at least you haven;t lost it.

Kind Regards
 

hippy

Ex-Staff (retired)
The simple answer is, "no".

The detailed answer is that it would be possible to extract a PICAXE program from an 08, 08M, 14M or 18 ( but not others ) and turn that back to PICAXE source code which does exactly what the original program did.

It would not be easy nor quick and far more work and effort than simply rewriting the source again. You would rarely get back the exact source code as originally written anyway so there could still be a lot of work needed after extraction.
 

steliosm

Senior Member
So, a nifty utility to extract code from the PicAxe would fit right in.
After all, the code is written into the Flash/EEPROM part of the Pic. Unless I'm mistaken there is an option to start a downloading of the EEPROM data from the PicAxe. So, it would be nice to be able to also download the User's Program (not PicAxe bootloader) which will be translated back to BASIC commands.

Example:
I have this little program written for 08M:
<code><pre><font size=2 face='Courier'>
main:
' Write something to the EEPROM
for b1 = 0 to 255
read b1, b2
sertxd (b2)
next b1
</font></pre></code>

Using F4 I can see that the program space when compiled is 17bytes. In PicAxe 08M the EEPRM is shared, so by doing a READ I can have a dump of the whole EEPROM.
The thing is I do not know how it would work with the chips that store the program in FLASH.
 

hippy

Ex-Staff (retired)
You've dumped Eeprom, but the bigger challenge is in turning it into something meaningful. That's the hard part, then there's turning it back to source. It could be done but no one is telling how to.

As to Flash; there's no way to read the Flash ( except a limited 'data area' in the X1 ) so that's a dead end entirely.

Edited by - hippy on 25/07/2007 15:35:27
 

steliosm

Senior Member
Well, the dump of the EEPROM from the 08M can tell you a lot.
Of course as Dippy pointed out there is a moral issue here, so I'll just stop analyzing things.
I wanted to get into uC programming for years now and PicAxe made this happen. I don't want to loose that and I'm guessing same goes for everyone.

My idea was actually pointing to Technical and I hope they will consider implementing in the next firmware a recovery mechanism.
 

MiB1986

Member
Hello,


i think a recovery mechcanism is dangerous, as it gives anyone access to source code,

for example say one of ur fellow students/clients etc.. remove the chip and reads the information back, they are able to steal your source code.

for that reason i dont like it.

but others may disagree...
 

BeanieBots

Moderator
Not sure that's a feature I'd like to see.
It would allow ANYONE to obtain the source code of your product/homework. Think how much IP theft would be going on.
Besides, it takes very little common sense effort to avoid the problem of 'lost' source code.
Even if you want a way of telling what is in a PICAXE, a simple sertxd line at the start of each program is all that is needed to output program name and version so you know which/what you are about to over-write.
 

steliosm

Senior Member
Yes, but Rev-Ed could keep the utility for it self and maybe the commercial users can sleep better at nights :)

Anyway, if I can't have this feature, could I at least have a ported version of the compilers (not the IDE) for Linux? I remember Rev-Ed telling that they used ANSI C for the new compilers for easy porting to other platforms.
 

papaof2

Senior Member
A EEPROM dumper or decompiler could possibly be made that requires a &quot;password&quot; that you create for your program(s). If the correct password is found in the proper place on the chip, then the program can be dumped/decompiled/whatever.
This would require changes in the IDE/compiler to provide a way to create the password.
This would also use some number of bytes of the PICAXE memory - a byte to identify the length of the password, plus the bytes of the password itself. A 6 or 8 character password might be adequate for many, with the option of more characters (up to 31) for commercial apps and paranoid programmers ;-)

John
 

Dippy

Moderator
So, you want the code recoverable from EEPROM/Flash and then magically transformed back into Basic?
And you want it in the next firmware release?
Crystal balls abound here, but I've yet to see a Magic Wand.

Just make regular backups.
 

hippy

Ex-Staff (retired)
I don't see any gain in having Rev-Ed providing a program extractor and decompiler in any form. It just eats into their resources and I don't see how it would help commercial users sleep any better at night; if they are prone to losing source code they've got some serious problems :)

It's a lesson I'm sure most of us have or will learn, some of us more than once, and sometimes a lot more painful to swallow than a lost PICAXE program.
 

steliosm

Senior Member
Dippy do you magic.
I changed my wish at the very last time. I hope your crystal ball isn't cloudy today :)

Hippy you have a point there but as you probably already know, there are 2 kind of people in the world:
Those who lost data and those who will.
 

Dippy

Moderator
You should have have said &quot;.. there are 10 kind of people...&quot; - that would be better.

Six wrong facts:

1. My hard drive will last forever.
2. I won't lose my USB stick.
3. CDs/DVDs are indestructible.
4. I'll remember where I saved my archived code.
5. Of course I verfied my backup?
6. The server never breaks-down.
(7. The cheque's in the post)
(8. Not broadcastable)

If you take regular backups then you can be happy (and smug). And you don't have to ask for things which will never happen.
 

demonicpicaxeguy

Senior Member
as far as i am concerned there is no substitute for doing a good backup if you loose the source code then tough luck, you have my pity ,move on and start re-writing it
you might even make it better than it was!

on my pc's i have written a small vb program that simply looks at a folder and every file in it if any of the files get changed then the program makes a copy of them and saves them in two places 1 is a flash stick and another is on my server which i promptly backup all the files i want to keep safely onto a cheap cd which i file away

the backup is done once a week, which is 52 cd's a year which the last bucket of cd's cost me $20.00Au at kmart (that was in january)
it's an extremely small price to pay for potentially priceless code

 

hippy

Ex-Staff (retired)
There is also free backup software ( <A href='http://free-backup.info' Target=_Blank>External Web Link</a> and others ).

With the right software you should be able to run the backup program every time the PC starts up and it should only backup changed or relevant files ( not the whole disk ) so should not be too slow. The linked to software creates .ZIP files so less space used.

Backup to a second drive, or failing that a second partition. Copy to CD or DVD on a regular basis. The more places copied to the better.

Preferably use 'incremental backup', otherwise you cannot back-track if you do something silly and not notice until the messed-up file has also become the backup.

My recommendation is; never keep source code in or under the Programming Editor installation directory. Create C:\PICAXE and alter the Programming Editor <i>network.ini </i> to point there. Put each project in a separate sub-directory of C:\PICAXE.
 
As I have found out the hard way...twice

-there is data recovery software out there
-its expensive
-you may need to keep your computer on for three days and nights to get it all back.
 

papaof2

Senior Member
The commercial data recovery services (On-Track, etc) can work wonders (not miracles) but at a price. Something like $1750US for a 30GB drive (in 2005) plus the cost of media to hold the recovered data.

I usually have at least two copies (sometimes three) of source code on different PCs (development laptop, workbench laptop - another old freebie). There's an ancient IBM Thinkpad 380 (freebie because it can't be upgraded past Win 95) with a 4GB drive on the home network as the source backup machine. 4GB is a lot of source code and this PC runs without attention (unless the power is off long enough to discharge the battery).

John
 

D n T

Senior Member
Easy way to fix problem!!!!
Easy way to get the program that is on the PICAXE.

Now that Ive got your attention.

Open the draw next to your desk or turn to the shelf on the other side and pull out the papper copy, or the flash drive with a cop on it, or check that file you have stashed away in my documents from the time you lost that program and decided to keep multiple backups.

A wise uni lecturer told me once, or twice or...
&quot;Save it on your nerd stick ( flash drive) burn it on a disk, save it to my doc or the like and email it to your self. If you can't recover from at least one of them then the world is actually coming to an end and you will have bigger things to worry about.&quot;

Sorry about that, I know losing a program is a pain in the .... but learn from it and you won't lose the next one you write.
I have had it happen and the new edition was a better program anyway.
 

sedeap

Senior Member
****************
Hi:

For backup source I use one re-recordable dvd, one USB-Case for HD (with any size of HD you have) and the Gdrive ( using Google-Store account) is easy, cheap, and worldwide available.
I do my backups on sundays on dvd and use one backup software to do 24/7/365 on Gdrive and USB-HD.
Gdrive, GStore, GMFS, and others are freely available on Web, and Google accounts are free too with 2GB space(and counting up)
If any want the soft or acount, tell me.
I´ve 99 invitations left.

:eek:)
 
Last edited:
Top