Getting Started on the Uzebox: Difference between revisions

From Uzebox Wiki
Jump to navigation Jump to search
m (Updated information to reflect the move from Google Code to GIT)
Line 33: Line 33:


==Sources==
==Sources==
To access the Uzebox sources, you will need a tool:
http://uzebox.org/wiki/index.php?title=Source_Control


Download the Uzebox sources that includes all the demo games, the tools and the kernel libraries to build new games. This is a GIT type repository.
The Uzebox project sources are hosted at [https://github.com/Uzebox/uzebox GitHub] 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
https://github.com/Uzebox/uzebox


Then run make on the main makefile to build everything: the game ROMS and tools like uzem, the emulator:
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


cd c:/location_of_checked _out_code  (the dir that contain a file named "Makefile")
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.
make
 
With this you will have all game projects compiled and the HEX files to flash with your ISP programmer will be under the "/default" folder.


==Programming games to the Uzebox==
==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
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

Revision as of 02:35, 24 March 2015

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.

Mac

Mac specific software installation is here.

Linux

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

IDE

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 hosted at GitHub 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