Linux Uzebox how-to
Posted: Thu Nov 27, 2008 6:49 am
If you're a windows hater like myself, this post is for you.
Hardware needed
That's it , Enjoy !
Hardware needed
- Uzebox: I'm using this Clay's fully assembled kit ( here ), but there is also the fuzebox.
- Atmel ISP loader. The Atmel MegaAVR 644 supports what's called "in system programming" ( ISP ), allowing you to flash the chip after it's installed. The Uzebox provides a 6 pin header on which to connect the loader. I'm using the Atmel AVRISPmkII ( available here for 35$ )
- Atmel AVR compiler tools ( if you're a debian guy, they're also available via apt-get )
Code: Select all
sudo yum -y install avr-libc-docs avr-binutils avrdude avr-gdb avr-gcc avr-libc
- Uzebox source: ( version 1 here )
- Makefile: use the one attached
- the uzebox source also contains sample programs: tetris.c and composer.c
- open up the Makefile, locate "TARGET= tetris" at the top, if you want to compile composer.c , set TARGET = composer
-
Code: Select all
make
- if you got an AVRISPmkII , you need to set its clock to a sane value, or it will be horribly slow. Give your Uzebox some juice, hook up the ISP, and run the following. You only need to do this once.
Code: Select all
sudo avrdude -v -p m644 -P usb -c avrispmkII -t ... avrdude> sck 5 avrdude> quit
- if you have another ISP, refer to the avrdude man page for the correct port and model values, then modify the avrdude arguments in the makefile
-
Code: Select all
sudo make flash
- copy and paste the following in tutorial.c ( from Uze's tutorial here )
Code: Select all
#include <avr/io.h> #include <stdlib.h> #include <avr/pgmspace.h> #include "kernel/video.h" #include "data/fonts.pic.inc" const char strHello[] PROGMEM ="HELLO WORLD FROM THE UZEBOX!"; int main(){ SetFontTable(fonts); ClearVram(); Print(8,12,strHello); while(1); }
- edt the makefile : TARGET = tutorial
-
Code: Select all
make ; sudo make flash
- Tile Studio : runs perfect under wine ( just needs lpng.dll )
That's it , Enjoy !