Freaklabs chibi.
Some notes from freaklab site itself:
Programming notes on the chibi:
- the toolchain is avr-gcc 4.3.3
- the default with ubuntu for me.
- generally usb is the most problematic. It can hang the machine. On linux a good test is 'lsusb' - if it hangs you did something wrong with initialization.
- using "init_cmd()" notice you don't need to do "init_hw()" again. That seems to get it to hang (which doesn't sound right to me - init functions should be idempotent, no?)
- another possible problem is not polling enough (TODO - what is the required interval?). You can notice this if linux complains it cannot open the device /dev/ttyACM0, even if it (the file) exists. minicom will stop working too, hanging and returning with an error.
On Ubuntu
works with the latest (9.10) and the previous (9.04), aka karmik kuala and jaunty jackalope. For 9.04 I had to build dfu-programmer from source since the older version doesn't support the atmega32u4.
sudo apt-get install avr-libc dfu-programmer make
Notes:
- avr-libc drags in the binutils-avr and gcc-avr packages
- most developers would already have make installed, but for completeness. I haven't tested it from a new install, I'm trying to guess - these instructions need testing. Someone has to do that yet (wink).
Usage - to compile just do the usual (your make files work out of the box for the ths lessons) to program the "trick" (actually just the requirements from the datasheet):
I used these lines in the Makefile:
#---------------- Programming Options (dfu-programmer) ----------------
DFUPROGRAMMER = sudo dfu-programmer
DFUPROGRAMMER_FLAGS = atmega32u4
# Program the device. (these need to be '''Tabs''' before the $(DFUPROGRAMMER)
program: $(TARGET).hex $(TARGET).eep
$(DFUPROGRAMMER) $(DFUPROGRAMMER_FLAGS) erase; echo 0
$(DFUPROGRAMMER) $(DFUPROGRAMMER_FLAGS) flash $(TARGET).hex