Rochester Institute of Technology BeagleBoard Workshop

gatecircleMobile - Wireless

Dec 10, 2013 (3 years and 8 months ago)

210 views


Rochester Institute of Technology


BeagleBoard Workshop

Gerald Coley

gerald@beagleboard.org



December 2
nd

, 2010

Agenda


The Embedded Processor Evolution


Introduction to the BeagleBoard


Hands On #1


Board Power
-
up, explore Desktop,


In Linux, everything is a file


Hands On #2


Toggle LEDs, read switches, read I2C, and USB


GUI building with Qt


Hands On #3


Toggle an LED from a GUI


Getting help from peer developers


Expanding the BeagleBoard


Questions

The Embedded Evolution


The embedded world is changing


QUIZ

What has a 7” LCD, Touchscreen, BT, WIFI, Power management, and
Sensors?


Classical embedded processors can’t handle these new
requirements


Applications demand more capabilities



Connectivity


Application infrastructure and SW reuse


On
-
demand performance


Complex Power Management


Time to market


The new embedded world holds a wealth of opportunities


ARM
®

is leading the way in the Embedded Evolution

Find the right ARM
®

Solution for you


32
-
bit ARM

Cortex

-
M3

MCUs


DSP

DSP+ARM


ARM

Cortex
-
A8 &

ARM9™ MPUs

Stellaris
®

ARM

Cortex
-
M3

Sitara


ARM

Cortex
-
A8

& ARM9

C6000


DaVinci


Digital Media processors

Integra



Up to

80 MHz

Flash

8 KB to 256 KB


USB, ENET

MAC+PHY CAN,

ADC, PWM, SPI

Connectivity,Security,

Motion Control, HMI,

Industrial Automation

$1.00 to $8.00

32
-
bit ARM

MCU for


Safety
-
Critical

Applications

TMS570

ARM

Cortex
-
R4


Up

to

250

DMIPS/

160 MHz


2 MB Flash,

160 KB RAM

FPU, ECC, Timer/PWM

Co
-
Proc,

12bit

ADCs,

CAN,

EMIF, LIN, SPI, Flexray

Transportation, Motor

Control, Certified for use in

safety critical (SIL3) systems

$7.00 to $18.00

375MHz to

>1GHz


Cache,

RAM, ROM

USB, CAN, SATA,

SPI, PCIe, EMAC


Industrial automation,

POS & portable

data terminals

$5.00 to $25.00

300MHz to >1Ghz

+Accelerator


Cache


RAM, ROM


USB, ENET,

PCIe, SATA, SPI


Floating/Fixed Point

Video, Audio, Voice,

Security, Conferencing


$5.00 to $200.00

Comprehensive developer ecosystem

Software support

Development tools

Responsive design support

ARM
®

Cortex™
-
A8 : Block Level

Integrated NEON co
-
processor for media and
signal processing



2 to 4x performance
improvement



Integer and Floating Point
support



VFPv3
-
IEEE754 compliant
(single and double
precision) floating point
support.

Advanced Dynamic Branch
Prediction



95% accurate across
industry benchmarks

Integrated L2 Cache

256KB (low latency/high
BW i/f w/L1)



Optimizes access to
larger data sets and
minimizes bus traffic

High speed Level 1 Caches
(16KB)



Dual 32 entry memory
translation TLB

Support for ARMv7



Added new support for
Thumb
-
2, Thumb
-
2EE(,Jazelle
-
RCT) and
NEON

Dual issue In
-
Order
Superscalar Pipeline


2.0 DMIPS/MHz

> 3,200 participants and
growing

Open access to hardware
documentation

Wikis, blogs/RSS,
promotion of community
activity

Free

software

Freedom to
innovate

Personally
affordable

$125/$149

Active &
technical
community

Opportunity
to tinker and
learn

Android, Ubuntu,
Angstrom, FFmpeg,
MeeGo, Symbian, …

Community Development

®

Why such an active community?


Low cost for the same core processing as used in
more expensive, yet popular, commercial products


Focus on open source, open hardware and DIY


>25,000 boards sold exclusively in small quantities


All design, test, web, etc. materials shared


Teaching tool for high
-
level OS on embedded


Ubuntu, Debian, Angstrom, Gentoo, WinCE, Symbian, QNX, and many others


The BeagleBoard community shares


Over 150 registered projects on BeagleBoard.org


Part of the Google Summer of Code with 6 projects to improve Linux, XBMC, and
other open source


Average of around 5 articles or blog posts per day


Over 3,200 English
-
language mailing list subscribers with additional dedicated mailing
lists in Japanese and Portuguese and numerous project oriented mailing lists in dozens
of languages


Hundreds of followers on each of Facebook, Twitter, and LinkedIn


Rich ecosystem using the design materials


