ECE597 Lab 1 Wiring and Running the Beagle

Here's what you need to do to get your Beagle running for the first time.

ls, cd, less mplayer ls /proc ls /sys are files that map to the hardware. cd /sys/class/leds ls cd beagleboard::usr0 ls cat trigger echo none > trigger echo 1 > brightness tells you what options you can set trigger to. Try some of them. Explore  and   is see what else you can find.
 * Wire your Beagle as shown
 * Insert the SD card
 * Plug in the 5V power
 * Login and look around. Left-click on the background to get a menu.
 * Try starting an XTerm.
 * Try some basic Linux commands
 * Try

Homework
There are many interesting programs already compiled for the Beagle that aren't on the SD card we gave you. New applications can be easily installed using the  package manager. When you are back home and connected to the network try: opkg list | less opkg install gcc The first command lists the packages you can install. The second command installs the gcc C compiler. With a compiler installed you can take your favorite C program and compile and run it on the Beagle. Here is the embedded version of Hello World as presented in The Embedded Linux Primer.
 * 1) include 

int bss_var;       /* Uninitialized global variable */

int data_var = 1;  /* Initialized global variable */

int main(int argc, char **argv) { void *stack_var;            /* Local variable on the stack */ stack_var = (void *)main;  /* Don't let the compiler */ /* optimize it out */

printf("Hello, World! Main is executing at %p\n", stack_var); printf("This address (%p) is in our stack frame\n", &stack_var);

/* bss section contains uninitialized data */ printf("This address (%p) is in our bss section\n", &bss_var);

/* data section contains initializated data */ printf("This address (%p) is in our data section\n", &data_var);

return 0; } Compile and run it yoder@beagleboard:~$ gcc helloBeagle.c yoder@beagleboard:~$ ./a.out Hello, World! Main is executing at 0x8380 This address (0xbefa1cf4) is in our stack frame This address (0x10670) is in our bss section This address (0x10668) is in our data section This is a program I use what talking about the address spaces on the Beagle and virtual memory.

Try some of your own C programs. See how well they run. If you come up with something interesting, add them to the wiki.