Extract program from Arduino?

by ironmb on Thu Aug 27, 2009 11:38 am

Hi,

I started working on a project a couple months ago, and have just now picked it back up. I have one Arduino that has the program I want on it, but cannot find my sketchbook for the program. Is there a way to extract a program from the Arduino so I can edit it?
ironmb
 
Posts: 2
Joined: Fri Jun 05, 2009 8:07 am

Re: Extract program from Arduino?

by mtbf0 on Thu Aug 27, 2009 4:40 pm

ironmb wrote:Is there a way to extract a program from the Arduino
yes.
ironmb wrote:so I can edit it?
no.

you can get the program off the arduino using avrdude, the same program that was used to put it there in the first place. unfortunately, the sketch has been compiled, assembled, linked, and converted from an elf file to a hex file. it is no longer in a form that in any way resembles the sketch when last you saw it.

start looking for the sketchbook. if you can find the arduino configuration file, i believe that the sketchbook directory is named somewhere within it.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1645
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca

Re: Extract program from Arduino?

by rohwer on Tue Feb 18, 2014 1:10 am

I'm in the same boat (trying to get code off a board). It's been more than four year since this was written, is there still no good way to extract useful code from a board? The answers I'm finding via Google are all about as old as this one. I'd think someone would have found a solution for this by now. Thanks for any help.

-Matt
rohwer
 
Posts: 2
Joined: Wed Jan 22, 2014 11:41 pm

Re: Extract program from Arduino?

by franklin97355 on Tue Feb 18, 2014 9:07 pm

I'd think someone would have found a solution for this by now. Thanks for any help.
There is no solution because the data on the chip no longer looks like the original and it would be easier to recreate the original than restore the copy to a human readable form. As they say, backup any data you consider irreplaceable. Sorry to say this but, since the code is open source you are free to write an recompiler on your own.
User avatar
franklin97355
 
Posts: 2671
Joined: Mon Apr 21, 2008 1:33 pm

Re: Extract program from Arduino?

by rohwer on Wed Feb 19, 2014 9:52 am

I was afraid you'd say that. Thanks for answering my question.

-Matt
rohwer
 
Posts: 2
Joined: Wed Jan 22, 2014 11:41 pm