Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

IT can be setup in following ways:

http://www.valvers.com/embedded-linux/beaglebone/getting-started/

You then have a linux terminal to use. If youre not familiar with Linux, itd be
best to go away now and learn about Linux on a desktop PC and then start
getting to grips with embedded linux. As youre learning Linux, get yourself
familiar with character file drivers.
Coding
Lets do some coding straight away. The Angstrom Linux install that comes pre-loaded on the SD card
with the BeagleBone includes GCC, so we can start coding in c straight away.
Write a simple hello world app in c using nano. Type:
[code]nano ./hello_world.c[/code]
Type in the simple program:
[code]
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
[/code]
Press Ctrl+X to quit, and press Y to save the file. Check that the file is correct by typing
[code]cat ./hello_world.c[/code]
then compile:
[code]gcc -Wall hello_world.c -o hello_world[/code]
Then run the output:
[code]./hello_world[/code]
and hey presto

Transferring files between PC and BeagleBone


The easiest way when using the serial console connection is to make use of the USB Mass Storage
Gadget that the default Angstrom BeagleBone distribution runs when it is plugged into the PC.
You can easily copy files across using explorer in Windows. In order to get access to the files on the
BeagleBone we need to mount the Fat32 parition on the SD card which is what were accessing on the
PC. This is not automatically mounted. It is very easy for us to mount, just type:
[code]mount /dev/mmcblk0p1 /media/card[/code]
The first partition of the card is now mounted on /media/card and you can navigate there just like any
other system directory and copy or work with the files.

You might also like