I have my Arduino connected to a computer that doesn't support the IDE, but has avrdude, etc. (Specifically a SheevaPlug.) I'd like to compile my sketch on a separate computer using the IDE, scp the output to the SheevaPlug, and upload to the Arduino using avrdude from the SheevaPlug command line. Any advice?
1. It seems that clicking "compile" in the IDE doesn't generate the .hex file; you have to click "Upload" to actually create the .hex file. Is that true? If so, is there an easy way to create the .hex file without uploading?
- I read various postings that the generic avrdude doesn't work from the command line and the arduino avrdude needs to be used. Is this currently the case?
interesting little gadget that SheevaPlug...
Ok, for the questsions asked. The compiled HexFile you need is alsways created by the upload-command, even if uploading fails. You simply get an error message saying the board is not connected.
But the Hex-File is in subdir "applet " of your sketch.
There is no need to run the Arduino-version of avrdude for uploading (wouldn't even run on the SheevePlug I guess). Just get a recent version, and copy the "avrdude.conf" the arduino uses (arduino/hardware/tools/avrdude.conf) over to the sheevaplug.
I had the same issue. Bascially you need to understand what the IDE actually does and then do it on your own. The most helpful resources I found were those:
There are also some tricks that are not that explicitly mentioned:
0) You do not necessarily need a make file. What you really need is to understand what the IDE really does. Fortunately there is some configuration file where you can tell the IDE to build and upload "verbose". If you set this then you see all commands the IDE actually issues in order to build and upload. Once you have this you can decide on your own if you modify an existing make file, use a shellscript, stick to the command line or opt for something else.
1) You need some means to send a pulse to DTR. I use some small python script
2) You may want to have a substitute for the serial monitor. Again I use a small python script with pyserial
See also the related thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248626686/3
- It seems that clicking "compile" in the IDE doesn't generate the .hex file; you have to click "Upload" to actually create the .hex file. Is that true? If so, is there an easy way to create the .hex file without uploading?
For the sake of completeness the relevant part of the document mellis linked to is:
When you verify a sketch, it is built in a temporary directory in the system temp directory (e.g. /tmp on the Mac).
Better late than never. :)
Is there a way to tell the IDE to put the output hex file directly into the sketch directory (instead of the temp directory that it currently uses)? I looked through the preferences.txt file but didn't see anything obvious.
Ed, at this point with version 0018 there seems to be NO WAY to change where the IDE puts the hex file and other support files. Hold down SHIFT key, click the "verfiy" button - the verbose mode will show the temp directory used.
Many of us have asked to have an option in the next release allowing the selection of where to put these files.... A real hassle for sure, especially if you forget and close the IDE before finding and saving that folder - it's deleted on closing IDE.
Ok, sounds like the “request” is already in the queue.
Also, thanks for the info regarding closure of the IDE…
I didn’t realize that it would delete the directory.