Compatible or enhanced system
-
on
-
module/computer
-
on
-
module designs


See
http://beagleboard.org/resources



Innovative mobile computers (TouchBook)


Radios (BeagleBrick)


Modular rapid prototyping development systems (Bug2.0)


And many add
-
ons…

Affordable

Freedom to
tinker at all
levels

Lots of open
starting points

Large and
experienced
community

Open
ecosystem
provides real
options

Peripheral I/O


DVI
-
D video out


SD/MMC+


S
-
Video out


USB 2.0 HS OTG


I
2
C, I
2
S, SPI,

MMC/SD


JTAG


Stereo in/out


Alternate power


RS
-
232 serial


3.1”

OMAP3530 Processor



720MHz Cortex
-
A8



NEON+VFPv3



16KB/16KB L1$



256KB L2$



430MHz C64x+ DSP



32K/32K L1$



48K L1D



32K L2



PowerVR SGX GPU



64K on
-
chip RAM

POP Memory



256MB LPDDR RAM



256MB NAND flash


USB Powered



2W maximum consumption



OMAP is small % of that



Many adapter options



Car, wall, battery, solar, …

BeagleBoard C4…$125

Peripheral I/O


DVI
-
D video out


SD/MMC+


S
-
Video out


USB HS on
-
the
-
go


I
2
C, I
2
S, SPI,

MMC/SD


JTAG


Stereo in/out


Alternate power


RS
-
232 serial

On
-
going collaboration at
BeagleBoard.org


Live chat via IRC for 24/7 community support


Links to software projects to download

And more…

Other Features



4 LEDs



USR0



USR1



PMU_STAT



PWR



2 buttons



USER



RESET



4 boot sources



SD/MMC



NAND flash



USB



Serial


3.1”

10

BeagleBoard

xM


2,000 Dhrystone MIPS performance
with ARM
®

Cortex

-
A8


512MB POP memory enabling


Native builds of Ubuntu and other distros


More multitasking with complex apps like
Firefox or OpenOffice.org


Robust expansion with more direct
connectivity without external hubs; on
-
board Ethernet and five USB 2.0 ports


USB
-
powered board via low power
processor integration


Active and growing open source
community at beagleboard.org

$149

xM means

Extra MHz

and

Extra MB

Laptop
-
like performance

DM3730 processor

(AM37x
-
compatibile)


1GHz superscaler
ARM
®

Cortex

-
A8


More than 2,000
Dhrystone MIPS


Up to 20 Million
polygons per sec
graphics


512KB L2$


HD video capable
C64x+


DSP core

POP Memory


512MB LPDDR RAM

3.25”

DM3730


LCD Expansion


I
2
C, I
2
S, SPI, MMC/SD
Expansion


DVI
-
D


Camera Header


S
-
Video


JTAG


4
-
port USB 2.0 Hub**


Stereo Out


Stereo In


10/100 Ethernet


USB 2.0 HS OTG


Alternate Power


RS
-
232 Serial


microSD Slot


BeagleBoard
-
xM details

Use your BeagleBoard like a desktop

Stereo in

SD

Power

DVI
-
D

USB

Stereo out

Take your BeagleBoard anywhere &
crank code on the go

Power

over USB

Serial
Port

Hands On #1 ….Boot your board

14


Hands On #1
…Connect the
Display

Display Connector

Be careful when connecting a TV.
Most of the time the default timing is
not compatible.

Connect cable to the Board

Confirm cable is connected to monitor

Hands On #1
…Connect the
Keyboard & Mouse

Keyboard

Mouse

Connect the Keyboard to one of the USB ports

Connect the Mouse to one of the USB ports

Hands On #1
…Insert the SD
Card

Be careful not to exert
upward pressure on
the card when
inserting it.

Insert the SD card printing side up

Hands On #1
…Optional
Stuff...Debug Port

-
Requires a USB to Serial Cable or a straight cable

-
Laptop or a PC

-
Terminal SW set to 115K,8,n,1, no handshaking


Connect the serial cable here

Hands On #1
…Connect the
Power

Be careful doing this and
make sure you have 5V
supply and the correct
polarity of power supply.

Connect 5V supply here

Hands On #1
…Board Powers Up

1) Power LED comes on

2) User0/1 LEDs comes on

3) User0 LED blinks

4) User1 LED flashes

Hands On #1
…Board Boots


Angstrom Screen


Mouse pointer


Login Screen


Do nothing


White screen and Mouse pointer


Matrix Application Launcher


Hands On #1

TI Matrix GUI


Web browser with HTML code served up
from the board


Written in Qt


Includes ability to launch apps


click

3D

Graphics

click

Chameleon

close window

select

Main

select

Exit



Just one of the desktop options as part of the
Angstrom Distribution


Menu bar at top gives list of installed programs


Add other applications using ‘opkg’


