Computing stuff tied to the physical world

Uploading without avrdude

In AVR, Software on Jul 1, 2010 at 00:01

In the future, I’d like to upload new firmware to JeeNodes, Arduino’s, and other AVR boards through channels other than a serial port or USB. Uploading to a “slave plug” via I2C would be neat, for example.

That means the standard avrdude won’t do. Besides, after having coded various types of ISP sketches recently, I realized that the upload mechanism is really quite simple. If all you need is STK500 compatibility (as used by several ISP programmers and by the Arduino boot loader itself), then avrdude is overkill.

So here’s a demo “rig” for JeeMon which does the same thing as avrdude, i.e. upload a sketch over a serial port:

Screen Shot 2010 06 27 at 23.19.45

That removes the need to compile and install avrdude. Better still, this should work as is on every platform supported by JeeMon.

(Note: the above code is now part of JeeMon, but the source code can also be found here on the web)

Onwards!

Update – the above code has been integrated into JeeMon as new Upload rig – with dudeLoader renamed to “stk500″ and readIntelHex now called “readHexFile”. Here’s a new demo “application.tcl” using this:

Screen Shot 2010 06 28 at 01.46.48

Now works with the Arduino boot loader as well as with the Flash Board ISP programmer (add “19200” arg).

(Reminder: the Jee Labs shop will be closed from July 14th through August 14th)

  1. JC, Have you considered using something like SyntaxHighlihter so that the source code examples in your blog posts could be copied & pasted ?

    See http://alexgorbatchev.com/wiki/SyntaxHighlighter

    • Thx for the pointer. That one has no support for Tcl (which is fiendishly difficult to highlight, btw), unfortunately. Two other reasons holding me back so far: 1) I’m using vanilla WordPress for this weblog, and I haven’t found a suitable supported highlighter plug-in yet. And 2) I’d prefer people to get the latest copy of the code, so it would probably be better to add a link to a file in the code repository, which is versioned and gets bug fixes applied.

      In this particular case, if you’re running JeeMon in its default self-updating mode, then you already have the code (it’s in the “JeeMon-kit” file). So you can simply create a demo with the little “application.tcl” code shown at the end and it should work.

      In general though, yes, good point. I try to always include a link to the source on the web. It’s awkward, but please keep reminding me when I forget to include the link. Most of the recent posts already have such links by now.

      I’d like to move away from WordPress to a static website one day (without losing any content, of course). WordPress is both overkill and too inconvenient for this daily weblog. But for the next few months, it’ll have to do. When I do change, I’ll look into a syntax highlighter. Right now, it’s a screen dump from my TextMate editor window – nice, but cumbersome.

Comments are closed.