LED Cube/Building From Source: Unterschied zwischen den Versionen

Aus Wiki CCC Göttingen
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(6 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
[[Category:en]]
==Getting the Sources==
==Getting the Sources==
  git clone http://www.0x53a.de/git/cube-3
  git clone http://www.0x53a.de/git/cube-3
Read
* '''README''' for a description of the contents of this repository and a link to this site
* '''LICENSE''' for licensing information


==Building the Bootloader==
==Building the Bootloader==
(Notice: You do not need this step if you have a preflashed cube, only if you want to modify the bootloader.)
(Notice: You do not need this step if you have a preflashed cube, only if you want to modify the bootloader. However, the requirements are about the same as for the other firmwares.)
===Requirements===
===Requirements===
You will need
You will need
* gmake
* gmake
* avr-libc, avr-binutils, avr-gcc
* avr-libc, avr-binutils, avr-gcc (see also [[AVR_Toolchain]])
* avrdude
* avrdude
* an ISP- or JTAG-Programmer like AVR ISP mkII, usbasp, or any (avrdude-compatible, if you want to use the Makefile) other.
* an ISP- or JTAG-Programmer like AVR ISP mkII, usbasp, or any (avrdude-compatible, if you want to use the Makefile) other.
Zeile 45: Zeile 50:


===Flashing===
===Flashing===
There are now several ways fo flash this device. First is using an ISP programmer. In this case you have to adapt the file <code>src-standalone/programmer.mk</code>.
There are now several ways fo flash this device. Two are:
 
====Flashing via ISP====
First is using an ISP programmer. In this case you have to adapt the file <code>src-standalone/programmer.mk</code>:
PROGRAMMER = -c avrispmkII -P usb
These are the avrdude parameters you have to adapt to your ISP programmer.
====Flashing via Bootloader====
 
After building the bootloader commandline and the program you can immediately flash the code onto the microcontroller (if you still are in cube-3/src-standalone and if you set the flashing jumper correctly):
../bootloader/commandline/bootloadHID build/out.hex
After setting the jumper to the other position (or removing it), the LED Cube should start blinking with your new program.

Aktuelle Version vom 23. April 2012, 23:38 Uhr

Getting the Sources[Bearbeiten]

git clone http://www.0x53a.de/git/cube-3

Read

  • README for a description of the contents of this repository and a link to this site
  • LICENSE for licensing information

Building the Bootloader[Bearbeiten]

(Notice: You do not need this step if you have a preflashed cube, only if you want to modify the bootloader. However, the requirements are about the same as for the other firmwares.)

Requirements[Bearbeiten]

You will need

  • gmake
  • avr-libc, avr-binutils, avr-gcc (see also AVR_Toolchain)
  • avrdude
  • an ISP- or JTAG-Programmer like AVR ISP mkII, usbasp, or any (avrdude-compatible, if you want to use the Makefile) other.

Building[Bearbeiten]

The bootloader is in the directory bootloader/firmware/. It can be built with

cd cube-3/bootloader/firmware/
make

Flashing[Bearbeiten]

To flash it, modify the bootloader/firmware/Makefile:

AVRDUDE = avrdude -P usb -c avrispmkii -p m8 -p $(DEVICE)

to match your programmer. This is the line for AVR ISP mkII. If you have a programmer, you probably know how to do this, so I won't get into it.

Then apply fuse settings and flash:

make fuse
make flash

Building the Bootloader Application[Bearbeiten]

The Windows app is already prebuilt in the git repository. The bootloader is bootloadHID, so please inform yourself about how to do this for Windows.

For Linux, the command line application is included in bootloader/commandline/

Requirements[Bearbeiten]

You will need libusb with headers.

Building[Bearbeiten]

cd cube-3/bootloader/commandline
make

Building the Standalone Firmware[Bearbeiten]

The standalone firmware simply takes a sprite file and plays it repeatedly. It is included in src-standalone. The requirements are the same as for the Bootloader firmware.

Building[Bearbeiten]

cd cube-3/src-standalone
make

Flashing[Bearbeiten]

There are now several ways fo flash this device. Two are:

Flashing via ISP[Bearbeiten]

First is using an ISP programmer. In this case you have to adapt the file src-standalone/programmer.mk:

PROGRAMMER = -c avrispmkII -P usb

These are the avrdude parameters you have to adapt to your ISP programmer.

Flashing via Bootloader[Bearbeiten]

After building the bootloader commandline and the program you can immediately flash the code onto the microcontroller (if you still are in cube-3/src-standalone and if you set the flashing jumper correctly):

../bootloader/commandline/bootloadHID build/out.hex

After setting the jumper to the other position (or removing it), the LED Cube should start blinking with your new program.