DAVE DIVELK User manual

ARM Cortex-A8 CPU Module Family
Lite Line
Diva Embedded Linux Kit (DIVELK)
Quick Start Guide

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
<Page intentionally left blank>
July, 2015 2/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
Table of Contents
1 Preface...................................................................................................................................5
1.1 About this manual...........................................................................................................5
1.2 Copyrights/Tra emarks...................................................................................................5
1.3 Stan ar s........................................................................................................................5
1.4 Disclaimers.....................................................................................................................5
1.5 Warranty..........................................................................................................................6
1.6 Technical Support...........................................................................................................6
1.7 Relate ocuments.........................................................................................................7
1.8 Conventions, Abbreviations, Acronyms..........................................................................8
2 Intro uction..........................................................................................................................10
2.1 DIVA SOM.....................................................................................................................10
2.2 Embe e Linux...........................................................................................................11
2.3 DIVELK.........................................................................................................................12
2.3.1 Kit Contents...........................................................................................................14
2.3.2 DIVELK Release Notes.........................................................................................15
2.3.2.1Version 2.1.0.....................................................................................................15
2.3.2.2Version 2.0.0.....................................................................................................15
2.3.2.3Version 1.0.0.....................................................................................................16
2.3.2.4Releases history................................................................................................16
3 DIVELK Quick Start..............................................................................................................17
3.1 Unboxing.......................................................................................................................17
3.2 Har ware setup.............................................................................................................18
3.3 First boot.......................................................................................................................18
3.4 DVDK installation..........................................................................................................20
3.4.1 DVDK features.......................................................................................................20
3.4.2 MicroSD contents..................................................................................................21
3.4.3 Importing the virtual machine................................................................................21
3.4.4 Launching the virtual machine...............................................................................23
4 Developing Environment......................................................................................................26
4.1 Intro uction...................................................................................................................26
4.2 Software components...................................................................................................27
4.2.1 Toolchain................................................................................................................27
4.2.2 Bootloa er.............................................................................................................27
4.2.3 Kernel....................................................................................................................28
4.2.3.1Linux Device Tree.............................................................................................28
4.2.4 Target root file system...........................................................................................29
4.2.5 Yocto......................................................................................................................29
4.3 Working with DIVELK...................................................................................................30
4.3.1 The buil system...................................................................................................30
4.3.2 Overview of the installe components..................................................................30
4.3.3 Setting up the server environment........................................................................32
July, 2015 3/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
4.3.3.1TFTP Server......................................................................................................32
4.3.3.2NFS Server........................................................................................................33
4.3.3.3Pre-built toolchain.............................................................................................33
4.3.3.4Pre-built root file system....................................................................................34
4.4 Buil ing the software components with Yocto..............................................................35
4.4.1 Prerequisites..........................................................................................................35
4.4.2 Initializing the buil environment...........................................................................36
4.4.3 Buil the Yocto image............................................................................................36
4.5 Buil ing the software components outsi e Yocto.........................................................37
4.5.1 Buil /configure U-Boot..........................................................................................37
4.5.2 Buil /configure Linux kernel..................................................................................38
4.5.3 Buil a custom application.....................................................................................39
5 DIVELK use cases...............................................................................................................40
5.1 DIVA Frequency Scaling...............................................................................................40
5.2 Forcing the kernel to use a limite amount of RAM.....................................................41
6 Frequently Aske Questions................................................................................................42
6.1 Q: Where can I foun DIVA SOM information?............................................................42
6.2 Q: I've receive the DIVELK package. How am I suppose to start working with it?. .42
6.3 Q: How can I up ate the DIVELK version?..................................................................43
6.4 Q: How can I work with the XYZ peripheral/interface?.................................................43
6.5 How can I configure the DIVA system to boot from network?......................................43
6.6 Q: Where can I foun information regar ing the PRUs?..............................................44
6.7 Q: Can you suggest some gui elines for the carrier boar esign?............................45
6.8 Q: The system oesn't boot anymore. On the serial console I see just “CCCC”
characters... Is there a recovery proce ure?........................................................................45
7 Appen ices...........................................................................................................................46
7.1 A: boot messages.........................................................................................................46
July, 2015 4/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
1 Preface
1.1 About this manual
This manual describes the DIVA Embedded Linux Kit (DIVELK)
and serves as a quick guide f r start w rking with the
devel pment kit.
1.2 Copyrights/Trademarks
Ethernet® is a registered trademark f XEROX C rp rati n.
All ther pr ducts and trademarks menti ned in this manual
are pr perty f their respective wners.
All rights reserved. Specificati ns may change any time with ut
n tificati n.
1.3 Standards
DAVE Embedded Systems is certified t ISO 9001 standards.
1. Disclaimers
DAVE Embedded Systems d es n t assume any resp nsibility
f r availability, supply and supp rt related t all pr ducts
menti ned in this manual that are n t strictly part f the DIVA
CPU m dule, the DIVAEVB-Lite carrier b ard and the DACU
carrier b ard.
DIVA CPU M dules are n t designed f r use in life supp rt
appliances, devices, r systems where malfuncti ning f these
pr ducts can reas nably be expected t result in pers nal
injury. DAVE Embedded Systems cust mers wh are using r
selling these pr ducts f r use in such applicati ns d s at their
wn risk and agree t fully indemnify DAVE Embedded
Systems f r any damage resulting fr m such impr per use r
sale.
July, 2015 5/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
1.5 Warranty
DIVA SOM, DIVAEVB-Lite and DACU are guaranteed against
defects in material and w rkmanship f r the warranty peri d
fr m the shipment date. During the warranty peri d, DAVE
Embedded Systems will at its discreti n decide t repair r
replace defective pr ducts. Within the warranty peri d, the
repair f pr ducts is free f charge pr vided that warranty
c nditi ns are bserved.
The warranty d es n t apply t defects resulting fr m impr per
r inadequate maintenance r handling by the cust mer,
unauth rized m dificati n r misuse, perati n utside f the
pr duct’s specificati ns r impr per installati n r
maintenance.
DAVE Embedded Systems will n t be resp nsible f r any
defects r damages t ther pr ducts n t supplied by DAVE
Embedded Systems that are caused by a faulty DIVA m dule,
DIVAEVB-Lite r DACU.
1.6 Technical Support
We are c mmitted t making ur pr ducts easy t use and will
help cust mers use ur CPU m dules in their systems.
Technical supp rt is delivered thr ugh email f r registered kits
S ftware upgrades are available f r d wnl ad in the restricted
d wnl ad area f DAVE Embedded Systems web site:
http://www.dave.eu/reserved-area. An acc unt is required t
access this area.
Please refer t ur Web site at
http://www.dave.eu/dave-cpu-m dule-am335x-diva.html f r the
latest pr duct d cuments, utilities, drivers, Pr duct Change
N tices, B ard Supp rt Packages, Applicati n N tes,
mechanical drawings and additi nal t ls and s ftware.
July, 2015 6/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
1.7 Related documents
Document Location
DAVE
Embedded
Systems
Developers Wiki
http://wiki.dave.eu/index.php/Main_Page
AM335x
Te hni al
Referen e Manual
http://www.ti. om/lit/ug/spruh73k/spruh7
3k.pdf
DIVA main page
on DAVE
Embedded
Systems
Developers Wiki
http://wiki.dave.eu/index.php/Category:D
iva
DIVA Hardware
Manual
http://www.dave.eu/sites/default/files/file
s/diva-hm.pdf
DIVA Software
Manual
http://wiki.dave.eu/index.php/Software_
Manual_(Diva)
AM335x Portal
(on TI Embedded
Pro essors Wiki )
http://pro essors.wiki.ti. om/index.php/Si
tara_AM335x_Portal
DIVAEVB-Lite
page on DAVE
Embedded
Systems
Developers Wiki
http://wiki.dave.eu/index.php/DivaEVB-Li
te
DACU User's
Guide
Provided with kit do umentation
Building
Embedded Linux
Systems By Karim
Yaghmour.
This book overs all matters involved in
developing software for embedded
systems. It is not a referen e guide, but
it provides a omplete and exhaustive
overview that helps the developer save
a lot of time in sear hing for su h
information on the Internet
July, 2015 7/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
Document Location
Training and Do s
se tions of Free
Ele trons website.
Brief but still exhaustive overview of the
Linux and Embedded Linux world.
Tab. 1: Related do uments
1.8 Conventions, Abbreviations, Acronyms
Abbreviation Definition
BTN Button
DIVELK DIVA Embedded Linux Kit
EMAC Ethernet Media A ess Controller
GPI General purpose input
GPIO General purpose input and output
GPO General purpose output
PCB Printed ir uit board
PMIC Power Management Integrated Cir uit
PRU Programmable Real-Time Unit
PSU Power supply unit
RTC Real time lo k
SOC System-on- hip
SO-DIMM Small Outline Dual In-line Memory
Module
SOM System-on-module
WDT Wat hdog
Tab. 2: Abbreviations and a ronyms used in this manual
July, 2015 8/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
Revision History
Version Date Notes
1.0.0 June 2013 First offi ial release
1.0.1 June 2013 Added pi tures
Minor fixes
1.0.2 January 2014 Minor fixes
1.0.3 O tober 2014 Updated for DIVELK 2.0.0 release
1.0.4 November 2014 Minor fixes
1.0.5 June 2015 Updated for DIVELK 2.1.0 release
1.0.6 July 2015 Minor fixes
July, 2015 9/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
2 Introduction
2.1 DIVA SOM
DIVA is a family f
system- n-m dules (SOM) that
bel ngs t DAVE Embedded
Systems Lite Line pr duct
class. DIVA is based n Texas
Instruments "Sitara" AM335x
C rtex-A8 applicati n pr cess r
and is built with SO-DIMM 204
pin f rm fact r.
DIVA ffers l ts f graphics,
pr cessing, peripherals and industrial interface pti ns,
all wing cust mers t implement c st-effective design. The
Pr grammable Real-Time Unit and Industrial C mmunicati n
Subsystem (PRU-ICSS) adds further flexibility and enables
additi nal peripheral interfaces and real-time pr t c ls such as
EtherCAT, PROFINET, EtherNet/IP, PROFIBUS, Ethernet
P werlink.
Typical applicati ns f r DIVA are:
●Industrial sens rs and I/O units
●Industrial drives with integrated
c mmunicati ns and multi-axis
m t r c ntr l
●Pr grammable l gic/aut mati n
c ntr llers (PLC/PAC) with
integrated industrial
c mmunicati ns such as
PROFIBUS, CAN and Ethernet
●H me and Building Aut mati n
F r further inf rmati n, please refer
t DIVA Hardware Manual.
July, 2015 10/52
Fig. 2: DIVA plugged on
DIVAEVB-Lite
Fig. 1: DIVA CPU module

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
2.2 Embedded Linux
When we talk in general ab ut Embedded Linux1, we refer t
an embedded system running Linux perating system. As the
reader pr bably kn ws, Linux was first devel ped n the PC
platf rm, based n the fam us x86 architecture. Typical
embedded systems using an perating system (O.S. f r sh rt),
are equipped with much lighter s ftware. Recent hardware
advances made these systems s p werful that n w they can
run a c mplex O.S. such as Linux. This ch ice has several
benefits:
●The devel per can c unt n a reliable and efficient s ftware,
devel ped and maintained by a large c mmunity all ver the
w rld
●The s ftware is pen-s urce, s devel pers have access t the
wh le s urce c de
●Since Linux runs n many different platf rms (x86, P werPC,
ARM, SuperH, MIPS etc.), applicati ns are p rtable by definiti n
●There are a l t f pen-s urce applicati ns running n t p f
Linux that can easily be integrated in the embedded system
●Last but n t least, there are n license fees.
The typical Embedded Linux system is c mp sed f:
●the b tl ader – this s ftware is run by the pr cess r after
exiting the reset state. It perf rms basic hardware initializati n,
retrieves the Linux kernel image (f r example fr m a rem te
server via the TFTP pr t c l) and launches it by passing the
pr per arguments (c mmand line and tags)
●the Linux kernel
●the r t file system – this file system is m unted (which means
"made available", "attached") by the kernel during the b t
pr cess n the r t direct ry (“/”).
The typical devel ping envir nment f r an Embedded Linux
system is c mp sed f a h st machine and a target machine.
The h st is used by the devel per t c mpile the c de that will
1 An exhaustive escription of this topic is beyon the scope of this ocument. We recommen rea ing
specific ocuments, eg Buil ing Embe e Linux Systems By Karim Yaghmour.
July, 2015 11/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
run n the target. In ur case the target is bvi usly the DIVA
m dule, while the h st is assumed t be a PC running the Linux
perating system. The Linux kernel running n the target can
m unt the r t file system fr m different physical media. F r
example, during the s ftware devel pment, we str ngly
rec mmend using a direct ry exp rted via NFS by the h st f r
this purp se (see the example c nfigurati n called net_nfs);
h wever, f r system depl yed t the field, the r t file system
is usually st red int a flash device.
2.3 DIVELK
DIVA Embedded Linux Kit (DIVELK f r sh rt) pr vides all the
necessary c mp nents required t set up the devel ping
envir nment f r:
●building the b tl ader (U-B t)
●building and running Linux perating system n DIVA-based
systems
●building Linux applicati ns that will run n the target
The heart f DIVA SOM is Texas Instruments "Sitara" AM335x
micr pr cess rs. Fr m a s ftware p int f view, Texas
Instruments supp rts this pr cess r family thr ugh s -called
Linux EZ S ftware Devel pment Kit (EZSDK f r sh rt). EZSDK
releases are published n a regular basis. F r m re details
please refer t :
●http://www.ti.c m/t l/linuxezsdk-sitara
●http://pr cess rs.wiki.ti.c m/index.php/Categ ry:EZSDK
DIVA Embedded Linux Kit, in turn, is directly derived fr m
EZSDK. Hence DIVELK d cumentati n ften refers t EZSDK
res urces.
DAVE Embedded Systems adds t the latest EZSDK fr m
Texas Instruments the cust mizati n required t supp rt the
DIVA platf rm. F r this reas n m st f the d cumentati n
pr vided by TI remains valid f r the DIVELK devel pment kit.
H wever, s me cust mizati n is required, in particular at
b tl ader and linux kernel levels.
DIVELK 2.0.0 intr duces supp rt f r the Yocto build system,
July, 2015 12/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
an pen s urce c llab rati n pr ject that pr vides templates,
t ls and meth ds t help creating cust m Linux-based systems
f r embedded pr ducts. It is derived fr m OpenEmbedded, but
it pr vides a less steep learning curve, a graphical interface f r
Bitbake and very g d d cumentati n. DAVE Embedded
Systems pr vides the s -called recipes/meta-rep sit ries
required t build all the DIVELK s ftware c mp nents
(b tl ader, kernel and r t file system) with the Yocto build
system. F r further details, please refer t
https://wiki.y ct pr ject. rg/wiki/FAQ.
July, 2015 13/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
2.3.1 Kit Contents
The f ll wing table lists the DIVELK c mp nents
Component Description
DIVA SOM
CPU: TI AM3359
SDRAM: 512 MB DDR3
NOR: bootable SPI flash 32 MB
NAND: 1GB
DIVAEVB-Lite Carrier board
DACU Carrier board
Ampire AM-800480STMQW
7” 800x480 LCD display
LVDS interfa e
AC/DC Single Output Wall Mount
adapter
Output: +12V – 2.0 A
DB9 Male Serial port adapter
Mi roSDHC ard with SD adapter
and USB adapter
July, 2015 14/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
2.3.2 DIVELK Release Notes
2.3.2.1 Version 2.1.0
Notes
●Maintenance release
●Updated kernel and u-b t versi ns
●Bug fixes
Known limitations:
Issue # Component Subsystem Description
0001 Linux USB USB0, when onfigured as
OTG, requires loading of the
gadget module for dete ting
devi es (and entering host
mode)
0002 Yo to ADT The Yo to ADT plugin for
E lipse doesn't work
0003 Linux Audio Code on the DACU board
doesn't work out-of-the-box.
A software pat h is required,
please onta t
suppor[email protected] for
information on how to enable
the audio ode .
2.3.2.2 Version 2.0.0
Notes
●First maj r update
●Added Y ct supp rt
●Updated kernel and u-b t versi ns
Known limitations:
Issue # Component Subsystem Description
0001 Linux USB USB0, when onfigured as
OTG, requires loading of the
gadget module for dete ting
devi es (and entering host
mode)
July, 2015 15/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
Issue # Component Subsystem Description
0002 Yo to ADT The Yo to ADT plugin for
E lipse doesn't work
2.3.2.3 Version 1.0.0
First fficial release
2.3.2. Releases history
DIVELK Version
Release
number
1.0.0 2.0.0 2.1.0
Status Released Released Released
Release
date
June 2013 O tober 2014 June 2015
Release
notes
Version 1.0.0 Version 2.0.0 Version 2.1.0
SOM PCB
version
CS133012A CS133012A CS133012A
Supported
arrier
boards
DIVAEVB-Lite
DACU
DIVAEVB-Lite
DACU
DIVAEVB-Lite
DACU
U-Boot
version
2012.10-divelk-1.0.0 2013.10-divelk-2.0.0 2013.10-divelk-2.0.0
Linux
version
3.2.0-divelk-1.0.0 3.12.10-divelk-2.0.0 3.12.10-divelk-2.0.0
Drivers
SPI NOR Flash (boot)
NAND 8 bit (boot)
UART0 (2-wire)
USB Host
SD/MMC1
GPIO
LCD
Tou h s reen ontroller
EMAC0 RMII (Fast Ethernet)
PMIC RTC (battery powered)
Audio (ALSA)
SPI NOR Flash (boot)
NAND 8 bit (boot)
UART0 (2-wire)
USB Host
SD/MMC1
GPIO
LCD
Tou h s reen ontroller
EMAC0 RMII (Fast Ethernet)
PMIC RTC (battery powered)
Audio (ALSA)
USB OTG
CAN
ADC
SPI NOR Flash (boot)
NAND 8 bit (boot)
UART0 (2-wire)
USB Host
SD/MMC1
GPIO
LCD
Tou h s reen ontroller
EMAC0 RMII (Fast Ethernet)
PMIC RTC (battery powered)
Audio (ALSA)
USB OTG
CAN
ADC
Splash s reen in u-boot
ConfigID
TI EZSDK 05.06.00.00 07.00.00.00 07.00.00.00
Build
Sytem
- Yo to Dylan (1.4) Yo to Dylan (1.4)
Graphi
libraries
Qt 4.8.4 Qt 4.8.4
Qt 5.3.2
Qt 4.8.4
Qt 5.3.2
July, 2015 16/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
3 DIVELK Quick Start
This chapter describes h w t quickly start w rking with the
DIVELK kit. The f ll wing paragraphs will guide y u thr ugh
the setup and installati n pr cedures.
3.1 Unboxing
Once y u've received the kit, please pen the b x and check
the kit c ntents with the packing list included in the b x and
using the table n chapter 2.3.1 as a reference. The hardware
c mp nents (SOM, carrier b ards and display) are
pre-assembled and fixed n a supp rting plate, as sh wn in the
picture bel w:
July, 2015 17/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
3.2 Hardware setup
This secti n describes h w t quick start a DIVA system
c mp sed f a DIVA SOM plugged int the DIVAEVB-Lite and
then m unted n the DACU carrier b ard, pr vided that it is
pr grammed acc rding t DIVELK c nfigurati n.
The Micr SD pr vided with the DIVELK can be used t b t
the system, since it c ntains a b table partiti n (mmcblk0p1)
and a r t file system partiti n (mmcblk0p2).
1. c nnect the serial cable, pr vided with the b ard, t the
J25 pin-strip c nnect r n the DACU b ard
2. insert the Micr SD card pr vided with the devel pment
kit int the Micr SD sl t
3. c nnect the 12Vcc p wer supply t JP2 n the DACU
b ard
4. ( pti nal) c nnect the serial cable t PC COM p rt
thr ugh a NULL-m dem cable (n t pr vided)
5. ( pti nal) start y ur fav rite terminal s ftware n PC;
c mmunicati n parameters are:
Parameter Value
Baud rate 115200 bps
Data bits 8
Stop bits 1
Parity None
6. ( pti nal) t c nnect the system t Ethernet LAN,
please plug cable n c nnect r J7 f the DIVAEVB-Lite
The system is c nfigured t b t aut matically when p wered
up, l ading u-b t, kernel and r t file system fr m the
Micr SD card.
3.3 First boot
Once p wer has been applied, U-B t b tl ader will be
executed and the debug messages will be printed n the serial
c ns le. U-B t aut matically runs the mmcboot macr , that
l ads the kernel and launches it with the pti ns f r m unting
July, 2015 18/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
the r t file system fr m the mmcblk0p2 partiti n. At the end
f the b t pr cess, the Matrix dem applicati n
(http://pr cess rs.wiki.ti.c m/index.php/Matrix_Users_Guide) is
launched and y u can interact with the system using the
t uchscreen:
M re ver, the Linux shell is available n the serial c ns le.
Lastly, b th telnet and ssh services are available t c nnect t
the system thr ugh the netw rk.
July, 2015 19/52

D V E L K Q u i c k S t a r t G u i d e v . 1 . 0 . 6
3. DVDK installation
DAVE Embedded Systems Virtual Devel pment Kit is a virtual
machine, based n Oracle VirtualB x, that all ws devel pers t
start using DAVE Embedded Systems platf rm with ut
wasting time in installing and c nfiguring a full devel pment
envir nment fr m scratch. The Virtual Machine c mes with all
the devel pment t ls and s urce c de pre-c nfigured, and
requires nly a minimal setup by the end user (usually just
adapting the netw rk interface t the user envir nment).
DVDK can als be c nverted, easily, int a physical
envir nment, f r example t increase speed n sl wer
machines. Please n te that DVDK can als be used with
VMWare. Please refer t DVDK page
(http://wiki.dave.eu/index.php/Categ ry:DVDK) n DAVE
Embedded Systems Devel per's Wiki f r further inf rmati n.
3.4.1 DVDK features
●VirtualB x virtual machine (.OVA archive)
●Based n Lubuntu 12.04 LTS (64-bit versi n)
●Pre-installed VirtualB x Guest Additi ns
●LXDE deskt p envir nment available
●B t disk with pre-installed Lubuntu Linux 12.04.2
LTS and pre-c nfigured basic Linux services (TFTP,
NFS, ...)
●Sec ndary disk c ntaining s urce c de and t ls:
B tl ader (u-b t) s urce tree cl ned fr m DAVE
Embedded Systems public git rep sit ry
Linux kernel s urce tree cl ned fr m DAVE Embedded
Systems public git rep sit ry
External pre-built t lchain
Y ct bsp f r DIVA
Pre-installed Y ct -based r t file systems with setup
scripts, makefiles, example applicati ns, ...
July, 2015 20/52
Table of contents