Go Down

Topic: HELP! How to DOWNload Arduino sketch (harddisk crashed) (Read 903 times) previous topic - next topic

cd_lux

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.

robtillaart


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?
Rob Tillaart

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

mrtaylor

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).

cd_lux

@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?

madworm

#4
Jul 11, 2011, 08:14 pm Last Edit: Jul 11, 2011, 08:17 pm by madworm Reason: 1
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)...
• 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!

retrolefty

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

smeezekitty

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++.
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!

Go Up