dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: First program
From: Eric Linenberg (
Date: 2001-12-13

Awesome! It would be great if you could give a step-by-step for
setting up gcc to compile the code for the jukebox. This would make
it much easier for others to get "past the basics" and start some more

Again, AMAZING progress after only a week. Keep it up.


BS> Gentlemen,

BS> It is with great pleasure I present to you my first program for the jukebox,
BS> the amazing 550-byte LED-flasher! Fun for the whole family!

BS> Copy the attached archos.mod to your jukebox and enjoy hours of
BS> entertainment! :-)

BS> Here's the source code:

BS> ------
BS> #define PBDR (*((volatile short *)0x05FFFFC2))

BS> int main(void)
BS> {
BS> while (1) {
BS> int i;
BS> PBDR ^= 0x40; /* toggle PB6 */
BS> for (i=0; i<120000; i++);
BS> }
BS> }

BS> const void* vectors[] __attribute__ ((section (".vectors"))) =
BS> {
BS> main, /* Power-on reset */
BS> 0, /* Power-on reset stack pointer */
BS> main, /* Manual reset */
BS> 0 /* Manual reset stack pointer */
BS> };
BS> ------

BS> Amazingly complex, isn't it? ;)

BS> /Björn

Page was last modified "Jan 10 2012" The Rockbox Crew