You are on page 1of 15

Introduction to the BeagleBone Black

 Introduction:
The BeagleBone Black is the newest member of the BeagleBoard family. It is a lowercost,
high-expansion focused BeagleBoard using a low cost Sitara XAM3359AZCZ100 Cortex A8
ARM processor from Texas Instruments. It is similar to the BeagleBone, but with some
features removed and some features added.
The table below gives the high points on the differences between the BeagleBone and
BeagleB
one
Black.

Beagle boards are tiny computers with all the capability of today’s desktop machines,
without the bulk, expense, or noise. The BeagleBone Black is a low-power open-source

The BeagleBone was also designed with open source software development in mind. Pune . It provides 1-GHz performance – 150 percent higher performance than ARM11 for more advanced user interfaces and computation power. • 2 GB on-board storage using eMMC: In addition to all the features of the previous board (BeagleBone).  BeagleBone Black Features: • Sitara AM335x ARM cortex – A8 processor: The board is based on the Sitara AM335x ARM Cortex-A8 processor from Texas Instruments Incorporated (TI). • DC power: +5V DC power can be supplied to the BeagleBone through a barrel connector or from the mini-USB. • 512MB DDR3: The board is having 512 megabytes of low-power DDR3L RAM. both of which are located near the large RJ45 Ethernet connector. which frees the MicroSD slot to be used for additional storage. The board was developed by a small team of engineers as an educational board that could be used in colleges around the world to teach open source hardware and software capabilities. doubling the size and speed of the volatile memory and ensuring it will execute software faster. DPCOE. and as a way of demonstrating the Texas Instrument's OMAP3530 system-on-a-chip.Programming Laboratory III (2014-15) hardware single-board computer produced by Texas Instruments in association with DigiKey and Newark element14.Department of Computer Engg. the Beaglebone black now uses embedded nonvolatile memory system using eMMC.

All signals on the expansion headers are 3. IPv4 and IPv6 networking. • USB host: USB 2.Programming Laboratory III (2014-15) • PMIC: The board uses a TI TPS65217B PMIC to generate stable supply voltages regardless of input power variation. • Boot button: Boot button is used to boot the Beaglebone black directly from an external microSD card. • MicroSD slot: MicroSD slot for additional user data or operating systems. DPCOE.3v unless otherwise indicated.  BeagleBone Black Key Component Locations: Here are the locations of the key components on the Rev A5A.0 type A host port. Pune . You can boot the Beaglebone Black from an external SD card by holding down the BOOT button when applying the power • Micro HDMI: with this microHDMI we can connect directly to monitors and TVs.Department of Computer Engg. • 10/100 Ethernet: 10/100 Ethernet RJ45 socket. • Expansion headers: The expansion interface on the board is comprised of two 46 pin connectors.

Either BeagleBone Black or original BeagleBone may also boot from a microSD card. This will both power the board and provide a development interface. Getting started: Step 1: Plug in your BeagleBone black via USB. The Power Button and Battery Connections are new additions to the Rev A5A. DPCOE. BeagleBone Black will boot Linux from the on-board 2GB eMMC.Programming Laboratory III (2014-15)  BeagleBone Black Connector and Switch Locations: Below is the location of the connectors and switches on the Rev A5A board.Department of Computer Engg. 2. Pune . Use the provided USB cable to plug your Beagle into your computer. Getting Started with the BeagleBone Black Read the step-by-step getting started part below to begin developing with your BeagleBone Black in minutes.

Additional drivers give you serial access to your board. • USR1 is configured at boot to light during microSD card accesses. Install the drivers for your operating system to give you network-over-USB access to your Beagle. • USR0 is configured at boot to blink in a heartbeat pattern.Programming Laboratory III (2014-15) BeagleBone Black will operate as a flash drive providing you with a local copy of the documentation and drivers. DPCOE.txt file. but may be used to update the boot parameters using the uEnv. • USR3 is configured at boot to light during eMMC accesses. Within 10 seconds. • USR2 is configured at boot to light during CPU activity. You'll see the PWR LED lit steadily. Step 2: Install drivers. Pune . Note that this interface may not be used to re-configure the microSD card with a new image.Department of Computer Engg. you should see the other LEDs blinking in their default configurations.

DPCOE. try the 64-bit installer first.Department of Computer Engg. Click "Ignore". Pune .Programming Laboratory III (2014-15) Operatin Usb drivers Comments g system Window 64-bit s (64bit) If in doubt. installer Note #1: Windows Driver Certification warning may pop up two or three times. "Install" or "Run".

It will load a presentation showing you the capabilities of the board.ftdichip.com/horndis“ Step 3: Browse to your beagle.htm. Pune . MAC Network OS X serial Linux Mkudevrule. Use the arrow keys on your keyboard to navigate the presentation.aspx?i d=13523 • Note #3: You may need to reboot Windows. DPCOE. Driver installation isn't required.org/gadget/” / “http://joshuawise. browse to the web server running on your board. In that case.microsoft.Department of Computer Engg.” Note: Additional USB to virtual Ethernet information and drivers are available from “http://www. please install the installer bit) following and retry: http://www. but you might find a few udev rules sh Install both sets of drivers helpful. Note: Additional FTDI USB to serial/JTAG information and drivers are available from “http://www. Using either Chrome or Firefox (Internet Explorer will NOT work). you may get an error (0xc000007b).linux-usb.Programming Laboratory III (2014-15) Window 32-bit s (32- • Note #2: On systems without the latest service release.com/Drivers/VCP.com/enus/download/confirmation.

 Expanding the Storage Partition on microSD If you have installed a Linux distribution on your microSD you can modify the root file system partition. You are then able to utilize all of the space on your microSD card regardless of the size of the default partition of your given image. DPCOE.Department of Computer Engg. Pune . Follow the instructions found on Expanding File System Partition on a MicroSD. that step is no longer required. With the latest software image.Programming Laboratory III (2014-15) *Older software images require you to EJECT the BEAGLE_BONE drive to start the network.

 Copy commands: Copying a computer program to the BeagleBone black If you want to copy a program you have written on your computer to the BeagleBone.168.2:/root/myProgram. To copy from computer to BeagleBone. You can do it using the scp command.py root@192. The scp command can be used in the following ways. Syntax: scp source_file_location><user_name@ip_of_remote_host:destination_location> Example: scp myprogram. featuring familiar Arduino function calls.Department of Computer Engg.7. Pune .7.py /home/XYZ/Documents DPCOE.  BoneScript Bonescript is a Node.168.js library specifically optimized for the Beagle family. exported to the browser.2:/root/ To copy from BeagleBone to Computer Syntax: scp<user_name@ip_of_remote_host:source_location><destination_location> Example: scp root@192.Programming Laboratory III (2014-15) Note: The instructions on that page are general and are not guaranteed to work on every Linux distribution. The BoneScript library provides several functions useful for interacting with your hardware.

type the following terminal: ssh root@192.2 4. SSH: SSH (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. when we were typing the ssh command the shell we were getting was of the computer.Department of Computer Engg.Programming Laboratory III (2014-15) 3 Getting SSH Access SSH is used to take control of the BeagleBone Black to get a root shell access to the bone. Whatever the commands we type here now will run on the BeagleBone Black. 3. SSH connects and logs into the specified host name (with optional user name).7. type yes and press Enter. 2.168. As you can see in the image below. Wait for the notification of active wire connection. DPCOE. The user must prove his/her identity to the remote machine using one of several methods depending on the protocol version used. Connect the BeagleBone to your computer with the USB cable provided. Procedure: 1. But after getting access to BeagleBone Black. Pune . it is executed on the remote host instead of a login shell. we are getting the shell of the root user on the BeagleBone. If prompted. Press (Ctrl+Alt+T) to open a terminal. If command is specified.

Pune .Department of Computer Engg.change file ownership DPCOE.Programming Laboratory III (2014-15) List of common Linux commands:  pwd .list directory contents  chown .show current directory  chmod .change current directory  permissions  ls .change file  cd .

show list of man pages find .copy files  gzip .Programming Laboratory III (2014-15)  cp .create/extract file archives DPCOE.show disk usage  mkdir .compress a file  mv .get help on command  apropos .progressively dump file  vi .decompress a file  rm .remove files  du .make directory  rmdir .set environment variable  history .edit file (simple)  head .remove directory  cat .print/dump value  env .edit file (complex)  nano .search dump for strings  man .Department of Computer Engg.dump environment variables  export . Pune .search for files  tar .dump command history  grep .move files  gunzip .dump file contents  less .trim dump to top  echo .

Hence it can be used to program with any language of your choice. You can type your code for python in the editor. Writing your first program using Python: To write the program on terminal we will use a simple text editor for terminal called as 'Nano'. For writing our first program on the BBB we'll use python and C. A simple hello world in Python will be print “HelloWorld” To save the code press Ctrl + X and press Y and then Enter. root@beaglebone:~# python HelloWorld.Department of Computer Engg.py The above command will start the Nano text editor and create the file HelloWorld.py file. All the keyboard shortcuts for nano are listed at the bottom of the nano interface. Pune .py DPCOE. nano HelloWorld. To get started we'll need a shell access to the BeagleBone. The program's output can be seen in the following way.Programming Laboratory III (201415) 4 Running your First Program on the BeagleBone Black BeagleBone is a complete single board computer (SBC). To write a HelloWorld program using nano on terminal type the following on terminal.

Pune . return 0. To compile the code type root@beaglebone:~# gcc HelloWorld.Programming Laboratory III (201415) OUTPUT: Hello World Writing your first program using C: To program in C the similar procedure as done for python can be used.c To view the output of code type root@beaglebone:~# . Open the Nano text editor and create the HelloWorld.c file root@beaglebone:~# nano HelloWorld.c Type your code for the program in the window of the Nano text editor. h> int main(void) { puts(“\n\t Hello World”). Simple hello world program for C would be #include<stdio.Department of Computer Engg. } Save the program using Ctrl + X and press Y and enter.out DPCOE./a.

Department of Computer Engg. Pune .Programming Laboratory III (201415) OUTPUT: Hello World DPCOE.