select

Applications

Scroll down the Menu

close window



Hands On #1
…Angstrom
Gnome
Desktop


Monitors the system performance


Displays CPU loading

select

Applications

select

System Tools

click

System Monitor

click

Resources Tab

close

Window


Hands On #1
…System Monitor


Sets System Speed


click

1GHz Icon

click

600MHz

click

600 MHz Icon

click

1GHz

Hands On #1
…Frequency Scaling


GNOME Multimedia player


Comes standard in Desktop Image


Big Buck Bunny is an open source movie from the
Peach
Open Movie Project
.

double Click

BigBuck Icon

close Window

Hands On #1
…Multimedia Player


Allows direct access to the Linux Kernel


Enter Linux Commands


Can also use an external debug port over the serial
port

select

Applications

select

Accessories

select

Terminal

type

ls
-
al

Hands On #1
…Linux Command Line

Learning about Linux through SYSFS

In Linux, everything is a file

Thanks to Bill Gatliff

The file interface abstraction


What can we do with files?


open, read, write, close, delete


What is an ‘ioctl’?


Gets you to the HW!


What is a virtual file system?


Looks like a file, but executes code in the driver


Not really storing anything to media


A bit like a “ram disk”


What is SYSFS?


Virtual file system that exposes drivers
to userspace


mount


sysfs on /sys type sysfs (rw,realtime)


/sys/devices


driver hierarchy


/sys/bus


symbolic links to bus owners


/sys/class


common interfaces


/sys/block


block interface



Let’s go thru some examples…

Hands On #2…..Test USR0 and
USR1 LED

31


type

cd /sys/class/leds; ls

type

ls "beagleboard::usr0"

type

cat "beagleboard::usr0/trigger“

USR0 LED will Turn on and off.

select

Applications

select

Terminal

type

testled

Cycles through a short LED test

Hands On #2…Reading the User
Button

32


type

cd /sys/class/gpio; ls

type

echo “4“ > export; ls


type

echo "in“ > gpio4/direction

type

cat gpio4/value

type

readgpio 4

press

User Button



press

<ctrl> C
to stop


Hands On #2…Reading Events


33


type

opkg install evtest


press

<ctrl> C
to stop

type

evtest /dev/input/event3

move

the Mouse

press

<ctrl> C
to stop


When the mouse is moved, events are triggered
and sent via the USB port to the processor

Hands On #2…Reading I2C Bus

34


type

cd /sys/bus; ls

type

cd i2c/devices; ls

type

echo "eeprom 0x50” > i2c
-
3/new device; ls

type

i2cdump
-
y 0x3 0x50 b



type

fbset


Read the EEPROM inside the display
that provides information about that
display.

Hands On #2…Reading USB Ports

35


type

cd /sys/bus/usb/devices; ls

type

cat usb1/speed

type

cat usb?/manufacturer

type

lsusb

close Terminal Window



Read what USB devices are
connected to the processor

GUI building with Qt

Qt C++ framework is just one option for creating
graphical applications, but it is fast, flexible, cross
-
platform and well
-
supported by an open source
community

Thanks to Gregg Lebovitz of ICS

Qt architecture

Qt Creator

http://qt.nokia.com



Integrated development environment


Runs on Windows, Mac, or Linux


Designer for your GUIs


C++ editor and debugger


Build your GUI on your PC, then move it over to the
BeagleBoard to add I/O, etc.


Angstrom Linux

distribution has

the compiler and

libraries ready

to build Qt apps

natively on your

BeagleBoard



Lots of different GUI tools


Many other programming tools,

like networking,

IPC, 3D, database,




open Terminal Program

type

qtdemo

close Window

Hands On #3…Qt Demos

Hands On #3


Button & LED GUI

close Terminal Program

open

Labs from desktop

type

cd lab2; ls

al

type

gedit ./lab2.cpp &

close GEDIT

type

qmake2 && make

type

./lab2

click

Push me!

Watch the Flashing LED on the
board

close the application

How to work in the Linux community

Getting help from your peers

Baseline tools and software

http://beagleboard.org/resources



Hardware verification procedure (
http://beagleboard.org/support
)


GPL x
-
load, u
-
boot, Linux kernel, and demo distro for validation


Code images, procedure, and sources are provided to verify the board
functionality


GPL ARM GNU compiler collection (GCC)


Code Sourcery version 2009q1 is the latest supported by TI


Runs on Linux/Windows and generates ARMv7/Thumb2


Angstrom version is utilized in ESC training and demo image on xM


Access to C6000 with compilers and open source software


Free TI C6000 compiler for non
-
commercial use


x86
-
Linux hosted (ARM hosted version in evaluation)


GPL GCC compiler in progress (
http://linux
-
c6x.org
)


C6Run (DSPEasy) project to simplify development model


