Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: First program

Re: First program

From: Eric Linenberg <elinenbe_at_umich.edu>
Date: Thu, 13 Dec 2001 13:47:37 -0500

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
tinkering.

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

-eric

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
Received on 2001-12-13

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy