Programming Xmega

85 views
Skip to first unread message

Dillon

unread,
Jun 26, 2012, 10:44:29 AM6/26/12
to nonoli...@googlegroups.com
Hello everyone

I received a bare PCB from the Kickstarter and finally ordered the rest of the parts needed to assemble the CEE.

I was wondering if anyone programmed their ATXMega themselves. I see there is a "guide" for this, but it was never finished. I have a Pocket AVR Programmer from Sparkfun that I hoped would be able to program the bootloader and firmware from this page, but I think I may end up needing some help to get me started in the right direction.

Can anybody offer me any words of wisdom?

Thanks,
Dillon

Kevin Mehall

unread,
Jun 26, 2012, 1:42:16 PM6/26/12
to nonoli...@googlegroups.com
Hi Dillon,

To flash the bootloader, you'll need a PDI programmer. Some of the 3rd-party AVR programmers have PDI, some don't. Unfortunately, it looks like the programmer you picked up from sparkfun falls into the latter category. We use and recommend Atmel's AVRISP mkII. Note that while the AVR Dragon is capable of PDI, for some reason it does not support writing the bootloader section of the chip.

The command to flash the bootloader is 
avrdude -p atxmega32a4 -P usb -c avrispmkII -U fuse2:w:0xBF:m  -e -U boot:w:bootloader.hex

(you'll need to adjust the -c parameter if you're using a different programmer)

If it succeeds, you should see the LED blinking when you plug it into the USB port. This means it's in bootloader mode. 

Install Nonolith Connect (see http://www.nonolithlabs.com/cee/start for instructions), visit http://apps.nonolithlabs.com/fwupdate and click the "Write, check, and reset" button to write the 1.0 firmware automatically.

Or, to build and flash your own firmware, run “git clone --recursive https://github.com/nonolith/cee-firmware.git”, and then run “make update” in the resulting cee-firmware directory.

Thanks for noticing that I never finished the 'Firmware Hacking Guide'; I'll go post that.

--
Kevin Mehall
Nonolith Labs
Reply all
Reply to author
Forward
0 new messages