BSD/GPL DSP/Link interface software


Free 3D graphics libraries (OpenGLES 2.0)


Free production audio/video codecs for the DSP

How to ask for help

http://catb.org/~esr/faqs/smart
-
questions.html



Know the on
-
line resources


Know the on
-
line community


Know the manual


Listen to the answers


Pay for performance


Share the answers you find

43


Order of resources

1.
Search beagleboard.org, eLinux.org, the mailing list archive, and
IRC logs

2.
Read and search BBSRM_latest.pdf

3.
Check the
http://beagleboard.org/faq

link

4.
Search the web

5.
Try something


Gives you some perspective on what to ask

6.
Ask on IRC and be patient/polite


Doesn’t disrupt everyone

7.
Mailing list


Individual developers will go away if load isn’t shared


44


The community perspective


Earn respect by saying what you’ve done and how you’ve
tried to find an answer


Where did you search?


What did you try on the board?


You aren’t entitled to an answer


Show that you are willing to work for it and the
community will feel you are a part of it


Impatience implies that your time is more valuable than
others in the community




45


Chat, mail, forums, blogs, and wikis!


All exist because they all solve different problems


Chat allows you to know someone’s listening

http://beagleboard.org/chat

or
#beagle on irc.freenode.net


Great for beginner questions and rapid coordination


Mail allows you to reach almost anyone

http://groups.google.com/group/beagleboard



Brings larger group into the conversation


Provides you with a personal log in your inbox


Forums helps get the threads organized

https://community.ti.com/forums/32.aspx

(minimal activity to avoid
disrupting community critical mass)


Blogs provide emphasis, filtering, and timeliness

http://beagleboard.org/news

and
http://beagleboard.blogspot.com



Wikis enable inputs to become documentation

http://eLinux.org/BeagleBoard

and
http://code.google.com/p/beagleboard/wiki

Chat on IRC


http://webchat.freenode.net


#beagle: discussion of the BeagleBoard


#gst
-
ti: discussion of GStreamer with TI DSP components


#ubuntu
-
arm: discussion of Ubuntu on ARM processors


#rowboat: discussion of Android on OMAP & Sitara devices


#linux
-
omap: discussion of OMAP Linux kernel


IRC clients


http://beagleboard.org/chat



http://pidgin.im


http://www.mirc.com


http://en.wikipedia.org/wiki
/List_of_IRC_clients


http://www.ircreviews.org/clients



Angstrom and Open Embedded

http://www.angstrom
-
distribution.org/demo/beagleboard


Angstrom is what you are running

Ubuntu

https://wiki.ubuntu.com/ARM/Beagle

Most popular Linux distribution


Has support for the BeagleBoard (Netbook, server, and network installers)

Android

http://arowboat.org


At least half
-
a
-
dozen companies provide commercial support for Android on the
BeagleBoard;Rowboat is the one endorsed by TI

MeeGo

http://wiki.meego.com/ARM/Meego_on_Beagleboard_from_scratch



The combination of Moblin and Maemo



48


OSs and Distributions

Gentoo

https://www.slashorg.net/48
-
Gentoo
-
port
-
for
-
BeagleBoard.html


The Linux distribution the BeagleBoard.org web server runs


Builds ARM applications both natively and cross


QNX

http://www.qnx.com/products/reference
-
design/ti
-
reference
-
design.html



Not Linux, but Posix compliant and real
-
time


Symbian

http://developer.symbian.org/wiki/index.php/BeagleBoard_Quick_Start


Most popular smart phone operating system


Initial open source release was on the BeagleBoard



49


OSs and Distributions

WinCE

http://beagleboard.org/esc



Advanced GUI and code tools


Lots of code libraries available


Low
-
cost entry through “Spark”

50


Expanding the BeagleBoard


Create your own expansion cards


Rev C4 does not come with expansion
connectors
(Can be added by user)


-
xM does come with connectors


Mounting holes are the same


Common connectors in the same place

Gerber and CAD files
available to assist in
making your own PCB

Expansion Cards &

Accessories

ZIPPY

ZIPPY2

TRAINER

VGA ADAPTER

LCD DISPLAY

PLASTIC CASE

METAL CASE

Cables & Supplies

Available Resources


Beagle Hardware Documentation



http://beagleboard.org/hardware/design


Processor Documentation


http://focus.ti.com/docs/prod/folders/print/omap3530.html


Add
-
On Boards and Accessories


http://www.beagleboardtoys.com/


http://www.tincantools.com/home.php?cat=255


https://specialcomp.com/beagleboard/index.htm





Thank you!


g
-
coley1@ti.com


gerald@beagleboard.org



http://beagleboard.org/discuss

==========================


jdk@ti.com


jkridner@beagleboard.org


http://beagleboard.org/chat



IRC nickname: jkridner