Go to file
Christian Kroll 54bc57fcf0 README.md: FreeBSD => BSD 2014-05-29 00:19:02 +02:00
doc/img animated GIF ftw! 2014-03-10 04:22:13 +01:00
ld_scripts finished and tested NetBSD support for i386 and amd64 2014-05-28 16:39:08 +02:00
profiles default profile for Arduino Leonardo was still too big with avr-gcc 4.5.x 2014-05-28 12:28:06 +02:00
scripts preliminary NetBSD support (only tested on amd64 so far) 2014-05-28 13:31:17 +02:00
src borg_hw_lolshield.c: give credit where credit's due 2014-05-28 00:12:45 +02:00
.gitignore Doxygen: create output in doc, not in docs 2014-03-20 02:01:09 +01:00
.gitmodules whoops! 2014-03-20 06:17:26 +01:00
.travis.yml Add .travis.yml or continuous integration 2014-03-06 19:15:09 +01:00
Doxyfile Doxygen: create output in doc, not in docs 2014-03-20 02:01:09 +01:00
Makefile preliminary NetBSD support (only tested on amd64 so far) 2014-05-28 13:31:17 +02:00
README.md README.md: FreeBSD => BSD 2014-05-29 00:19:02 +02:00
config.in added some MCUs in menuconfig 2014-05-21 08:18:56 +02:00
defaults.mk finished and tested NetBSD support for i386 and amd64 2014-05-28 16:39:08 +02:00
depend.mk adding menu and game support 2009-01-01 17:06:38 +00:00
rules.mk moving source files to dedicated directory 2014-03-18 07:00:13 +01:00

README.md

Borgware-2D

Firmware for AVR based two-dimensional LED matrices, especially the Blinken Borgs from Das LABOR. Main platform is the Borg16 construction kit. Other supported platforms are the LED Brett projector from Hackerspace FFM, the ELO Ping-Pong Board or the LoL Shield from Jimmie P. Rodgers.

Small Borg16 Glow Lamp Borg

Animations

Matrix Fire Scrolling Text

Animated GIF (3.5 MB)

Games

Snake Tetris

  • Tetris
  • Classic: Standard Tetris Clone
  • First Person Tetris: Rotate the bucket instead of the Tetromino.
  • Bastet: Dices the worst the possible Tetromino the whole time.
  • Snake
  • Breakout
  • Space Invaders

Build

Supported build platforms are Linux, FreeBSD, NetBSD and Windows (via Cygwin). Due to customized linker scripts, simulator support is currently limited to x86 and x86_64 archs. Following dependencies have to be met:

Linux / FreeBSD / NetBSD

Package names are based on Debian/Ubuntu repositories. Please adapt the names according to your Linux distribution (or BSD for that matter).

  • build-essential (pulls in an ordinary gcc build tool chain for the host)
  • bc
  • make (gmake on BSD)
  • libncurses5-dev
  • gcc-avr
  • avr-libc
  • binutils-avr
  • avrdude
  • freeglut3-dev
  • bash (note to the BSD folks: bash is required for the config tool)

Windows

  • AVR GCC toolchain for Windows, choose your poison:
    • WinAVR
      • already includes avrdude
      • installer offers to add the toolchain to the system path
      • straight forward download from SourceForge
      • project abandoned in 2010, therefore heavily outdated (avr-gcc 4.3.3)
    • Atmel AVR Toolchain for Windows
      • actively maintained, therefore fairly up to date
      • homepage nags you with rather awkward registration process before download
      • you have to add the toolchain to the system path manually
      • avrdude is not included (but it is possible to install WinAVR in parallel)
  • Cygwin(64)
    • bc
    • make
    • gcc-core
    • gdb (in case you want to debug your code in the simulator)
    • libncurses-devel (Cygwin)
    • libncursesw-devel (Cygwin64)
  • libusb-win32 in case you want to use an USBasp programmer device with avrdude

Configure

Open a (Cygwin) terminal, change to your checkout directory and type:

make menuconfig

In case you build on BSD, just use 'gmake' instead of 'make'. This starts an Ncurses based text interface for configuring certain aspects of your target platform. After a fresh checkout, the first thing you do is to load a profile with sane defaults. In the menuconfig interface, select 'Load a Default Configuration' and choose a preset. After hitting enter, the main menu returns immediately. You can either tune your configuration or just exit (choose 'Yes' at the confirmation dialog to save your stuff).

Be careful if you use an IDE like Eclipse to manage the build, as integrated terminal emulators tend to choke on Ncurses generated output. Make sure that 'make menuconfig' has been run at least once in an ordinary terminal emulator after a fresh checkout or after issuing 'make mrproper'.

Note: Always use 'make clean' after changing something in the menu, because subsequent builds may be broken if you don't.

Compile

To build for the actual target platform, just type:

make

This yields an 'image.hex' file which you can flash to your AVR device.

If you want to test and debug your code within a GUI application, you can use the simulator:

make simulator

Again, use 'gmake' instead of 'make' on BSD.

You can start the simulator by typing ./borgsim(.exe)

Simulator Handling

Please keep in mind that the simulator is NOT an emulator. All it does is compile the source code to a native host application so you can step through your C-Code with an ordinary host debugger. The GUI thread reads the simulated frame buffer every 20ms (40ms on Windows) and draws its contents.

Joystick directions are simulated by the WASD keys and SPACE acts as the fire button. The OpenGL based simulator (Linux/BSD) enables you to adjust the viewing angle of the LED matrix via the arrow keys (not available on Windows).