[Solved] Easy way to simultaneously deploy a sketch to multiple devices?

So I am working on a 2.4GHz RF project, which requires the same code on two or more nodes at once. As it is, I compile it, and upload to one, then select the serial port for each node, and upload each one. It'd be great to have something (even on the command line), to just say, "Send this to ports." Any ideas?

Hold the Shift key and click Upload. The AVRDUDE command-line is output to the status window. Drag the mouse to select the command-line and press Ctrl+C. Start your favorite text editor. Paste. Alter the command-line as you wish. Select the command-line and copy. Open a command-shell. Paste. Repeat for the other nodes.

Ah, thank you. That's quite handy. Ok, so that leads me to my next question. Sketches seem to get built in a different temp directory every time. Is there a handy way to overcome that? I'm comfortable with build toolchains in general, but I've not cracked open the Arduino tools one bit.

None that I'm aware of.

Is there a handy way to overcome that?

Not within the IDE AFIAK.

Start using an external editor and makefile. Then you could either knock up a batch file to include the commands that CB detailed, or include a target for all the boards in the makefile.


Rob

Yah, guess it's time to buckle down and figure out the Arduino toolchain. So far I've been really happy with the experience out of the box, content to just focus on the code.

If you decide to do that I have a makefile you can use.


Rob

Graynomad:
If you decide to do that I have a makefile you can use.

Yeah, that would be great. Do you have it posted somewhere?

Attached is my latest version, probably not industrial strength and still needs some cleaning up but it's been working on my system for some time.


Rob

makefile (9.04 KB)

Success! Ok, I used that make file and successfully uploaded. w00t!

Had to tweak a few things to work on Mac OS, but not much. And a couple tweaks to do the multiple uploads.

I think there is one bug... This line...

CXXFLAGS = $(CDEBUG) -O$(OPT) $(CWARN) $(CXXTUNING) $(CDEFS) $(CINCS)

...should probably be using $(CXXINCS) not $(CINCS). Otherwise, remove $(CXXINCS) up above cuz it doesn't seem to be used anywhere else.

Anyway, this is glorious! Thanks for the help!!