Getting Started on the Uzebox

From Uzebox Wiki
Jump to: navigation, search

Introduction

To start developing games and programs on the Uzebox you will need the following:

  • Some knowledge of the C language: This language has been around for decades and is still the de-facto high level language for embedded applications.
  • A physical Uzebox or the emulator: You are not obliged to develop on the hardware, the emulator will speed up the process since you won't have to reprogram the micro-controller or copy your game to an SD card every time.
  • An AVR programmer: When using a physical Uzebox, this is also know as an ISP programmer (in system programmer). This device is used to program your game on the micro-controller, without having to remove it from the board.
  • An IDE (Integrated Development Environment): This is a program that ease the development process by checking syntax, invoking the compiler and more. Some uses Atmel's AVR Studio (Windows), Eclipse CDT(Multi platform) or even a plain text editor.
  • The GNU GCC tool chain for AVR: This is made of a serie of programs and tools required to compile your programs into a form that can run on the AVR micro-controller.

Software Installation

GNU Tool Chain for AVR

Windows

  • Install the latest WinAVR -- Currently WinAVR-20100110. This contains the GNU C compiler and avr-libc, a very popular open source library of C functions for the AVR devices.
  • In order to correctly display memory consumption in rom builds (and avoid errors), you may need to replace the avr-size.exe in your distribution. The file can be downloaded here: avr-size-patch

Mac

Mac specific software installation is here.

Linux

See this thread, and remember to download the makefile at the bottom of the first post.

Artcfox also created a video tutorial series on YouTube that walks the viewer through installing and configuring the entire Uzebox development environment, and follow-up videos that detail the use of tools for generating graphics, and composing music.

IDE

  • Install AVR Studio 4 (registration required, Windows only).

or


GNU tool chain for x86

This is required in order to build the tools like uzem.exe, the emulator.

http://uzebox.org/wiki/index.php?title=Emulator#Pre-requisites

Sources

The Uzebox project sources are now hosted at GitHub (previously on Google Code) and includes all the demo games, the tools and the kernel libraries to build new games. Simply download a pre-packaged ZIP of the latest sources: https://github.com/Uzebox/uzebox/archive/master.zip or checkout from the repository with a tool: http://uzebox.org/wiki/index.php?title=Source_Control

Then run make on the main makefile to build everything: the game ROMS and tools like uzem, the emulator. At the command line, change directory to where you checked out or unzipped the source code (the dir that contain a file named "Makefile"), then enter command:

make

With this you will have all game projects compiled and the HEX files to flash with your ISP programmer will be under the "/roms" folder.

Programming games to the Uzebox

When you compile your program, a HEX file will be generated. This is the machine language code for the ATMega644. You will need a tool to program (aka flash) the chip with your program. If you have AVRStudio or Atmel Studio, there's build in facility to flash a HEX file. To use a command line approach, you'll need AVRDUDE: http://uzebox.org/wiki/index.php?title=Avrdude