Go Down

Topic: If I wanted to upload a sketch without using the Arduino IDE thing... (Read 1 time) previous topic - next topic


I want to write a program that will upload a sketch to an Arduino. I know I have to find the USB device in /dev/, but after I've got that, what is the protocol for communicating with the Arduino? Is there a reference anywhere?

To be clear, I don't want to overwrite the bootloader. I just want to upload a sketch to the device.



The compiled program to upload is stored in a file using the Intel Hex format:


The standard arduino bootloader uses the STK500 standard:


But writing such a PC application program is not a trival thing to do. Most just use AVRDUDE in command line mode to manual upload hex file sketches to a arduino board. Some have written a GUI 'front end' for AVRDUDE. Searching around should be fruitful.




It would be very very easy, if arduino had used a simple Z or X-modem upload protocol instead of STK500 protocol (and making no use of their extra functionality as far as I've seen). I've used tiny bootloaders that I just need to send 5 ESC characters at boot, and then the x-modem protocol to send a binary file. Tools like windows hyperterminal support these protocols, so no need for specialty software.

Go Up