Pages: [1]   Go Down
Author Topic: HELP! How to DOWNload Arduino sketch (harddisk crashed)  (Read 774 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, my harddisk has crashed and the backup doesn't seem to work. I have lost my Arduino project sketch on which I am currently working! The only place I still do have the sketch is within the Arduino board itself. Is there a way of downloading it back onto the PC (actually the reverse of the upload is what I would need)?
Any help is highly appreciated. Thank you very much.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13479
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The sketch is definitely not in your Arduino, only an executable image is in there which can be extracted by means of AVRDUDE.EXE and the -D option IIRC.

I'm sorry your harddisk crashed;
- will it not boot ?
- or is access completey gone?
- did you try to install it as secondary/external disk - e.g. Ubuntu booted from CD - save gig's of data from crashed windows HD's that way.

Why did the backup not work?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Colorado
Offline Offline
Full Member
***
Karma: 2
Posts: 220
Arduino 0022 and Ubuntu 11.10 64bit.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To recover a sketch from a arduino would require a great deal of work and programming skill.  Much easier to rebuild the sketch.

I have lost sketches by having my laptop stolen and having the battery die and the computer crashed.  I have learned the value of making local backups and off site backups.  If you using Ubuntu check out ubuntu one (cloud).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@robtillart,mrtaylor
Thank you very much for your help. I have continued trying to get my backup to work again, plugged it in in different plugs again and again und suddenly it worked again. In the future I think I will change my backup strategy, do backups more frequently and regularly and on at least 2 different media. Thanks again.

PS: Regarding the executable that I could have recovered from the Arduino, is there a tool with which I could have gotten back a readable sketch from it?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Regarding your PS: NO.

Nowadays there are so MANY options for backups. 16GB usb sticks (and even very fast ones) are so cheap these days...

And if you should be running a decent operating system, I recommend using GIT for code. It is sooo nice to have access to the complete history of what you did. You can go back, look at the differences, add comments (so you can remember why you did what you did)...
« Last Edit: July 11, 2011, 01:17:52 pm by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is there a tool with which I could have gotten back a readable sketch from it?

Not possible. What resides in the chip is the AVR machine language instructions from the output of the Gcc compiler. The original sketch source text only resides on your PC. Trying to read back and take the machine language instructions, reassemble it to assembly code text and then try and convert it back to  C/C++ source code is nearly impossible for all practical purposes. Even if possible by some experts there would be no way it would include your original source comments nor the names you used for variables and functions you created in the sketch.
 

Lefty
Logged

Washington
Offline Offline
God Member
*****
Karma: 38
Posts: 789
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is nearly imposable.
The sketch was compiled into asm then compiled to binary.
The binary could be downloaded via avrdude and disassembled but it would still only be in ASM, not C++.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Pages: [1]   Go Up
Jump to: