MicroEmbedded Technologies, Pune. A user manual for Using the BeagleBone Black with Linux Host.

Similar documents
December 1, 2015 Jason Kridner

November 3, 2015 Jason Kridner

Development Environment Embedded Linux Primer Ch 1&2

Beaglebone green User Manual

Z-Stack Linux Gateway Quick Start Guide Version 1.0

Introducing the AM57x Sitara Processors from Texas Instruments

FreeBSD and Beaglebone Black, a robotic application.

MYD-C437X-PRU Development Board

pcduino V3B XC4350 User Manual

MYC-C437X CPU Module

Hands-on with the Sitara Linux SDK

Yocto Project and OpenEmbedded training 3-day session

COPYRIGHTED MATERIAL. Introduction to the Platform CHAPTER 1

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

LinkSprite Technologies,.Inc. pcduino V2

Embest SOC8200 Single Board Computer

Intel Galileo gen 2 Board

Introduction to Sitara AM437x Processors

A Low Cost Internet of Things Network for Contamination Detection in Drinking Water Systems Using Raspberry Pi

ARTiGO A600 Linux EVK v1.2.1

Assignment 1: Build Environment

参考資料. LinkSprite.com. pcduino V2

Using echo command in shell script

Android System Development Training 4-day session

Hugo Cunha. Senior Firmware Developer Globaltronics

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Lab 0: Intro to running Jupyter Notebook on a Raspberry Pi

MYD-SAMA5D3X Development Board

IOT HARDWARE SUBSTRUCTURE

DevKit8500D Evaluation Kit

Matrix. Get Started Guide V2.0

MYD-C7Z010/20 Development Board

MYC-C7Z010/20 CPU Module

Baltos ir Contact Online. More Pictures. Click on the thumbnails for the large picture

Topics. What is a RaspberryPi? Why should I want one? What is Raspbian? What is SSH? What is FTP? What is LAMP? Making a LAMP Stack!

First Steps. esom/sk5 esom/3517 Embedded Linux Starter Kit

XLink Kai Raspberry Pi Beginners Tutorial

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

HC-3120 Linux-Ready Cortex-A8 Industrial 12 HMI Computing (Hardware) User Guide

IoT with Intel Galileo Gerardo Carmona. makerobots.tk

Lesson 7 Programming Embedded Galileo, Raspberry Pi, BeagleBone and mbed Platforms

Quick Start Guide for BeagleBone. Table of Contents. by Brian Fraser Last update: Sept 24, 2017

First Steps. esom/sk4 esom/3517 Embedded Linux Starter Kit

Open Sesame. Grant Apodaca Jeffrey Bolin Eric Taba Richie Agpaoa Evin Sellin

Dell IoT Gateway 5500 Edge MicroServer Setup Guide

Cooking with Team 279

DevKit7000 Evaluation Kit

SABRE Board for Smart Devices

Husarion CORE2. Husarion CORE2 is a development board for Internet-connected automation & robotic devices.

The Use of BeagleBone Black Board in Engineering Design and Development

Embedded Technosolutions

Manual of ET-LCD SW HAT

System Manager Unit (SMU) Hardware Reference

Lab 5a Shell Script Lab 4 Using Arithmetic Operators in shell script

PocketBeagle beagleboard.org. PocketBeagle, the tiniest $25 key-fob computer you can buy

Matrix. Get Started Guide

Spring 2017 Gabriel Kuri

Panther. CNC Cape for Beaglebone Black. Users Manual. Version 1.1. Warning!

Guide to your Plug Computer

SABRE Board for Smart Devices

Lab #5 Guide: Installing Ubuntu as a Virtual Machine

Lab: Setting up PL-App with a Raspberry Pi

Get Started SUPPORT WARRANTY. Visit the i.mx community at

Pengwyn Documentation

ARDUINO YÚN MINI Code: A000108

CSE 351. Introduction & Course Tools

Unwired One. Main Features. Wireless embedded computer

Programming the Raspberry Pi

Jade IdeaBoxx. The quickstart kit to jumpstart development. Fujitsu Semiconductor America Inc.

BLUETOOTH BASED OFFICE AUTOMATION AND SECURITY SYSTEM USING RASPBERRY PI AND ANDROID APPLICATION

Stellaris LM3S3748 Evaluation Kit README FIRST

μc/probe on the element14 BeagleBone Black

SBC8140 Single Board Computer

NXP i.mx 6 UltraLite Evaluation Kit Edge MicroServer Installation and Setup Guide. Version 1.0

Overview of the Raspberry Pi Models 3B & 2B

DT7816 Linux Data Acquisition Real-Time High Performance ARM Module for Embedded Applications

RX300 Settings Manual General

MYD-JA5D2X Development Board

CompTIA A+ Accelerated course for & exams

SBC3100 (Cortex-A72) Single Board Computer

LinX Software Suite v3 Getting Started

HARDWARE AND OPERATING SYSTEMS

ArduCAM CC3200 UNO board

FriendlyELEC NanoPi Fire3 - Octa-Core Samsung S5P6818 Cortex-A53, 400M Hz - 1.4G Hz

Pianoteq 6 Raspberry Pi 3 Station. By Edgar Bustamante

i.mx 6UltraLite Evaluation Kit Quick Start Guide s datasheet has been downloaded from at this pag

SABRE for Automotive Infotainment Quick Start Guide. Smart Application Blueprint for Rapid Engineering Based on the i.mx 6 Series

Copyright. Getting Started with Arduino Wiring for Windows 10 IoT Core Agus Kurniawan 1st Edition, Copyright 2016 Agus Kurniawan

Section Objective: Acquaint with specifications of Launchpad Acquaint with location of switches, LEDs, power-on switch, powering the board.

Windows " Intel Apollo Lake N3350 Clamshell Laptop

Ten (or so) Small Computers

imx6 TinyRex Development Kit QUICK GUIDE

ARM Powered SoCs OpenEmbedded: a framework for toolcha. generation and rootfs management

iw-rainbow-g3 / G3V FAQs:

CODESYS Control for BeagleBone SL

Raspberry Pi based MP3 jukebox with USB display board 2014 Russell Kramer

Getting started with Raspberry Pi (and WebIoPi framework)

Installation of the DigitalSystemsVM virtual machine

Embedded Linux kernel and driver development training 5-day session

IOT-GATE-iMX7 Datasheet

Transcription:

MicroEmbedded Technologies, Pune. A user manual for Using the BeagleBone Black with Linux Host.

Introduction to BeagleBone Black.... 3 1.0. Connecting the BeagleBone Black (BBB) with the PC.... 5 1.1. Connecting the BBB to the Host PC using USB and Login using SSH.... 5 1.2. BBB: Logout / Power OFF.... 5 2.0. File Transfer operations.... 6 2.1. Copying the files from the Host PC to BBB.... 6 2.2. Copying the files from the BBB to Host PC.... 7 3.0. Compiling and Executing the Programs.... 8 3.1. Compiling and executing C / C++ programs.... 8 3.2. Executing python programs.... 8 3.3. Compiling and Executing PL-3 Assignments.... 9 3.4. Compiling and Executing PL-IV Assignments.... 11 3.4.1. Parallel interface DAC-DAC08.... 11 3.4.2. I2C ADC/DAC : PCF8591.... 12

Introduction to BeagleBone Black. The BeagleBone Black is the newest member of the BeagleBoard family. It is a lower-cost, highexpansion focused BeagleBoard using a low cost Sitara XAM3359AZCZ100 Cortex A8 ARM processor from Texas Instruments. The BeagleBone is a compact, low cost, open source Linux computing platform that can be used to build complex applications that interface high level software and low level electronic circuits. It is an ideal platform for prototyping project and product designs that take advantage of the power and freedom of Linux, combined with direct access to input/output pins and buses, allowing you to interface with electronics components, modules, and USB devices. The characteristics of the BeagleBone platform are that it is powerful, as it contains a processor that can perform up to 2 billion instructions per second, is low cost, available for as little as $45 $55, supports many standard interfaces for electronics devices, uses little power, running at between 1 W (idle) and 2.3 W (peak), is expandable through the use of daughterboards and USB devices, is supported by a huge community of innovators and enthusiasts, and is open hardware and supports open software tools and applications. The BeagleBone runs the Linux operating system, which means that you can use many opensource software libraries and applications directly with it. Open source software driver availability also enables you to interface devices such as USB cameras, keyboards and Wi Fi adapters with your project, without having to source proprietary alternatives. Therefore, you have access to comprehensive libraries of code that have been built by a talented open source community; however, it is important to remember that the code typically comes without any type of warranty or guarantee. If there are problems, then you have to rely on the good nature of the community to resolve them. Of course, you could also fi x the problems yourself and make the solutions publicly available. The BeagleBone platform is formed by the integration of a high performance microprocessor on a printed circuit board (PCB) and an extensive software ecosystem. The physical PCB is not a complete product; rather it is a prototype reference design that you can use to build a complete product. It is an open hardware platform, meaning that you can download and use the BeagleBone hardware schematics and layout directly within your own product design. In fact, despite the impressive capability of the BeagleBone platform, it does not fully expose all of the features and interfaces of the Texas Instruments Sitara AM335x microprocessor. BeagleBone Black is a low-cost, community-supported development platform for developers and hobbyists. Boot Linux in under 10 seconds and get started on development in less than 5 minutes with just a single USB cable.

Processor: AM335x 1GHz ARM Cortex-A8 512MB DDR3 RAM 4GB 8-bit emmc on-board flash storage also additional storage via SD card. 3D graphics accelerator NEON floating-point accelerator 2x PRU 32-bit microcontrollers Connectivity USB client for power & communications USB host Ethernet HDMI 2x 46 pin headers (P8 and P9)

1.0. Connecting the BeagleBone Black (BBB) with the PC. There are 3 methods using which we can use the BeagleBone Black kit. 1. Standalone: you can connect the BBB using the HDMI cable and USB hub. The HDMI cable is connected to the HDMI monitor and USB hub is connected to a USB keyboard and USB mouse. This is like using the BBB as a CPU. 2. Connected to Host using VNC: using the BBB in a network and connecting to the Host using VNC. 3. Connected to Host using USB Device: this is the most preferred method for system developers. The BBB is connected to the Host using the USB device connection. 1.1. Connecting the BBB to the Host PC using USB and Login using SSH. For development purposes the BBB is connected remotely to the PC via SSH (secured shell). Connect the BBB to the PC using the USB cable: the Host end to the PC and the device end to the BBB (micro USB connector just below the LAN connector). The BBB will be powered ON and the USER LED s will blink randomly, the BBB will boot the debian Linux OS on the board. Once booted, the BBB will show itself as a mass storage device (boot or BEAGLEBONE drive). Now open a Linux terminal on your Host PC. On the (# or $) prompt type the following command; ssh root@192.168.7.2 [press enter key] 192.168.7.2 is the default IP address of the BBB (Ethernet over USB interface- USB0). The BBB will get remotely connected with the PC and the terminal will now show the BeagleBone prompt root@beaglebone:# You can now go to the /home directory and see the files in file system: The /home should be the default location for all user data. As a good practice keep all user data in home directory. Do not use other location for storing data. cd /home [press enter key] 1.2. BBB: Logout / Power OFF. When the user wants to logout from the BBB the command is ; exit [press enter key] but this will just logout the user from the BBB shell. The BBB will still be available for connection. When the user wants to shutdown the BBB he can type the following command; shutdown h now &&exit [press enter key] Or poweroff [press enter key]

2.0. File Transfer operations. There are many scenarios where one may want to do file transfer operations between the BBB and Host PC. The user may develop the code in C, C++ or Python on the PC using his favorite editor (vi, nano, gedit, emacs etc), but this code needs to be transferred to the BBB for compilation and/or execution purpose. The user can compile the code on the PC using a cross compiler and transfer the executable to BBB for execution. 2.1. Copying the files from the Host PC to BBB. When the user wants to transfer files from the Host PC to the BBB he can do the following; Open a terminal on Linux (shortcut : CTRL +ALT+ T) In the terminal go to the directory where your file is located on the PC. To transfer the file we will use secure copy command; scp source_filename root@192.168.7.2:/home [press enter key] scp is the command for transferring the file from one terminal to remote terminal using Ethernet. source_filename is the name of the source file to be transferred root@192.168.7.2:/home is the remote address, where root is the login name and /home is the directory in which the file is to be transferred. To transfer multiple file use the command; scp file1,file2,...,filen root@192.168.7.2:/home [press enter key] Note1: user can execute the scp command only if user has logged into the BBB as shown in 1.1. Note2: when you transfer a executable you need to change the file permissions (using chmod +x filename) for the particular file in order to execute it. Example: The host PC has a login for students with the username being student. The task is to transfer a file helloworld.c located in the home folder on the PC to /home directory in BBB. Solution: Open a terminal on the PC (shortcut: CTRL +ALT+ T). In the terminal go to the home folder for the student; cd /home/student [press enter key] the home folder for the student login is located in /home/student. Now execute the scp command to transfer the file from host to BBB. scp /home/student/helloworld.c root@192.168.7.2:/home [press enter key] This will now have copied the command from the PC to the BBB.

2.2. Copying the files from the BBB to Host PC. The user may need to copy some files from the BBB to the PC for viewing or some other purpose, for this we will follow the procedure as below; Open a terminal on the Host PC (shortcut: CTRL +ALT+ T). Execute the scp command on the host terminal; scp root@192.168.7.2:/home/filename /home/login_name/ [press enter key] scp is the command for transferring the file from one terminal to remote terminal using Ethernet. root@192.168.7.2:/home/filename is the complete path of the file filename (source file) on the BBB to be transferred /home/login_name/ is the location on the host pc where you want to store the transferred file. Example: The host PC has a login for students with the username being student. The task is to transfer a file mypic.jpg located in the home folder on the BBB to /home directory in PC. Solution: Open a terminal on the PC (shortcut: CTRL +ALT+ T). In the terminal go to the home folder for the student; cd /home/student [press enter key] the home folder for the student login is located in /home/student. Now execute the scp command to transfer the file from host to BBB. scp root@192.168.7.2:/home/mypic.jpg /home/student/ [press enter key] This will now have copied the command from the BBB to the PC. Note1: user can execute the scp command only if user has logged into the BBB as shown in 1.1.

3.0. Compiling and Executing the Programs. The source codes provided by us are arranged as below BeagleBoneBlack_PL/Practicals/PL3 for PL3 BeagleBoneBlack_PL/Practicals/PL4 for PL4 In order to compile and execute the C/C++ or python programs; Power the BBB with the 5V adapter. Connect the BBB to the PC using the USB cable. Login to the BBB using SSH. Transfer the code to BBB using SCP. Connect the relevant interface card and execute the code. Observe the output on the interface. 3.1. Compiling and executing C / C++ programs. To compile the C/C++ programs on the BBB go to the folder where the source file is located; For C: gcc program.c o outputname Where program.c is the name of the C source file and output name is the name of the executable. To execute the program:./outputname For C++: g++ program.cpp o outputname Where program.cpp is the name of the C++ source file and output name is the name of the executable. To execute the program:./outputname 3.2. Executing python programs. To execute python programs on the BBB go to the folder where the source file is located; python program.py Where program.py is the name of the python source file.

3.3. Compiling and Executing PL-3 Assignments. traffic.cpp (BeagleBoneBlack_PL/Practicals/PL3/A_02_traffic_cpp/traffic.cpp) Program: traffic.cpp. g++ traffic.cpp o traffic./traffic traffic.py Program: traffic.py (BeagleBoneBlack_PL/Practicals/PL3/A_02_traffic_python/traffic.py) python traffic.py elevator.cpp (BeagleBoneBlack_PL/Practicals/PL3/A_01_elevator_cpp/elevator.cpp) Program: elevator.cpp. Transfer the program to BBB using scp g++ elevator.cpp o elevator./traffic elevator.py Program: elevator.py (BeagleBoneBlack_PL/Practicals/PL3/A_01_elevator_python/elevator.py) python traffic.py cpu_freq_pwm.py Program:cpu_freq_pwm.py.(BeagleBoneBlack_PL/Practicals/PL3/B_01_cpu_freq_python/cpu_freq_pwm.py) Transfer the program to the BBB. Connect the CRO: Connect the signal wire of the probe to pin 14 on add-on cape and the ground wire of the probe to pin 26 on the add-on cape. (Make sure that pin 25 and 26 do not touch) Execute the following commands on the BBB terminal before executing the program; echo am33xx_pwm > /sys/devices/bone_capemgr.9/slots echo bone_pwm_p8_13 > /sys/devices/bone_capemgr.9/slots Execute the program on BBB: python pwm.py press enterkey. python cpu_freq_pwm.py Observe the waveform on the CRO.

SquareWave.py Program: SquareWave.py.(BeagleBoneBlack_PL/Practicals/PL3/B_01_cpu_freq_python/ SquareWave.py) Transfer the program to the BBB. Connect the CRO: Connect the signal wire of the probe to pin 13 on add-on cape and the ground wire of the probe to pin 26 on the add-on cape. (Make sure that pin 25 and 26 do not touch) Execute the program on BBB: python SquareWave.py Observe the waveform on the CRO. oddeven.c (BeagleBoneBlack_PL/Practicals/PL3/ B_04_odd_even_sort_c/oddeven.c) Program: oddeven.c. Transfer the program to BBB using scp gcc oddeven.c -fopenmp o oddeven./oddeven Executing the Set IP/Network application Program. To execute the setipnftp.py network based application program, we will have to run file server like vsftpd on Linux platform (your network admin will assist you in running the file server). Refer to the document FileTransfer_VSFTPD.pdf provided by us for this experiment. setipnftp.py Program: setipnftp.py (BeagleBoneBlack_PL/Practicals/PL3/B_08_network_ip_python/setIPnFTP.py) Note down the IP address of your network. In the program make the following changes; Assign the IP address in the network to the board IP_ADDR. For SERVER_IP give the IP address of your file server. In SERVER_USER give the login name of the PC and in SERVER_USER_PWD give the password of the login password of the user PC. python setipnftp.py stepper.py Program: stepper.py (BeagleBoneBlack_PL/Practicals/PL3/ C_01_stepper_python/ stepper.py) python stepper.py

3.4. Compiling and Executing PL-IV Assignments. 3.4.1. Parallel interface DAC-DAC08. The Parallel digital to analog converter DAC-08 is used for this conversion. Connect the CRO probe to Analog output connector (DAC out). sine_wave_dac.py Program: sine_wave_dac.py (PL4/Programs/PL4/Parallel/ sine_wave_dac.py) Python sine_wave_dac.py sq_wave.py Program sq_wave.py (Pl4/Programs/PL4/ Parallel / sq_wave.py) Python sq adc_sampling.py Program: adc_sampling.py. (Pl4/Programs/PL4/ Parallel / adc_sampling.py) Python sample adc_sample_logs.py Program: adc_sample_logs.py. (Pl4/Programs/PL4/ Parallel / adc_sample_logs.py) Python log sobel.py Program: sobel.py. (Pl4/Programs/PL4/sobel.py) Connect the camera before executing this program. python sobel.py After the program has executed it will create sobel_py.jpg and test_py.jpg files. Copy these files from the BBB to the Host as in 2.2. Open the files to see the effect of edge detection on the captured image.

3.4.2. I2C ADC/DAC : PCF8591. I2C based ADC / DAC PCF8591 is used for the conversion. sinewave.c Program: sinewave.c. (Pl4/Programs/PL4/I2C_ADC_DAC/sinewave.c) gcc sinewave.c o sine -lm./sine sq_wave.c Program: sq_wave.c. (Pl4/Programs/PL4/I2C_ADC_DAC/sq_wave.c) gcc sq_wave.c o sq -lm./sq triangular.c Program: triangular.c. (Pl4/Programs/PL4/I2C_ADC_DAC/ triangular.c) gcc triangular.c o tri -lm./tri adc_sampling.c Program: adc_sampling.c. (Pl4/Programs/PL4/I2C_ADC_DAC/ adc_sampling.c) gcc adc_sampling.c o sample -lm./sample adc_log.c Program: adc_log.c. (Pl4/Programs/PL4/I2C_ADC_DAC/ adc_log.c) gcc adc_log.c o log -lm./log