Go Down

Topic: executable code uploader (Read 7611 times) previous topic - next topic


It would be awesome... AWESOME... to be able to export a packaged executable that I can send someone to load up new code onto an arduino without having to duplicate my dev environment.  

Presumably, it would need to target specific hardware, and allow for a selection of the serial device as an interface control.  

I'm not saying I want to hide or protect my code. I'm all for making the code available.  That could be an option, but not one that I would require.

As the arduino moves slowly into new territory, I know that the focus will continue to be on end users as engineers, but also eventually there will be products made with the Arduino as their beating heart.  It would be a huge boon to the people making products to be able to provide an easy way to let the end users be able to apply code updates easily.


Check this out:


You could deliver just the hex file and instructions on how to get it onto an SD card. End users could update as required.
The art of getting good answers lies in asking good questions.


Confused... I'd have to include an SD card slot on my project?


either that or tell your end user to jack it into a pc and send it over serial

sd would make it easier for anyone to download an update and drop it in the device, but no its not the ONLY way


Good ideas, guys. And, my idea is about letting non-technical end users be able to launch an app and get a program loaded onto an arduino... without having to become technical.  

There are people out there who will buy my product (already have, actually), and I'm looking for a way to provide them with a painless and easy solution to getting a firmware update without having to:

1. download the arduino IDE
2. download the libraries I'm using
3. install them where they need to be
4. load up my sketch
5. select the right hardware target
6. select the right serial device
7. upload to the hardware.

I'm looking for a reduction in number of steps to something like:

1. launch the pre-packaged executable
2. select the right serial device
3. hit "go"

I don't know how much of the arduino IDE is still based on the processing IDE, but they do have an export to executable feature.  It's cross platform and super easy. I realize it's not the same thing as what the arduino project is doing ... but I'm just saying "that would be awesome".  


The Arduino IDE is a fancy editor that makes calls to the avr-gcc compiler and avrdude to upload the code. There are settings you can add to some configuration file (build.verbose = true, for instance) to see the commands actually being executed on your computer. A search on the forum will provide those details.

Then, you could create a script that took one argument, the serial port name, and executed the upload command for the user to upload your latest and greatest.
The art of getting good answers lies in asking good questions.

Udo Klein

I think it could be completely automated if your Arduino side helps a little bit. So the first question is if you want to connect to "naked" Arduinos or preloaded ones.

Suppose first a naked one:

1) Your Software has to determine the serial/usb port for the Arduino
2) It must pulse DTR
3) It must upload the hex file according to the specified protocoll

AFAIK the IDE uses avrdude for step (3) but if you know in advance that you want to talk to arduino with its specific bootloader this could be simplified of course. Especially I think it would be not to hard to package everything into one single executable. (Plus of course the HEX file).

Now suppose the Arduino can be preloaded by you. In this case the executable could pulse DTR for all potential serial devices. At least under linux these can be discovered quite easily. I think in Windows this should be possible as well. Now if your Arduino software will always send a string over serial (during setup) that says "hello, I am an Arduino" then your software would know that this is an Arduino and could connect accordingly.

Maybe this could be further simplified if the bootloader has some specific responses that could be exploitet. But I did not yet analyze the bootloader, but I would guess that it has some exploitable answers.

But I am wondering why a real (non techie) product (and not just a prototype series) should be built around Arduino? Arduino is to expensive once you want to go into production and has some other issues as well (power consumption, board usually not suitable).

In my opinion it is a great prototyping platform but not really suitable for productization.

Cheers, Udo
Check out my experiments http://blog.blinkenlight.net


Well, I would respectfully disagree.  It's absolutely perfect for me and my product at my stage of development.  I'm not building millions-of my product. I'm aiming for building tens-of.  If I get to the point of needing to build thousands of, maybe I'll have the capital to hire an electrical engineer.  In the meantime, while I'm refining my product and building a customer base, I can get my head around the arduino IDE and hardware and roll out my product today... instead of never.  

Thanks for the continuing stream of good ideas, please do continue!


And honestly, auto-detecting an arduino on the serial chain isn't that important to me.  Nice to have, but not something I would expect. The IDE currently doesn't do that, so I wouldn't expect it.


Jan 19, 2010, 11:07 pm Last Edit: Jan 19, 2010, 11:07 pm by Osgeld Reason: 1
well what is an arduino without the board, a chip and a clock crystal (and power), so yea even running thousands of the things you could still have it based on arduino, which is an appealing factor


Yeah, that's what I was thinking too.  Two factors that are appealing: 1. if the arduino mega ever becomes damaged in any way, it can be shipped back to me without having to ship the entire product back.  I can provide a replacement arduino mega very quickly if need be. and 2. if for whatever reason you don't want to use my product anymore, you can take out the arduino mega and use it for your own awesome project.

Udo Klein

What kind of product are you talking about?
Check out my experiments http://blog.blinkenlight.net


welllll, since you asked: http://beatseqr.com/blog/

Udo Klein

Cool. So would you uploader target just one platform (for example Mac) or has it to run on PC, Mac and others?
Check out my experiments http://blog.blinkenlight.net


ideally it would spit out executables for all platforms the IDE runs on, but I'm probably reaching for the stars on that one.  I hate to break a taboo and introduce the concept of paying money for open source things I appreciate, but I would totally pay money for an arduino "pro" IDE that would produce this kind of executable.  

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131