Porting Arduino

Someone made a post a while back (around spring break, IIRC) about how to port the arduino core and language to different AVR chips. The guys kept citing the Teensy and how he ported it, so I guess it was the creator of the Teensy/Teensy++.

Anyways, what I’m getting at is, does anyone have info on porting the Arduino language to other AVR micros (i.e., the ATtiny2313)?

The Arduino language is just a strange subset of C/C++. Subset, because the sketch is really just PARTS of a regular C program, which the Arduino toolchain rearranges in the correct way to form THE C program and then this is compiled by the avr-gcc compiler. So any processor that is supported by avr-gcc can be a target for an Arduino program.
What the Arduino does is to abstract in nice funcions or singleton objects access to the hardware. So by saying digitalWrite( 10, HIGH ), you don’t have to know what exactly this means for the processor. So making the Arduino toolkit to support another processor is a matter of redefining a bunch of mappings of processor specific settings - frequency, pins, timers etc. But this is not so trivial as it seems and as the Arduino community grows and sample code is spread around having a new processor that can work with all that available code is a process that requires a lot of testing and debugging.

Thanks for the info. I’m ordering up some ATtiny2313’s and I think I might try to get all of the files ported.

search for LumiNet… I ported the Arduino core to the attiny2313 and I am working with it everyday.

The original LumiNet hardware uses the attiny84 mcu.

Currently, the modified IDE is based on Arduino 0014, but soon I will update to the latest Version of the Arduino IDE.

For the Arduino IDE part, you can download the files without purchasing a Teensy…


Essentially, it’s a set of C source files copied from the original Arduino files then modified for the AT90USB162 and AT90USB646 processors. He’s added a few (very nice) improvements.

The Teensy developer mentions his bootloader a few times (HalfKay) so I suspect he’s rather proud of it. This is a good indication that the bootloader was the hard part. But, as far as I can tell, he doesn’t provide source code for it.

Good luck,