Sitara Linux Dev Guide
Sitara Linux Dev Guide
Developer’s Guide
v6.00.00.00
References
Article Sources and Contributors 281
Image Sources, Licenses and Contributors 282
Article Licenses
License 285
Sitara Linux Software Developer’s Guide 1
For the SDG specific to your SDK release, please refer to Archived SDGs under Reference
Documentation
BeagleBone 6.0 [Link] 3.2 2013.01 Linaro GCC 4.7 July 2013
AM335xEVM 6.0 [Link] 3.2 2013.01 Linaro GCC 4.7 July 2013
AM335x StarterKit (SK) 6.0 [Link] 3.2 2013.01 Linaro GCC 4.7 July 2013
AM37xEVM 6.0 [Link] 2.6.37 2012.04.01 Linaro GCC 4.7 July 2013
AM35xEVM 6.0 [Link] 2.6.37 2011.09 Linaro GCC 4.7 July 2013
1. Configure a Linux Host - If you already have a Linux host machine, go to Step 2. If you do not have a Linux host machine, you can configure a
Linux host machine on your Windows PC using a virtual machine.
• Build a Ubuntu 10.04 LTS Linux host with VMware on WinXP (preferred)
• Build a Ubuntu 10.04 LTS Linux host with VirtualBox on WinXP
For standard EVMs: 2. Configure your development For Beaglebone: 2. Configure your development environment
environment
3. Install the SDK - Within your Linux host machine, Install 3. Run the START_HERE Script - When Beaglebone boots, a START_HERE
the Sitara SDK directory will display on your Linux host desktop. To start your evalaution and
development using the BeagleBone, Run the START_HERE.sh script
NOTE: The START_HERE.sh script will run the [Link] script. For Beaglebone
boards before rev A5 the [Link] script will attempt to install a udev rule to load
the ftdi_sio module with the proper parameters to recognize the Beaglebone. If you
experience difficulty with the Beaglebone being recognized you can load the
module manually by doing:
• sudo rmmod ftdi_sio
• sudo modprobe ftdi_sio vendor=0x0403 product=0xa6d0
4. Run the Setup Script - Once the SDK has been installed, NOTE: If using a VMWare image you will likely need to import the beaglebone
Run the [Link] Script to guide you through the remaining into the VMWare image as a mass storage device using the instructions here
development environment configuration.
IMPORTANT
On the AM335x EVM-SK, the USB cable enables a USB-to-serial interface to the Linux host PC. If using a
virtual machine, please insure the AM335x EVM-SK is a selected USB device.
NOTE
If you are running your VMWare image with Windows 7 some USB-to-Serial adapters do not properly work
with Windows 7. Make sure that your adapter specifically says that it supports Windows 7. You may also need
to install an additional driver for your adapter.
• Open a terminal and run the following command to find the USB serial adapters available on the system. The
FTDI chip used on the board presents two serial interfaces to the Linux host. The first interface is the JTAG
interface and the second one is the serial console interface.
ls /dev/ttyUSB*
You should see output like:
/dev/ttyUSB0
/dev/ttyUSB1
NOTE
If using VMWare you may need to pass the "Future Technology Devices" device into the VMWare image
• As mentioned above since the board's serial interface is the second interface you will want to open a serial
console to the second device node. In this case that is /dev/ttyUSB1. This can be done by doing:
• minicom -w -s
• Select Serial port setup and press ENTER
• Press A to modify the Serial Device and change the device to /dev/ttyUSB1. Press ENTER
• Press ENTER to exit the serial setup
• Select Exit and press ENTER
• You should now see a minicom window.
• Power on the board, you should see "ccccc" being printed in the window, if so the serial connection is working
as expected. Go ahead and leave this console RUNNING in the background.
NOTE
For the EVM-SK board the power button is under the board in the upper-right hand corner. You must press
and hold this button to power on the board.
NOTE
For the Beaglebone the board will power on as soon as the USB cable is connected. you can reset the board by
pressing the reset button which should provide you with the expected output
Sitara Linux Software Developer’s Guide 5
These directories contain the code and tools used to develop for Sitara devices.
• bin - Contains the helper scripts for configuring the host system and target device. Most of these scripts are used
by the [Link] script.
• board-support - Contains the SDK components that need to be modified when porting to a custom platform. This
includes the kernel and boot loaders as well as any out of tree drivers.
• docs - Contains various SDK documentation such as the software manifest and additional user's guide. This is
also the location where you can find the training directory with the device training materials.
• example-applications - Contains the sources for the TI provided example applications seen during the out-of-box
demonstration.
• filesystem - Contains the reference file systems. These include the smaller base file system as well as the
full-featured SDK file system.
• host-tools - Contains the host side tools such as pinmux and flash tool.
• linux-devkit - Contains the cross-compile toolchain and libraries to speed development for the target device.
• Graphics_SDK_setuplinux_<version>.bin - This is the installer for the graphics SDK. The graphics SDK
components are used by the Sitara Linux SDK to provide additional demos as well as integrated with the pre-built
Qt libraries to accelerate various Qt functions.
• Makefile - Provides build targets for many of the SDK components from the top-level of the SDK.
• [Link] - Sets default values used by the top-level Makefile as well as sub-component Makefiles
• [Link] - Configures the users host system as well as the target system for development
Applications AM335x BeagleBone AM335x AM180x AM35x AM37x Beagleboard-xM Users Guide Description
SK
USB Profiler X X X X X X X NA
ARM Benchmarks X X X X X X X NA
Display X X X X NA
QT Demos X X X X X X X NA
Web Browser X X X X X X X NA
System Settings X X X X X X X NA
Sitara Linux Software Developer’s Guide 7
Top-Level Makefile
The Sitara Linux SDK contains a top-level Makefile in the root of the SDK tree that can be used to rebuild many of
the example applications and board support packages. See the Sitara Linux SDK Top-Level Makefile page for
more information on using this Makefile.
[Link] script
Starting with version 05.04 of the Sitara Linux SDK there is now a shell script available called [Link]
which can be used to create an SD card image for booting the various Sitara EVMs. For details on using this script
please see the Sitara Linux SDK create SD card script page.
Linux Training
In Sitara we recognize the need for solid, real world embedded Linux training. As we continue to enhance the
features of our Sitara Linux SDK [13] we have also focused on developing training material based on the same SDK.
That way, anything provided in the training can be easily reproduced on your side once you have installed the Sitara
Linux SDK.
We have a number of modules that are complete and others we are actively working on. All of our Linux training is
provided on this wiki.
If you have comment on the training or a request for Linux training that is not be captured here, please let us know
using the sdk_feedback@[Link] [14] mailing list
NOTE
If you are unable to access Google Drive documents you can also find this training material at
[Link]/sitarabootcamp [15]
Linux Host Sitara Linux Training: This page details how the Linux Host is configured for Sitara Linux Training. These are the
Configuration Linux Host same methods to prepare laptops used in live TI training.
Configuration
Introduction to Linux - Introduces the community-based Linux ecosystem on TI platforms. What will be covered are
the components that make up the ecosystem such as the boot loader, Linux kernel, device
drivers, user application layer and the relationship between them.
[16] - Looks at all aspects of the boot process from power up to running user a application beginning
Linux Boot Process
with ROM boot loader progressing through secondary program loader, u-boot, kernel and
finishing with user-level initialization.
Sitara Linux Training: Learn about the various components that make up the ARM MPU Linux software development
Sitara Linux Training:
Hands on with the kit including the out-of-box application launcher, the CCS IDE, example applications. In
Hands-on with the SDK
[17] SDK addition, host tools such as the pin-mux utility and the flash tool will be introduced. All these
components are packaged into a single easy to use installer from [Link]
Code Composer Studio Code Composer Studio Covers what the Eclipse-based Code Composer Studio is, how to use it for embedded Linux
v5 v5 application development, debugging and additional plug-ins that are provided
Sitara Linux Software Developer’s Guide 9
Sitara Linux Training: Discusses how to improve product power performance by minimizing power consumption and
Sitara Linux Training:
[18] Power Management guaranteeing system performance. In addition, power management techniques enabled via the
Power Management
Linux SDK will be discussed
Sitara Linux Training: Covers cryptography basics and explore cryptographic functions enabled via open source
Sitara Linux Training:
[19] Cryptography projects. In addition, cryptographic hardware acceleration access and Linux SDK example
Cryptography
applications will be discussed.
Sitara Linux Training: Discusses the fundamentals necessary to port a TI Linux-based EVM platform to a custom
Sitara Linux Training:
[20] Linux Board Port target platform. Introduces the necessary steps needed to port the following components: Linux
Linux Board Port
kernel.
Sitara Linux Training: Discusses the fundamentals necessary to port a TI Linux-based EVM platform to a custom
Sitara Linux Training:
[20] U-Boot Board Port target platform. Introduces the necessary steps needed to port the following components:
U-Boot Board Port
secondary program loader, u-boot.
Sitara Linux Training: Learn about how U-Boot and Kernel Debug can be done using CCSv5 using JTAG. This
Sitara Linux Training:
U-Boot/Kernel Debug U-Boot Linux Debug presentation and accompanying lab will discuss what debug information is necessary to be built
[21] with CCSv5 into U-Boot and the Kernel to allow source code level debug with a JTAG interface.
with CCSv5
ARM Multimedia ARM Multimedia Introduces open-source based multimedia codecs for the ARM Cortex-A8. In addition, look at
the capability of the NEON coprocessor to accelerate multimedia. Plus, introduces GStreamer,
an open-source pipeline-based framework that enables access for multimedia through
FFMPEG/libav support on the ARM. GStreamer will be illustrated with Linux SDK examples.
Learn how to develop a GUI quickly with the Linux SDK. Learn background information on
Sitara Linux Training: [Linux Training:
[22] QT. Learn how to use the SDK to get started developing a GUI. Learn about QT Creator and all
Hands on with QT Hands on with QT
[23] the QT toolset.
]
Oprofile Oprofile Introduces the Opensource tool Oprofile. When is it useful during the development cycle.
Introduce some of the more popular features. Cover both modes of operation, internal HW
counters or timer interrupts. Cover internal operation details. Also point out use cases where
Oprofile may not be useful.
[24] Sitara Linux Training: Learn how the Linux init scripts work with the sysvinit system as well as how the profile scripts
Init Scripts
Init Scripts can be used to affect the login process.
Sitara Linux Training: Learn how to identify the portions of the Linux boot taking the most time and remove or defer
Optimizing Linux Boot
[25] Optimizing Linux those operations until later. The goal of this lab is to have a system booting to a display on the
Time
Boot Time LCD and reading a touchscreen event in less than 3 seconds.
Reference Documentation
Release Notes
• Sitara SDK Release Notes
• WLAN/BT Release Notes
• Graphics SDK Release Notes
• Linux PSP Release Notes
Graphics Documentation
• Graphics SDK Getting Started Guide
• Graphics SDK Quick installation and user guide
• Graphics SDK Release Notes
• SGX Debugging Tips and FAQ
• Qt Tips
Miscellaneous Documentation
QT Documentation
• QT Reference Documentation [27]
GPLv3 Disclaimer
There are GPLv3 licensed software components contained within the Sitara Linux SDK on both the target and the
host. The software manifest (software_manifest.htm) for the Siatara Linux SDK is located in the docs/ directory of
the installed SDK. All GPLv3 components for both target and host are contained in the SDK directory.
These GPLv3 components are provided for development purposes only and may be removed for production
solutions.
How to Identify the GPLv3 components
To idenitfy the GPLv3 components installed on the target file system, run the gplv3-notice script located on the
target file system located here: /etc/init.d/gplv3-notice
The gplv3-notice script will list all Sitara Linux SDK built shipped installed packages. If you installed addtional
GPLv3 components this script may not identify them until the next target reboot.
How to Remove Target side GPLv3 Components
The gplv3-notice script also outputs how to remove the packages. To remove individual packages from the target
development file system, use the opkg remove command which is: opkg remove <package>
Software Updates
We are continually improving the quality and content of the software we provide in the EVM. Updates to the SDK
may be obtained at Software Updates [39] as they become available.
Technical Support
• E2E Support Forums [40] - an active community of TIers and other customer like you already using the AM37x
EVM. You may find your question has already been answer with a quick Search of the Forums. If not, a quick
post will likely provide you the answers you need. Support@[Link] - a support email list you may submit your
question to.
• support@[Link] [41]
Want to Contribute?
We are always striving to improve this Sitara Linux SDK. Please let us know if you have ideas or suggestions. The
sections below will give you ideas on how to best contribute to the SDK and PSP Linux kernel.
SDK Contributions
All Sitara Linux SDK contributions can be sent to the sdk_feedback@[Link] [14] mailing list. This covers
submitting bug fixes, new features, or any other feedback to components provided with the Sitara Linux SDK
including, but not limited to:
• u-boot
• target file system
• Host Tools
• Scripts
• Example Applications
• Documentation
Some general guidelines to help us with your feedback are:
• Documentation
Sitara Linux Software Developer’s Guide 13
References
[1] http:/ / www. ti. com/ lsds/ ti/ dsp/ arm. page
[2] http:/ / processors. wiki. ti. com/ index. php/ AM335x_General_Purpose_EVM_HW_User_Guide
[3] http:/ / www. ti. com
[4] http:/ / processors. wiki. ti. com/ index. php/ AM335xStarterKitHardwareUsersGuide
[5] http:/ / beagleboard. org/ static/ beaglebone/ a3/ Docs/ Hardware/ BONE_SRM. pdf
[6] http:/ / www. beagleboard. org
[7] http:/ / beagleboard. org/ static/ BBxMSRM_latest. pdf
[8] http:/ / www. mistralsolutions. com/ assets/ downloads/ AM37x_EVM. php
[9] http:/ / www. mistralsolutions. com/
[10] http:/ / www. logicpd. com/ products/ development-kits/ zoom-am3517-evm-development-kit#tabs-som-4
[11] http:/ / www. logicpd. com/
[12] http:/ / www. logicpd. com/ products/ development-kits/ zoom-am1808-evm-development-kit#tabs-som-4
[13] http:/ / www. ti. com/ tool/ linuxezsdk-sitara
[14] [Link] ti. com
[15] http:/ / www. ti. com/ sitarabootcamp
[16] https:/ / docs. google. com/ open?id=0BzESOSf028mLaGFuaVFFSzVkVVU
[17] https:/ / docs. google. com/ open?id=0BzESOSf028mLbFBucThORVRwZnM
[18] https:/ / docs. google. com/ open?id=0BzESOSf028mLZkxBQng2d0QxN00
[19] https:/ / docs. google. com/ open?id=0BzESOSf028mLbjgwbHpfWEpoSDg
[20] https:/ / docs. google. com/ open?id=0BzESOSf028mLTjlPYmVJTUlTODA
[21] https:/ / docs. google. com/ open?id=0BzESOSf028mLbXVCZlNNNkVlU3M
[22] https:/ / docs. google. com/ open?id=0BzESOSf028mLTkdaSm9RTE52T0E
[23] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Training:_Hands_on_with_QT& oldid=149968|Sitara
[24] https:/ / docs. google. com/ open?id=0BzESOSf028mLY0dXSFhjZE53OFU
[25] https:/ / docs. google. com/ open?id=0BzESOSf028mLSTdoWV9DQUR5bHM
[26] http:/ / circuitco. com/ support/ index. php?title=BeagleBone#Board_Reset_on_JTAG_Connect. 28A3. 2CA4. 2CA5. 29
[27] http:/ / doc. qt. nokia. com/ 4. 6/ index. html
[28] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=150728
[29] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=130385
[30] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=127948
[31] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=106866
[32] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=102587
[33] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=94632
[34] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=88367
[35] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=85314
[36] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_Software_Developer%E2%80%99s_Guide& oldid=78069
Sitara Linux Software Developer’s Guide 14
Introduction
This guide demonstrates how to get a virtual Ubuntu Linux machine running with VMware under Windows 7.
Please use only the 32-bit Ubuntu 12.04 release as this is what is called an LTS (Long Term Support). There are
SDK scripts that will be checking for this release identity.
Requirements:
• Windows 7 host with internet connection, at least 1G of RAM and 40G of free hard drive space.
The instructions here are for setting up a 40G virtual machine. The entire 40G is not taken at once, but as the
machine is used and software is installed, the machine can grow and take up as much as 40G.
After Vmware is installed the Windows host will have two new (virtual) network adapters. These can be seen in the
Windows host by looking under Control Panel --> Network Connections. If the virtual machine will use a bridged
connection to an existing network, these virtual adapters should be disabled.
Click on CD/DVD and change the connection to "Use ISO image file". Click on "Browse..." and select the Ubuntu
ISO image file that was previously downloaded. Click on Network Adapter and change the Network connection to
"Bridged" and then check the box to "Replicate physical network connection state".
The full installation will take 20-30 minutes. When it completes the machine will reboot. The machine will now
prompt for the login (user) and password.
After the machine reboots into Ubuntu it is helpful to take the Ubuntu ISO out of the virtual CD drive. Click on the
VM menu and select "Settings...". Click on CD/DVD and change the connection from "Use ISO image file" to "Use
physical drive". The actual drive letter can be selected from the drop down list. If there is no physical drive on the
host machine, the CD/DVD device can be simply removed from the machine.
total 104400
-rw-r--r-- 1 user user 106900818 2010-11-11 12:27 [Link]
drwxr-xr-x 7 user user 4096 2010-11-11 12:26 vmware-tools-distrib
user@Ubuntu1004:~/VMwareTools$ cd vmware-tools-distrib/
user@Ubuntu1004:~/VMwareTools/vmware-tools-distrib$ ls -l
total 560
drwxr-xr-x 2 user user 4096 2010-11-11 12:26 bin
drwxr-xr-x 2 user user 4096 2010-11-11 12:26 doc
drwxr-xr-x 3 user user 4096 2010-11-11 12:26 etc
-r--r--r-- 1 user user 552155 2010-11-11 12:26 FILES
lrwxrwxrwx 1 user user 13 2011-02-14 14:27 INSTALL -> ./doc/INSTALL
drwxr-xr-x 2 user user 4096 2010-11-11 12:26 installer
drwxr-xr-x 17 user user 4096 2010-11-11 12:26 lib
lrwxrwxrwx 1 user user 31 2011-02-14 14:27 [Link] -> ./bin/[Link]
user@Ubuntu1004:~/VMwareTools/vmware-tools-distrib$ sudo ./[Link]
user@Ubuntu1004:~$ pwd
/home/user
user@Ubuntu1004:~$ ifconfig
eth0 Link encap:Ethernet HWaddr [Link]
inet addr:[Link] Bcast:[Link] Mask:[Link]
inet6 addr: fe80::20c:29ff:feda:a86e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:759 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62873 (62.8 KB) TX bytes:4937 (4.9 KB)
Interrupt:19 Base address:0x2024
2. Click OK
3. To connect the Beaglebone, select Player -> Removable Devices -> Future Devices Beaglebone/XDS100V2->
Connect (Disconnect from Host)
4. You will be prompted that you are about to remove a device from the Host system and connect to the virtual
machine. Select OK to connect the device.
5. The device should now be available within the virtual machine
How to Build a Ubuntu Linux host under VMware 21
3. Browse the Windows folder your want to Share. And provide a Name for that folder. This Name is what
Ubuntu 10.04 LTS will mount to.
How to Build a Ubuntu Linux host under VMware 23
4. Ensure Enable this share is checked (should be default). And click Finish.
5. Start your virtual machine and log into Ubuntu 12.04 LTS. Create a Desktop short-cut to the Shared Folder
you just set up.
• See the vmware site for further details
• [Link]
NOTE - shared_folder_name is what ever name your provide in Settings
After clicking OK, you should have a desktop shortcut to your Shared Folder.
As seen in the image below, click Network Proxy on the left panel and then Manual Proxy Configuration for the
Method. Specify the HTTP proxy server used by your company. You may find this information under your Windows
OS inside the Internet Explorer Network Connections. Be sure to specify the port.
NOTE - [Link] is not a valid HTTP proxy. It is shown as an example only. You need use the
HTTP proxy server & Port used by your company.
Make sure you check "Use the same proxy for all protocols". Also be sure to click "Apply System-Wide". Then
Close
Finally you will be asked to entered your password in order to set your network proxy information. This is typically
the same password you used to log into Ubuntu on boot.
How to Build a Ubuntu Linux host under VMware 25
You should now be able to browse the Internet using Firefox within Ubuntu.
Acquire::ftp::proxy "[Link]
Acquire::http::proxy "[Link]
Acquire::https::proxy "[Link]
Replace [Link] with your proxy server's address and 80 with your proxy server's port.
NOTE - If the on-screen keyboard does not display, Shutdown Ubuntu 12.04 LTS and restart your Ubuntu 12.04
LTS virtual machine again in VMWare. Once Ubuntu 12.04 starts again the on-screen keyboard should be
displayed.
How to Build a Ubuntu Linux host under VMware 27
Next, after logging in and launching a terminal, modify /etc/default/console-setup using gedit to enable the
physical keyboard
NOTE - You will need sudo access and therefore must enter your password to access this file.
At the bottom change the following lines:
<original>
XKBMODEL=”SKIP”
XKBLAYOUT=”us”
XKBVARIANT=”U.S. English”
XKBOPTIONS=”"
<new changes>
XKBMODEL=”pc105″
XKBLAYOUT=”us”
XKBVARIANT=”"
XKBOPTIONS=”"
The physical keyboard should now work from here out. You may also now disable the on-screen keyboard at the
login screen using the same steps listed above to toggle the on screen keyboard on.
References
[1] http:/ / releases. ubuntu. com/ precise/
[2] http:/ / www. vmware. com
[3] http:/ / processors. wiki. ti. com/ index. php/ Setting_up_Minicom_in_Ubuntu
Sitara SDK Installer 29
Overview
The SDK Installer (ti-sdk-amxx-vx.x.x.x) will install the necessary components to start your development on the
AMxx microprocessor. The SDK consists of source for the Matrix App launcher starting point application, a
development filesystem, a target filesystem, an IDE (CCSv5), Pin Mux Utility, Flash Tool applications, the PSP and
documentation.
The Sitara SDK now includes the GCC toolchain from Open Embedded. The ti-sdk was built and tested against a
specific Linux Distribution name and version, Ubuntu 10.04 and 12.04. Note this does not prevent the user from
installing the SDK on other Linux distributions.
To assist the user in getting a to a point of starting development the installer contains an Environment Setup Script [1]
that will run with the Linux Distribution specified for the ti-sdk. This particular script sets up several functions
needed by the SDK such as the Java runtime for the CCSv5 IDE. While it is written for the current distribution the
user can modify the script to fit their particular distribution. Please see the picture for a block diagram of the
development environment setup for ti-sdk. Please also note that this script is specifically tied to Ubuntu 10.04 as will
make specific package installations that are only known to work on this release.
Sitara SDK Installer 30
[prompt]:~$ ./ti-sdk-amxx-evm-x.x.x.x-Linux-x86-Install
Sitara SDK Installer 31
Archived Versions
Archived - Sitara Linux SDK Installer User's Guide
• Sitara SDK 5.03 - SDK Installer User's Guide (archived) [3]
• Sitara SDK 4.01 - SDK Installer User's Guide (archived) [4]
References
[1] http:/ / processors. wiki. ti. com/ index. php/ SDK_Setup_Script
[2] http:/ / processors. wiki. ti. com/ index. php/ Code_Composer_Studio_v5_Preview_Edition_Users_Guide#Running_the_CCSv5_installer
[3] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_SDK_Installer& oldid=85510
[4] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_SDK_Installer& oldid=50935
Sitara Linux SDK Setup Script 32
Overview
After installation of the SDK on the Linux host, the setup script should be run to prepare the host for software
development. Some of the tasks require administrator privileges. The script will prompt you when these
administrator privileges are required. The setup script does the following things:
• Verification that the Linux host is the recommended Ubuntu LTS version
• Installation of required host packages
• Target FileSystem installation
• NFS setup
• TFTP setup
• Minicom setup
• uboot setup
• Load uboot script
NOTE - The Setup Script will first check to see if the user is running the recommended Ubuntu Long Term
Support (LTS) distribution, if not it will exit. If the user is running on a different Ubuntu version or another
Linux distribution, they are encouraged to modify the environment setup script to match their distribution.
See which version of Ubuntu is currently supported here: Start_your_Linux_Development
[ /home/user/ti-sdk-amxx-evm-x.x.x.x/targetNFS ]
You can override the default location by typing in another location or by hitting <Enter> you can accept the default
location. This can take a little time to untar and unzip the filesytem.
If you have run this script more than once and the filesystem already exists, you will be asked to either:
• rename the filesystem
• overwrite the filesystem
• skip filesystem extraction
(see actual prompt below)
/home/jlance/ti-sdk-am335x-evm-[Link]/targetNFS already exists
(r) rename existing filesystem (o) overwrite existing filesystem (s) skip filesystem extraction
NFS Setup
This step will allow you to export your filesystem which was extracted in the previous step.
Note! This command requires you to have administrator priviliges (sudo access) on your host.
• This step adds the path to root filesystem from the previous step to the file /etc/exports on your host.
• The NFS kernel daemon is then stopped and then restarted to make sure the exported file system is recognized.
TFTP Setup
This section will setup tftp access on your host.
Note! This command requires you to have administrator priviliges (sudo access) on your host.
--------------------------------------------------------------------------------
Which directory do you want to be your tftp root directory?(if this directory does not exist it will be created for you)
[ /tftpboot ]
The default location is /tftpboot which is off of the root directory on your linux host and requires administrator
privileges. You can hit <Enter> to select the default location or type in another path to override the default. Then the
following task occur:
• A tftp config file is created for you on your host at /etc/xinetd.d/tftp
• The tftp server is stopped and then restarted to insure the changes are picked up.
If you have run this script more than once or the filename already exists, you will be asked to select one of the
following options.
• rename the filesystem
• overwrite the filesystem
• skip filesystem extraction
Sitara Linux SDK Setup Script 35
Minicom Setup
This step will set up minicom (serial communication application) for SDK development
For most boards, the default /dev/ttyS0 should be selected. For Beaglebone which has a USB-to-Serial converter, just
hit enter and the proper serial port will be setup in a later step.
• A minicom configuration will be saved for you at /home/user/.[Link]
• The old configuration if there was one will be saved at /home/user/.[Link]
The configuration saved to /home/user/.[Link] can be changed, see the Software Development Guide for more
information.
NOTE: If you are using a USB-to-Serial converter, your port should be configured for /dev/ttyUSBx
uboot Setup
This section will create the necessary u-boot commands to boot up your board based on your answers to the
questions below.
The script will detect your ip address and display it. You can override the detected value by entering an alternate
value. See sample below:
--------------------------------------------------------------------------------
This step will set up the u-boot variables for booting the EVM.
Autodetected the following ip address of your host, correct it if necessary
[ [Link] ]
Next you will be prompted where you prefer your kernel and file system to be located.
• Kernel location
• TFTP - located on your Host in your designated /tftpboot directory
• SD card - located in the 1st partition named "boot" of your SD card
• Filesystem location
• NFS - located on your Host. The location is where the file system was extracted in an earlier step.
• SD card - located on the 2nd partition named "rootfs" of your SD card.
Next if you have selected TFTP, you will be prompted which uImage you want to boot using TFTP. You will be
given a list of existing uImage's and you can type one in from the list or hit <Enter> to select the default option. The
default option will be the uImage corresponding to the SDK installation. This will be used in the next step to create
the necessary u-boot options to boot up your device.
References
[1] http:/ / circuitco. com/ support/ index. php?title=BeagleBone_Black_Accessories#Serial_Debug_Cables
[2] http:/ / circuitco. com/ support/ index. php?title=Updating_The_Software
Overview
For some devices like the Beaglebone which use a built in USB to Serial adapter a special script called
START_HERE.sh has been created to assist in running the out of box software and installing the AMSDK. This
script will be found when the board is booted into Linux and the START_HERE partition of the SD card is auto
mounted on your Linux host machine. At that point the board is acting as an SD card reader to provide you access to
the contents of the START_HERE partition which has the AMSDK installer, Quick Start Guides, and CCS installer.
Launching Matrix
At this point a terminal window should be open and you should see output like the sample below asking you if you
would like to launch a browser to connect to matrix remotely.
BeagleBone Startup
The BeagleBone contains everything you need for development, including a USB
card reader, USB-to-Serial converter and a XDS100v2 emulator - and it's all over
the same USB cable! With optional daughter cards, components like display and
Wifi can be added with ease.
The BeagleBone is fully booted, but development can't begin until the SDK is
installed and the appropriate development environment is configured.
However, before beginning development, would you like to explore the remote
version of Matrix GUI v2? Matrix GUI provides an easy way explore the
capabilities of the BeagleBone through your host web browser. (y/n)
AMSDK START HERE Script 37
[y]
Pressing Enter (default is yes) or entering y + Enter will start your local browser and connect to the matrix
application running on the board. Entering n will skip this step. From this browser window you can launch additional
applications on the board and see their results.
NOTE: You can only see text based output. Applications that are graphical in nature can only be viewed using the
LCD or DVI output of your board if available. If a video output is not available you will not be able to see the
application output and should not execute the application.
When you are done exploring the example applications available you can minimize your browser and go on to the
next step.
If you select y here or just press Enter your browser will open a new tab connecting to the Software Developer's
Guide on the TI wiki. Entering n will skip this step. This guide will explain the features of the SDK and how to use
it.
When you are done reviewing the Software Developer's Guide you can minimize your browser and go to the next
step.
If you select y here or just press Enter the SDK installer will pop up and prompt you to begin installation. Entering n
will skip SDK installation and the terminal will close, at which time the START_HERE script has finished running.
If you selected y above then you will be guided through the SDK installation using the graphical interface. It is
generally best to select all the default values.
NOTE: If you do not install the SDK to the default location you will be prompted to run the [Link] script inside of
the SDK yourself with a message similar to:
BeagleBone [Link]
The remainder of the BeagleBone setup is performed via [Link]. [Link] has
been modified slightly for the BeagleBone so that it can autodetect and install
the drivers for the built in USB-to-Serial and XDS100v2.
The setup script is located in your install directory, and requires sudo (admin)
access to correctly run. To run type "sudo <sdk-install dir>/[Link]"
Press Enter to Exit.
AMSDK START HERE Script 38
Running [Link]
Assuming that you installed the SDK to the default path the script will find the [Link] script within the SDK
installation and prompt you if you would like to run that script.
BeagleBone [Link]
The remainder of the BeagleBone setup is performed via [Link]. [Link] has
been modified slightly for the BeagleBone so that it can autodetect and install
the drivers for the built in USB-to-Serial and XDS100v2.
For details on what the [Link] script does refer to the SDK setup script page.
NOTE: You will need to have sudo (administrative) privileges to run the [Link] script. If you do not have sudo
access on your Linux PC you should select n here and talk to your system administrator to gain sudo permissions.
You can then run [Link] manually as described on the SDK setup script page. If you do have sudo permissions
you will be prompted for your sudo password.
When [Link] has finished you will be left with a terminal that is connected over the USB to serial adapter to the
board. From this terminal you can interact with the shell command line on the board.
Important Note
This guide is for the latest version of Matrix that is included in the SDK starting at version 5.03. If you are looking
for information about the old Matrix then this can be found at the following link Previous Version of Matrix [1]
Supported Platforms
This version of Matrix supports all Sitara devices
Initial Boot Up
When you first boot up a target system containing a Sitara Software Development Kit (SDK), Matrix should be
automatically started. Matrix can be either operated by touchscreen or mouse. Default startup for most SDK
platforms is touchscreen. Should you encounter any problems below are some tips to get everything running
smoothly. See Matrix Startup Debug
Matrix Users Guide 39
Overview
Matrix is an HTML 5 based application launcher created to highlight available applications and demos provided in
new Software Development Kits. There are two forms of Matrix, local and remote Matrix. All of the example
applications and demos are available using either the local or remote version. The local version launches by default
when the target system is booted and uses the target system's touchscreen interface for user input. Matrix comes as a
4x3 matrix of icons or as a 4x2 matrix depending on the display resolution.
Local Matrix
Local Matrix refers to Matrix being displayed on a display device attached to the target system. The launcher for
Matrix is just a simple QT application that displays a Webkit base browser that points to the URL http:/ /
localhost:80.
NOTE: Versions of matrix released before the Sitara Linux SDK 05.04 use port 8080 for Matrix
Matrix Users Guide 40
Remote Matrix
Remote Matrix refers to Matrix being ran in any modern day web browser not located on the target system.
The URL for Remote Matrix is [Link] system's ip address>
NOTE: Versions of Matrix released before the Sitara Linux SDK 05.04 use port 8080 for Matrix ie [Link]
system's ip address>:8080
You can find the target's ip address by using local Matrix and clicking on the Settings icon and then on the Network
Settings icon. Or using a terminal logged in to the target system enter the below command:
ifconfig
From the output displayed, look in the section that starts with eth0. You sould see an IP address right after "inet
addr". This is the IP address you should use for remote Matrix.
With Remote Matrix you can interact with Matrix on your PC, cellphone, tablet, or any device with a modern web
browser. You can now launch text based applications or scripts and have the output streamed back to your web
browser! Launching a gui application from Matrix requires you to still look at the display device connected to the
target system.
Matrix Components
Below is a summary of all the Matrix web pages:
Menu Pages
• Contains all the directories or application that belongs to each directory level.
Application Description
• Optional and associated with a particular application.
• Provide additional information which can be useful for various reasons
• Displayed when the associated application icon is pressed.
Matrix Users Guide 41
Icons
• 96x96 png image files which are associated to a submenu or an application.
• Can be re-used by many applications
Applications
• Any application can be launched by Matrix
• Local Matrix uses the graphics display layer. If a launched application also uses the graphics display layer there
will be a conflict.
Matrix Users Guide 42
Updating Matrix
Matrix 2 utilizes a caching system that caches the information read from the .desktop files and also the html that is
generated from the various php pages. While this provides a substantial performance boost, developers must be
aware that any changes to the Matrix apps folder which includes adding, deleting and modifying files can result in
many problems within Matrix. To properly update Matrix with the latest information, Matrix's caches need to be
cleared.
php [Link]
or
In a browser enter the following url. Note replace <target ip> with the IP address of the target system.
[Link] ip>:80/[Link]
Viewing [Link] in the browser should display a blank page. There is no visual output to this webpage.
NOTE: Versions of matrix released before the Sitara Linux SDK 05.04 use port 8080 for Matrix
2. You need to clear the files located within Matrix's cache folder. Enter the following commands.
cd /usr/share/matrix-gui-2.0/cache
rm -r *
Launching Matrix
Use the following shell script in the target's terminal window to run Matrix as a background task:
/etc/init.d/matrix-gui-2.0 start
This script ensures that the touchscreen has been calibrated and that the Qt Window server is running.
Alternatively, Matrix can be launched manually with this full syntax:
NOTE: Versions of matrix released before the Sitara Linux SDK 05.04 use port 8080 for Matrix
The “-qws” parameter is required to start the Qt window server if this is the only/first Qt application running on the
system.
The third parameter is the URL that you want the application's web browser to go to. [Link] points to the
web server on the target system that is hosting Matrix.
NOTE: Versions of matrix released before the Sitara Linux SDK 05.04 use port 8080 for Matrix
For the AM37x EVM then the following command must be used:
This adds a new rotation parameter which is required due to the attached LCD orientation.
The “-display transformed:Rot90” parameter causes the Qt windowing system to rotate the display 90 degrees.
/etc/init.d/matrix-gui-2.0 stop
cd /etc/rc5.d
mv S99matrix-gui-2.0 K99matrix-gui-2.0
This will cause local Matrix to not automatically start on boot up.
How to Switch Display from LCD to DVI out for the Matrix
You can switch the display output by referring to the following: How to Switch Display Output for the Matrix
GUI
Examples
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Ex Demo
Icon=/usr/share/matrix-gui-2.0/apps/ex_directory/[Link]
Type=Directory
X-MATRIX-CategoryTarget=ex_dir
Matrix Users Guide 45
X-MATRIX-DisplayPriority=5
This .desktop above tells Matrix that this .desktop is meant to create a new directory since Type=Directory. The
directory should be named "Ex Demo" and will use the icon located within the ex_directory directory. This new
directory should be the 5th icon displayed as long as there aren't any other .desktop files that specify
X-MATRIX-DisplayPriority=5 and will be displayed in the Matrix Main Menu. Now any applications that wants to
be displayed in this directory should have their .desktop Category parameter set to ex_dir.
• Note that sometimes Linux will rename the .desktop file to the name specified in the Name field. If this occurs
don't worry about trying to force it to use the file name specified.
Now move the .desktop file and image into the ex_directory directory that was created.
If NFS isn't being used then you need to copy the ex_directory to the the /usr/share/matrix-gui-2.0/apps/ directory in
the target's filesystem.
Updating Matrix
Now in either local or remote Matrix go to the Settings directory and click on and then run the Refresh Matrix
application. This will delete all the cache files that Matrix generates and regenerates all the needed files which will
include any updates that you have made.
Now if you go back to Matrix's Main Menu the 5th icon should be the icon for your Ex Demo.
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Test App
Icon=/usr/share/matrix-gui-2.0/apps/ex_application/[Link]
Exec=/usr/share/matrix-gui-2.0/apps/ex_application/test_script.sh
Type=Application
ProgramType=console
Categories=ex_dir
X-Matrix-Description=/usr/share/matrix-gui-2.0/apps/ex_application/app_desc.html
X-Matrix-Lock=test_app_lock
Type=Application lets Matrix know that this .desktop is for an application. The name of the application is "Test
App". The icon [Link] can be found within the ex_application directory. The command to execute is a
Matrix Users Guide 46
shell script that will be located within ex_application. The script that is being ran is a simply shell script that output
text to the terminal. Therefore, the ProgramType should be set to console. This application should be added to the Ex
Demo directory from the previous example. Therefore, Categories will be set to ex_dir which is the same value that
X-MATRIX-CategoryTarget is set to. You could optionally remove the Categories field to have this application
displayed in Matrix's Main Menu. This application will also have a description page. The html file to be used is
located within the ex_application directory. A lock is also being used. Therefore, any other application including
itself that has the same lock can't run simultaneously.
Create a file named test_script.sh
echo "You are now running you first newly created application in Matrix"
echo "I am about to go to sleep for 30 seconds so you can test out the lock feature if you want"
sleep 30
echo "I am finally awake!"
The newly created script needs to have its permission set to be executable. Enter the below command to give read,
write and execute permission to all users and groups for the script:
<h2>Purpose:</h2>
<p>The purpose of this application is to demonstrate the ease in adding a new application to Matrix.</p>
Now move the .desktop file, script file, the png image located in the Ex_application.[Link] file and the html file into
the ex_application folder.
If your not using NFS but instead are using a SD card then copy ex_application into the
/usr/share/matrix-gui-2.0/apps/ directory in the target's filesystem.
Updating Matrix
Now in either local or remote Matrix go to the Settings directory and click and then run the Refresh Matrix
application. This will delete all the cache files that Matrix generates and regenerate all the needed files which will
include any updates that you have made.
Now if you go back to the Matrix's Main Menu and click on the Ex Demo directory you should see your newly
created application. Click on the application's icon and you will see the application's description page. Click the Run
button and your application will execute. If you try to run two instances of this application simultaneously via local
and remote Matrtix you will get a message saying that the program can't run because a lock exists. Because of
X-Matrix-Lock being set to test_app_lock, Matrix knows not to run two instances of a program simultaneously that
share the same lock. You can run the application again when the previous application is done running.
You have just successfully added a new application to Matrix using all the possibly parameters!
Matrix Users Guide 47
Archived Versions
• Sitara Linux SDK 05.03 [5]
References
[1] http:/ / processors. wiki. ti. com/ index. php?title=Matrix_Users_Guide& oldid=74107
[2] https:/ / gforge. ti. com/ gf/ project/ matrix-gui-v2/
[3] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 712/ 5167/ blank_icons_1. 1. tar. gz
[4] http:/ / standards. freedesktop. org/ desktop-entry-spec/ latest/
[5] http:/ / processors. wiki. ti. com/ index. php?title=Matrix_Users_Guide& oldid=97571
Overview
This article provides a description of the example applications under the Power page of the Matrix application that
comes with the Sitara SDK. This page is labled "Power" in the top-level Matrix GUI. The location of the Power icon
on the main Matrix app list may be different than shown here, depending on screen size. (Screen shots from SDK
06.00)
PLEASE NOTE: cpufreq may cause I2C lockups on AM335x EVM boards. Beaglebone is not affected. This is a
known issue related to the CPLD firmware. If the CPLD firmware on your EVM is detected to be the wrong version,
the Matrix application output will inform you of the version mismatch and continue.
Once updated CPLD firmware is available, this documentation will be updated to teach users how to upgrade their
CPLD if necessary/desired. This procedure will require an Altera programming pod.
Power Examples
Several power examples exist to provide users the ability to dynamically switch the CPU clock frequency. The
frequencies shown are those available for your system. Upon making a selection, you will be presented a
confirmation page. The readout number "BogoMIPS" will confirm the new clock frequency. Please note that the
frequency will read out with a slight margin compare to the intended frequency. For example, if you select 1GHz,
you may see a number like 998.84 (in MHz). This is normal. After reviewing the confirmation page, press the Close
button to return to normal Matrix operation.
Other power examples are provided which may be useful for power management developers and power users. These
have been included in Matrix in part to make users aware that these valuable debugging tools exist, in addition to the
convenience of executing each application from the GUI. In depth descriptions for each application follow. Similar
descriptions are also given via description pages in Matrix, which will be displayed when clicking the button. Where
appropriate, the documentation will point out the corresponding command line operation.
The Suspend/Resume button demonstrates the ability to put the machine into a suspended state. See below for
complete documentation of this feature.
AM335x Power Management User Guide 48
Please note that the order of applications which appear on your screen may differ from the picture below, due to
devices with different screen sizes, and differences between different versions of Matrix. Screen shot is from SDK
06.00.
Set Frequency
This command opens up another screen from which you choose the frequency based on the available frequencies on
the board. Here is a picture of the screen you will see:
The following are the Linux command line equivalents for selecting the operating frequency. Please note that
changing the frequency also changes the MPU voltage accordingly. The commands are part of the "cpufreq" kernel
interface for selecting the OPP (operating performance point). Cpufreq provides an opportunity to save power by
adjusting/scaling voltage and frequency based on the current cpu load.
Suspend/Resume
(command line equivalent)
mkdir /debug
mount -t debugfs debugfs /debug
echo mem > /sys/power/state
This command sequence will put the platform into suspend mode. The final command initiates the suspend.
IMPORTANT NOTE: When running this from Matrix, the system will only properly resume if the user sends a
keypress to the UART. If the user presses the touchscreen or a button on the EVM, resume will not complete
normally. This issue will be fixed in a future release. If you run these commands from the terminal - all of the normal
wakeup events (UART keypress, touchscreen press, EVM keypad press) will operate correctly.
SmartReflex
SmartReflex is an active power management technique which optimizes voltage based on silicon process ("hot" vs.
"cold" silicon), temperature, and silicon degradation effects. In most cases, SmartReflex provides significant power
savings by lowering operating voltage.
On AM335x, SmartReflex is enabled by default in Sitara SDK releases since [Link]. The SmartReflex driver
requires the use of either the TPS65217 or TPS65910 PMIC. Furthermore, SmartReflex is currently supported only
on the ZCZ package. Please note that SmartReflex may not operate on AM335x sample devices which were not
programmed with voltage targets. To disable SmartReflex, type the following commands at the target terminal:
mkdir /debug
mount -t debugfs debugfs /debug
cd /debug/smartreflex ==> NOTE: You may not see 'smartreflex' node
if you have early silicon. In this case SmartReflex operation is not
possible.
echo 0 > autocomp
(Performing "echo 1 > autocomp" will re-enable SmartReflex)
AM335x Power Management User Guide 49
On AM335x, to compile SmartReflex support out of the kernel, follow this procedure to modify the kernel
configuration:
Discussion
Certain systems are unable to scale voltage, either because they employ a fixed voltage regulator, or use the ZCE
package of AM335x. Without being able to scale voltage, the power savings enabled via DVFS are lost. This is
because the current version of the omap-cpufreq driver requires a valid MPU voltage regulator in order to operate.
The purpose of this DFS feature is to enable additional power savings for systems with these sort of limitations.
When using the ZCE package of AM335x, the CORE and MPU voltage domains are tied together. Due to Advisory
1.0.22, you are not allowed to dynamically modify the CORE frequency/voltage because the EMIF cannot support it.
However, to achieve maximum power savings, it may still be desirable to use a PMIC which supports dynamic
voltage scaling, in order to use Adaptive Voltage Scaling (aka SmartReflex or AVS). This implementation of DFS
does not affect the ability of AVS to optimize the voltage and save additional power.
After applying the patch, the user must modify the kernel defconfig in order to enable the DFS feature. You should
also configure the "Maximum supported DFS voltage" (shown below) to whatever the fixed voltage level is for your
system, in microvolts. For example, use the value 1100000 to signify 1.1V. The software will use the voltage level
that you specify to automatically disable any Operating Performance Points (OPPs) which have voltages above that
level.
On AM335x, first apply the patch, then follow this procedure to modify the kernel configuration:
Power Savings
• Tested on a rev 1.2 EVM, running Linux at idle.
• The delta between power consumption at 300MHz and 600MHz, with voltage unchanged, is approximately
75mW.
Caveats
• According to section 5.5.1 of the AM335x datasheet, operation of the Ethernet MAC and switch (CPSW) is NOT
supported for CORE OPP50.
• Note that MPU OPP50 operation is not supported for the 1.0 silicon revision (silicon errata Advisory 1.0.15).
• Also be aware of Advisory 1.0.24, which states that boot may not be reliable because OPP100 frequencies are
used by ROM at OPP50 voltages. This is currently under further investigation.
• DDR2 memory must be used (as on the AM335x EVM up to rev 1.2). DDR2 memory timings must be modified
to operate at 125MHz.
Power Savings
• On an EVM (rev 1.2), active power consumption when Linux is idle for CORE and MPU rails was measured at
150mW. Using the out-of-the-box SDK at OPP100 (MPU and CORE), the comparable figure is 334mW.
• Further savings are possible by disabling Ethernet drivers in the Linux defconfig. Refer to
AM335x_CPSW_(Ethernet)_Driver's_Guide#Driver_Configuration and disable "Ethernet driver support" to
acheive additional power savings.
AM335x Power Management User Guide 51
Overview
This article provides a description of the example applications under the Power page of the Matrix application that
comes with the Sitara SDK. This page is labled "Power" in the top-level Matrix GUI. The location of the Power icon
on the main Matrix app list may be different than shown here, depending on screen size. Screen shot is from SDK
06.00.
Power Examples
Several power examples exist to provide users the ability to dynamically switch the CPU clock frequency. The
frequencies shown are those available for your system. Upon making a selection, you will be presented a
confirmation page. The readout number "BogoMIPS" will confirm the new clock frequency. Please note that the
frequency will read out with a slight margin compare to the intended frequency. For example, if you select 1GHz,
you may see a number like 998.84 (in MHz). This is normal. After reviewing the confirmation page, press the Close
button to return to normal Matrix operation.
Other power examples are provided which may be useful for power management developers and power users. These
have been included in Matrix in part to make users aware that these valuable debugging tools exist, in addition to the
convenience of executing each application from the GUI. In depth descriptions for each application follow. Similar
descriptions are also given via description pages in Matrix, which will be displayed when clicking the button. Where
appropriate, the documentation will point out the corresponding command line operation.
The Suspend/Resume button demonstrates the ability to put the machine into a suspended state. See below for
complete documentation of this feature.
AM37x Power Management User Guide 52
Please note that the order of applications which appear on your screen may differ from the picture below, due to
devices with different screen sizes, and differences between different versions of Matrix. Screen shot is from SDK
06.00.
This program allows the user a simple method to quickly display a snapshot of the state of the PRCM registers that
was taken just after resume. Used to debug suspend/resume problems.
This program allows the user a simple method to quickly display the current state of the the PRCM registers via an
exhaustive dump.
Set Frequency
This command opens up another screen from which you choose the frequency based on the available frequencies on
the board. Here is a picture of the screen you will see (screen shot is from SDK 06.00.):
The following are the Linux command line equivalents for selecting the operating frequency. Please note that
changing the frequency also changes the MPU voltage accordingly. The commands are part of the "cpufreq" kernel
interface for selecting the OPP (operating performance point). Cpufreq provides an opportunity to save power by
adjusting/scaling voltage and frequency based on the current cpu load.
This program allows the user a simple method to quickly display a snapshot of the state of the PRCM registers that
was taken just prior to suspend. The snapshot is taken before the jump occurs into SRAM idle code. Used to debug
suspend/resume problems.
AM37x Power Management User Guide 53
The first set of information that is displayed in the dump gives the state statistics for each power domain. Each power
domain state is shown with an associated off-mode counter in parenthesis. The RET_LOGIC_OFF counter refers to
the logic off counter, and the RET_MEMBANKN_OFF counter refers to the per-bank memory off counter.
Following that, each of the clock domain active clocks is displayed along with the associated use count. The use
count refers to the number of enabled downstream clocks from this clock domain. Once the count reaches 0, the
clock domain can be put to sleep.
Suspend/Resume
(command line equivalent)
mkdir /debug
mount -t debugfs debugfs /debug
echo 1 > /debug/pm_debug/sleep_while_idle
echo 1 > /debug/pm_debug/enable_off_mode
echo mem > /sys/power/state
SmartReflex
SmartReflex is an active power management technique which optimizes voltage based on silicon process ("hot" vs.
"cold" silicon), temperature, and silicon degradation effects. In most cases, SmartReflex provides significant power
savings by lowering operating voltage.
On AM37x, SmartReflex is generally disabled by default. To enable SmartReflex, type the following commands at
the target terminal:
mkdir /debug
mount -t debugfs debugfs /debug
cd /debug/voltage/vdd_core/smartreflex
echo 1 > autocomp
cd /debug/voltage/vdd_mpu/smartreflex
echo 1 > autocomp
(Note the "echo 0 > autocomp" would be used to disable SmartReflex)
On AM37x, to compile SmartReflex support out of the kernel, follow this procedure to modify the kernel
configuration:
AM37x Power Management User Guide 54
To configure the UBL to a particular OPP one must set the define DEVICE_CONFIG_OPPOPP to one of the
supported OPPs. For example, to configure UBL for (456MHz,1.3V) OPP:
CAUTION
Please refer to the data sheet for device you are using to make sure the OPP you are setting is actually supported by
the device.
Now, select the maximum frequency the CPU should run at:
Overview
Multimedia codecs on ARM based platforms could be optimised for better performance using the tightly coupled
Neon co-processor. Neon architecture works with its own independent pipeline and register file. Neon technology is
a 128 bit SIMD architecture extension for ARM Cortex-A series processors. It is designed to provide acceleration for
multimedia applications.
Supported Platforms
• AM37x
• Beagleboard-xM
• AM35x
• AM335x EVM
Multimedia on Cortex-A8
Codec portfolio
AM SDK includes ARM based multimedia using opensource GPLv2+ FFmpeg/Libav codecs, the codec portfolio
includes MPEG-4, H.264 for video in VGA/WQVGA/480p resolution and AAC codec for audio.
The script file to launch multimedia demo detects the display enabled and accordingly decodes VGA or 480p video.
In AM37x platform VGA clip is decoded when LCD is enabled and 480p is decoded when DVI out is enabled.
Scripts in "Settings" menu can be used to switch between these two displays.
ARM Multimedia Users Guide 60
The multimedia pipeline is constructed using gst-launch, GStreamer elements such as qtdemux is used for demuxing
AV content. Parsers are elements with single source pad and can be used to cut streams into buffers, they do not
modify the data otherwise.
"filename" is defined based on the selected display device which could be LCD of DVI.
ARM Multimedia Users Guide 61
MPEG4 Decode
MPEG-4 decode example application demonstrates use of MPEG-4 video codec as mentioned in the description
page below.
H.264 Decode
H.264 decode example application demonstrates use of H.264 video codec as mentioned in the description page
below.
AAC Decode
AAC decode example application demonstrates use of AAC video codec as mentioned in the description page below.
Streaming
Audio/Video data can be streamed from a server using souphttpsrc. For example to stream audio content, if you
set-up an apache server on your host machine you can stream the audio file [Link] located in the files
directory using the pipeline
gst-launch souphttpsrc location=[Link] address>/files/[Link] ! aacparse ! faad ! alsasink
MPEG4 + AAC 1G 22 42 58
VGA Clip: HistoryOfTIAV-VGA-r.mp4
Video: mpeg4, yuv420p, 360x640, 1326 kb/s, 24
800M 55 70
fps
Audio: aac, 48000 Hz, stereo, s16, 69 kb/s
480p Clip: HistoryOfTIAV-480p.mp4 600M 70 86
Video: mpeg4, yuv420p, 720x405, 1778 kb/s, 24
fps 300M 99 NA
Audio: aac, 48000 Hz, stereo, s16, 79 kb/s
MPEG4 1G 15 35 56
VGA Clip: HistoryOfTI-VGA-r.m4v
Video: mpeg4, yuv420p, 360x640, 24 fps 800M 44 68
Audio: NA
480p Clip: HistoryOfTI-480p.m4v 600M 54 88
Video: mpeg4, yuv420p, 720x405, 28 fps
300M 99 NA
Audio: NA
H.264 1G 16 77 95
VGA Clip: HistoryOfTI-VGA-r.264
Video: h264 (Main), yuv420p, 360x640, 29.97 fps 800M 87 99
Audio: NA
480p Clip: HistoryOfTI-480p.264 600M 97 99
Video: h264 (Main), yuv420p, 720x406, 29.97 fps
300M 99 NA
Audio: NA
300M 25
The following results are obtained on an AM335X EVM (DDR2) and an AM335X Starter Kit (DDR3) using
pre-built SDK MLO, u-boot, kernel and file-system on an SD Card setup.
MPEG4 720M 16 42 88 71 15 42 76 60
WQVGA Clip:
HistoryOfTI-WQVGA.m4v
Video: mpeg4, yuv420p, 480x272, 24
600M 45 98 78 46 88 69
fps
Audio: NA
480p Clip: HistoryOfTI-480p.m4v
Video: mpeg4, yuv420p, 720x405, 28 500M 55 97 88 53 97 79
fps
Audio: NA
WVGA Clip: HistoryOfTI-WVGA.m4v
Video: mpeg4, yuv420p, 800x450, 24 275M 88 96 95 87 96 96
fps
Audio: NA
H.264 720M 16 62 98 98 16 63 98 98
WQVGA Clip:
HistoryOfTI-WQVGA.264
Video: h264, yuv420p, 480x272, 29.97
600M 73 98 97 70 98 98
fps
Audio: NA
480p Clip: HistoryOfTI-480p.264
Video: h264, yuv420p, 720x406, 29.97 500M 81 97 97 79 98 97
fps
Audio: NA
WVGA Clip: HistoryOfTI-WVGA.264
Video: h264, yuv420p, 800x450, 29.97 275M 95 96 92 96 96 93
fps
Audio: NA
oProfile
OProfile is a common profiling tool used on Linux platforms, a kernel driver and a user daemon is used to collect
samples of data. This tool can be used to profile a huge variety of system-level statistics. Please refer OProfile [2] for
additional details.
Listed below are the profiling results of Mpeg4 + AAC in VGA resolution at 300MHz and 1GHz via NFS server.
Profiling results are obtained from the serial terminal.
In order to profile the multimedia application kernel has to be compiled with oprofile enabled. Followed by this,
opcontrol has to be enabled for the first time
Setopp power/clocks application can be used to scale the clock settings, the example below shows the settings for
opp2, similarly clock can be set to 1GHz using the [Link] application.
root@am37x-evm:~# [Link]
Set to operating point 2: CPU = 300 MHz
-------------------------------------------------------------
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 299.95
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
profiling can be calibrated by executing the following set of applications in the given sequence
opcontrol is used to initiate the profiling and opreport to generate the profiling results
300MHz 1GHz
ARM Multimedia Users Guide 67
Power Benchmark
The power measurements below are analyzed on the AM3730 ES1.2 processor on a Rev.G. EVM. Here we indicate
the power measurement after first boot, in suspend mode and with additional power features enabled.
The jumper settings for power measurements are:
J6 VDD_MPU_IVA
J5 VDD_CORE
Suspend Mode
The Suspend/Resume application in Power/Clocks SDK example application drives the system in suspend mode.
The measurements below indicate total power consumption in suspend mode.
ARM Multimedia Users Guide 68
Jumper Pin No Register Value Voltage Drop [mV] Voltage [V] Current [mA] Power [mW]
Total 58.94
After Resume
After the system is resumed from sleep mode, when sleep_while_idle and enable_off_mode features are enabledr.
Jumper Pin No Register Value Voltage Drop [mV] Voltage [V] Current [mA] Power [mW]
Total 620.14
MPEG4 Decode
After the system resume with enhanced power save features enabled, the total power consumption for MPEG4
decode is as shown below.
Jumper Pin No Register Value Voltage Drop [mV] Voltage [V] Current [mA] Power [mW]
Total 724.48
Jumper Pin No Register Value Voltage Drop [mV] Voltage [V] Current [mA] Power [mW]
Total 561.98
gst-launch is used to build and run basic multimedia pieplines to demonstrate audio/avideo decoding examples.
ARM Multimedia Users Guide 70
GStreamer
• Multimedia processing library
• Provides uniform framework across platforms
• Includes parsing & A/V sync support
• Modular with flexibility to add new functionality via plugins
• Easy bindings to other frameworks
Some of the build dependencies for GStreamer are shown here:
ARM Multimedia Users Guide 71
Resolution 480x270
Audio 44.1KHz
Codec Description
ffenc_a64multi5 FFmpeg Multicolor charset for Commodore 64, extended with 5th color (colram) encoder
ffenc_flv FFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 encoder
ffdec_flv FFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 decoder
ffdec_vp6a FFmpeg On2 VP6 (Flash version, with alpha channel) decoder
ffdec_vqavideo FFmpeg Westwood Studios VQA (Vector Quantized Animation) video decoder
ffdec_aac_latm FFmpeg AAC LATM (Advanced Audio Codec LATM syntax) decoder
Other
• For technical support please post your questions at [Link] or search forum post Database.
Archived
Sitara SDK 05.07 [7]
References
[1] http:/ / www. arm. com/ products/ processors/ technologies/ neon. php
[2] http:/ / oprofile. sourceforge. net/ about/
[3] http:/ / elinux. org/ OMAP_Power_Management
[4] http:/ / ffmpeg. org/
[5] http:/ / ffmpeg. org/ legal. html
[6] http:/ / gstreamer. freedesktop. org/
[7] http:/ / processors. wiki. ti. com/ index. php?title=ARM_Multimedia_Users_Guide& oldid=128910
Introduction
This users guide provides an overview of camera loopback example integrated in matrix application on AM37x
platform. This application can be executed by selecting the "Camera" icon at the top-level matrix.
Supported Platforms
• AM37x
Connectivity
LI-3M02 daughter card is connected to the 26-pin J31 connector on the EVM. 24MHz oscillator on the LI daughter
card is used to drive the sensor device, alternatively camera clock output generated by processor ISP block can be
used to drive the sensor pixel clock. Horizontal sync (HS) and vertical sync (VS) lines are used to detect end of line
and field respectively. Sensor data line CMOS D4:D11 are connected to the processor D4:D11.
Camera Users Guide 84
[1:1]===>[5:0] INACTIVE
ISP_CTRL: 0x480BC040
29C14C
ISP_SYSCONFIG: 0x480BC004
2000
ISP_SYSSTATUS: 0x480BC008
1
ISP_IRQ0ENABLE: 0x480BC00C
811B33F9
ISP_IRQ0STATUS: 0x480BC010
0
ISP_IRQ1ENABLE: 0x480BC014
0
ISP_IRQ1STATUS: 0x480BC018
80000300
CCDC Registers:
CCDC_PID: 0x480BC600
1FE01
CCDC_PCR
Camera Users Guide 87
0
CCDC_SYN_MODE: 0x480BC604
31000
CCDC_HD_VD_WID: 0x480BC60C
0
CCDC_PIX_LINES: 0x480BC610
0
CCDC_HORZ_INFO: 0x480BC614
27F
CCDC_VERT_START: 0x480BC618
0
CCDC_VERT_LINES: 0x480BC61C
1DF
CCDC_CULLING: 0x480BC620
FFFF00FF
CCDC_HSIZE_OFF: 0x480BC624
500
CCDC_SDOFST: 0x480BC628
0
CCDC_SDR_ADDR: 0x480BC62C
1C5000
CCDC_CLAMP: 0x480BC630
10
CCDC_DCSUB: 0x480BC634
40
CCDC_COLPTN: 0x480BC63
0
CCDC_BLKCMP: 0x480BC63C
0
CCDC_FPC: 0x480BC640
0
CCDC_FPC_ADDR: 0x480BC644
0
CCDC_VDINT: 0x480BC648
1DE0140
CCDC_ALAW: 0x480BC64C
0
CCDC_REC: 0x480BC650
0
CCDC_CFG: 0x480BC65
8800
CCDC_FMTCFG: 0x480BC658
0
CCDC_FMT_HORZ: 0x480BC65C
280
CCDC_FMT_VERT: 0x480BC660
1E0
Camera Users Guide 88
CCDC_PRGEVEN0: 0x480BC684
0
CCDC_PRGEVEN1: 0x480BC688
0
CCDC_PRGODD0: 0x480BC68C
0
CCDC_PRGODD1: 0x480BC690
0
CCDC_VP_OUT: 0x480BC694
3BE2800
CCDC_LSC_CONFIG: 0x480BC698
6600
CCDC_LSC_INITIAL: 0x480BC69C
0
CCDC_LSC_TABLE_BA: 0x480BC6A0
0
CCDC_LSC_TABLE_OF: 0x480BC6A4
0
Other
• For technical support please post your questions at [Link] [6] or search forum post Database.
References
[1] https:/ / www. leopardimaging. com/ 3M_Camera_Module_Board. html
[2] https:/ / www. leopardimaging. com
[3] http:/ / www. e-consystems. com
[4] [Link] com
[5] http:/ / processors. wiki. ti. com/ index. php/ UserGuideOmap35xCaptureDriver_PSP_04. 02. 00. 07
[6] http:/ / e2e. ti. com
Cryptography Users Guide 89
Overview
This article provides a description of the example applications under the cryptography page of the Matrix application
that comes with the Sitara SDK. This page is labled "Cryptos" in the top-level Matrix GUI.
Devices Supported
All Sitara SDK's provide cryptography through OpenSSL, but the following devices have cryptographic hardware
accelerators and drivers:
• AM3517 - AES, DES, 3DES, SHA, MD5
• AM37x - AES, DES, 3DES, SHA, MD5
• AM335x - AES, SHA, MD5, RNG
The example applications have been designed to use hardware accelerators when they are available and fall back to a
pure software implementation when hardware accelerators are not available.
Cryptography Users Guide 90
Cryptography Examples
All of the examples under the Cryptos page use the OpenSSL command line application to perform cryptographic
functions. A comprehensive list of cryptographic functionality using OpenSSL is beyond the scope of the out-of-box
experience intended with the Matrix GUI. However, the examples present a nice variety of cryptographic functions
that are available with OpenSSL on the Sitara platform.
OpenSSL Performance
This example executes the OpenSSL built-in speed test for a variety of cryptographic algorithms. The results of the
test are displayed on the screen and also written to the file [Link] in the top level directory of the
target filesystem.
Certificate Generation
This example generates a web page certificate for use with a secure web server. The certificate is held in the file
[Link]. This file will appear in the top level directory of the target file system. If the certificate already
exists, then the example will fail and prompt the user to delete the existing certificate ([Link]) before
generating a new one.
Secure Server
Once the web certificate ([Link]) has been generated, the secure web server can be started on the target
board. Pointing a modern web browser at the target should generate a warning that the certificate is self-signed.
This means that the certificate has not been verified by a trusted third party such as Verisign. Depending on the
browser, you can view details of the certificate. In the example below the target board has an IP address of
[Link]. When Internet Explorer is pointed to the URL [Link] it first warns the user
Cryptography Users Guide 91
that there is a problem with the website's security certificate. Make sure that you use https:// and the port
number :4433 with the IP address in the URL of the browser. Clicking the link to continue anyway provides the
page below. And clicking the "Certificate Error" button at the top of the page will provide details of the certificate.
NOTE
This is currently not functioning as expected in SDK 6.00.
Certificate Info
This example simply prints out details of the generated certificate ([Link]).
AES 256
This example will perform an encrypt/decrypt cycle on a 10M file of random data with the AES 256 algorithm. The
10M file called rnddata will be generated if it doesn't already exist. The result of the decryption is compared to the
original file and the results are displayed to the screen.
SHA Hash
This example will perform a SHA1 hash function on the 10M file of random data (rnddata). If the file doesn't exist,
it is generated. The result of the hash is displayed to the screen.
Cryptography Users Guide 92
Messages printed during bootup will indicate that initialization of the crypto modules has taken place.
In the configuration menu, scroll down to Device Drivers and hit enter. Now scroll to Character devices and hit
enter.
Use the spacebar to select the Hardware Random Number Generator support and also select OMAP4 Random
Number Generator support. The screen should look like below.
Now rebuild the kernel accoring to the User's Guide and boot up the board with the resulting kernel. The following
message should be part of the boot-up messages.
Once the system is booted up, the hwrng device should now show up in the filesystem.
root@am335x-evm:~# ls -l /dev/hwrng
crw------- 1 root root 10, 183 Jan 1 2000 /dev/hwrng
root@am335x-evm:~#
AES, SHA, TRNG Hardware Accelerators using OpenSSL (requires OCF-linux kernel
support)
The device drivers for AES and SHA/MD5 hardware acceleration is configured and built into the kernel by default
in SDK [Link]. No other special setup is needed for OpenSSL to access the crypto modules.
First, the kernel from the SDK must be configured and built according to the SDK User's Guide.
[Link]/[Link]/AMSDK_Linux_User%27s_Guide [2]
The General Purpose (GP) EVMs on TI SoCs allows access to built in cryptographic accelerators. Inorder to use
these drivers from OpenSSL, the drivers on their own have no contact with userspace. For this, a special driver is
available which abstracts the access to these accelerators through the Open Cryptographic Framework for Linux
(OCF-Linux).
The demo application under the crypto menu of Matrix will load and use the OCF driver kernel modules
automatically to perform hardware accelerated crypto functions. The process of manually loading the kernel modules
and using the driver is explained below.
Cryptography Users Guide 94
OCF-Linux is itself a special device driver which provides a general interface for higher level applications such as
OpenSSL to access hardware accelerators.
Kernel modules are required for OCF-linux, OCF cryptosoft and OCF cryptodev. All these 3 modules are a part of
the OCF-linux package.
The filesystem which comes with the SDK comes built with the OCF-Linux kernel modules and the TI driver which
directly accesses the hardware accelerators is built into the kernel.
From the target boards perspective the drivers are located in the following directories:
/lib/modules/3.8.4-01427-g1eb3bbb-dirty/kernel/crypto/ocf/[Link]
/lib/modules/3.8.4-01427-g1eb3bbb-dirty/kernel/crypto/ocf/[Link]
/lib/modules/3.8.4-01427-g1eb3bbb-dirty/kernel/crypto/ocf/[Link]
To use the drivers they must first be installed. Use the insmod command to install the drivers. The TI crypto driver
allows a parameter to be passed in to indicate if DMA should be used. The following log shows the commands used
to install the modules and query the system for the state of all system modules.
root@am37x-evm:~# lsmod
Module Size Used by
cryptosoft 14350 0
cryptodev 11962 0
ocf 25277 2 cryptosoft,cryptodev
root@am37x-evm:~#
After the modules are installed, OpenSSL commands may be executed which take advantage of the hardware
accelerators through the OCF-Linux driver. The following example demonstrates the OpenSSL built-in speed test to
demonstrate performance. The addition of the parameter -engine cryptodev tells OpenSSL to use the OCF-Linux
driver if it exists.
root@am37x-evm:~# openssl speed -evp aes-128-cbc -engine cryptodev
root@am37x-evm:~#
root@am37x-evm:~#
root@am37x-evm:~#
Using the Linux time -v function gives more information about CPU usage during the test.
root@am37x-evm:~# time -v openssl speed -evp aes-128-cbc -engine cryptodev
Swaps: 0
Signals delivered: 0
Exit status: 0
When the cryptodev driver is removed, OpenSSL reverts to the software implementation of the crypto algorithm.
The performance using the software only implementation can be compared to the previous test.
root@am37x-evm:~# rmmod cryptodev
Swaps: 0
Signals delivered: 0
Exit status: 0
Crypto Performance
• AM335x Crypto Performance using openssl [3]
Read AM3517 performance tests using cryptotest [4]
Archived Versions
• [Link] [5]
References
[1] http:/ / processors. wiki. ti. com/ index. php/ AMSDK_Linux_User%27s_Guide#Customizing_the_Configuration
[2] http:/ / processors. wiki. ti. com/ index. php/ AMSDK_Linux_User%27s_Guide
[3] http:/ / processors. wiki. ti. com/ index. php/ AM335x_Crypto_Performance
[4] http:/ / processors. wiki. ti. com/ index. php/ Build_Crypto_Module_for_Sitara#Test_the_Module
[5] http:/ / processors. wiki. ti. com/ index. php?title=Cryptography_Users_Guide& oldid=136822
Oprofile User's Guide 97
Supported Platforms
Oprofile is supported on all ARM devices
Oprofile Overview
• OProfile is a statistical continuous profiler. In other words, profiles are generated by regularly sampling the
current registers on each CPU (from an interrupt handler, the saved PC value at the time of interrupt is stored),
and converting that runtime PC value into something meaningful to the programmer.
• Regularly sampling the PC value like this approximates what actually was executed and how often - more often
than not, this statistical approximation is good enough to reflect reality. In common operation, the time between
each sample interrupt is regulated by a fixed number of clock cycles. This implies that the results will reflect
where the CPU is spending the most time; this is obviously a very useful information source for performance
analysis.
• Taken verbatim from [Link]
This is only a small set of examples to help show how Oprofile can be used. Anyone wishing more information
should look here: [Link]
Oprofile Limitations
Due to a bug in the Cortex-A8, only the internal timer mode is used for Oprofile. While Oprofile provides the
capability to utilize ARM hardware performance counters, due to the bug, this feature has been disabled.
The scripts used to support these apps are found in your target file system at /usr/bin/
ls /usr/bin/runOp*
Initial Boot Up
When you first boot up a target system containing a Sitara Software Development Kit (SDK), Matrix should be
automatically started. Select the Oprofile button to bring up all the Oprofile applications. Matrix Oprofile
Applications Page:
opcontrol --vmlinux=/boot/vmlinux*
• Run Signal Parent - Running this demo will profile a simple unoptimized application called "Signal Parent".
• Running this application causes profile data to be stored internally. To view the data you must generate a
report.
• In this application a parent process forks a child process which does a little work and then signals the parent
when it is complete.
Oprofile User's Guide 99
• The parent busy waits by constantly polling status waiting for the child to complete.
• Actual commands:
opcontrol --reset
opcontrol --start
signal_parent
opcontrol --stop
• Simple Report This will generate a simple report based on the last application you profiled.
• Notice below how signal parent takes up 86.2% of the total samples taken. Your numbers may vary depending
platform differences.
• Actual command
opreport
• Run Signal Parent Optimized - This is the same application as "Run Signal Parent", however after seeing how
much time is wasted polling, it was redesigned. The parent now goes to sleep and waits for a signal from the child
to complete.
• After running this application, you can run the Simple Report again to see that now the "Run Signal Parent"
application is only sampled 0.38% of the time.
• Actual commands:
opcontrol --reset
opcontrol --start
signal_parent.opt
opcontrol --stop
opreport
Oprofile User's Guide 100
• Additional reports - There are additional reports available to show the flexibility of the report tool, however
these variations are only a small subset of the capabilities of Oprofile.
Senario Description
Bluetooth A2DP profile Play a *.wav music file from the EVM on a stereo headset
Bluetooth OPP profile Send a *.jpg image from the EVM to a cellular phone via OPP profile
Bluetooth FTP profile Sends a text file from the EVM to a PC via FTP profile
Wireless LAN ping Connect to an Access Point and perform a ping test
Wireless LAN throughput Test UDP downstream throughput using the iPerf tool
Web browsing through the WLAN Browse the web over WLAN using a PC connected to the EVM Ethernet port
Bluetooth and WLAN coexistence Play a *.wav music file from the EVM on a stereo headset while browsing the web over WLAN
Bluetooth Demos
Classic Bluetooth
• Demos using GUI
• SPP
• HID
• A2DP
• Bluetooth Demos using Command Line in Linux
• Bluetooth Demos using Command Line in Windows
WLAN Demos
First Time
If running the WLAN demos on an EVM for the first time, it is recommended that you first complete the two steps
below:
• Step 1: Calibration – Calibration is a one-time procedure, performed before any WLAN operation. Calibration is
performed once after the board assembly, or in case the 12xx connectivity daughtercard or EVM are replaced
(refer to Calibration Process).
You may refer to Linux Wireless Calibrator [1] page for more instruction.
WL127x WLAN and Bluetooth Demos 101
• Step 2: MAC address settings - This is a one-time procedure, done after the calibration, and before any WLAN
operation is performed (refer to: <modifying WLAN MAC address>)
Miscellaneous Demos
• Setting Host CPU clock
• AM37x Wlan Throughput Measurement
• Suspend Resume Operation
• How to work with A band
Regulatory Domain
• WLAN rates [17]
• WLAN channels [18]
• How to control Regulatory Domain [19]
• External links:
• Regulatory Domain - General [20]
• Regulatory rules [21]
References
[1] http:/ / linuxwireless. org/ en/ users/ Drivers/ wl12xx/ calibrator
[2] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_Station_demo_NLCP_GUI
[3] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_Station_Connect_to_non_secured_network
[4] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_Station_Connect_to_non_Secured_AP_using_WPA_Supplicant_Configuration_file
[5] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_Station_demo_NLCP
[6] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_WLAN_Station_demo_NLCP#Perform_Web-Browsing_over_the_EVM_GUI
[7] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_WLAN_Station_demo_NLCP_GUI#Perform_Web-Browsing_over_the_EVM_GUI
[8] http:/ / processors. wiki. ti. com/ index. php/ AM37x_Wireless_Connectivity_Suspend_Resume_Operation
[9] http:/ / processors. wiki. ti. com/ index. php/ AM37x_Wireless_Connectivity_Suspend_Resume_WOWLAN_Operation
[10] http:/ / processors. wiki. ti. com/ index. php/ AM18x_Wireless_Connectivity_Suspend_Resume_Operation
[11] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_AP_No_Security
[12] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_AP_demo_NLCP_GUI
[13] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts
[14] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#Create_1:2_P2P_Group_-_Connect_in_pbc_.
28Push_button_Control. 29
[15] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#Create_Autonomous_1:2_P2P_Group_. 28Push_button_Control.
29
[16] http:/ / processors. wiki. ti. com/ index. php/
OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#Create_1:2_P2P_Group_-_Connect_with_PIN_code
[17] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_rates
[18] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_WLAN_channels
[19] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_Regulatory_Domain
[20] http:/ / linuxwireless. org/ en/ developers/ Regulatory
[21] http:/ / linuxwireless. org/ en/ developers/ Regulatory/ processing_rules
OMAP Wireless Connectivity OpenSource Compat Wireless Build 103
./scripts/driver-select wl12xx
you have a kernel you do not have installed but yet want to build the compat-wireless-2.6 drivers for it you can use
this syntax:
• export the following variables:
KLIB: point to the location of your root file system (NFS_ROOT). See Setting build environment section
KLIB_BUILD: points to the location of your linux kernel source
for example:
export KLIB_BUILD=~/oe/arago-tmp/work/am37x-evm-arago-linux-gnueabi/[Link]-r97/git/
export KLIB=${NFS_ROOT}
• Ensure that configuration of the kernel the wl12xx driver is compiled with contains the following switches [2].
• Now build the compat-wireless package and install it to your root file system (pointed by NFS_ROOT)
make
make install-modules
You should now have all the relevant modules installed in your root file system under
${NFS_ROOT}/lib/modules/<kernel version>/updates/...
For more details regarding the consepts of compat-wireless please refer to the linux wireless [3] home page
HOME
References
[1] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 555/ 4629/ ti-compat-wireless-wl12xx-2011-05-17-r3-m1-rc2. tgz
[2] http:/ / processors. wiki. ti. com/ index. php/ OMAP_Wireless_Connectivity_OpenSource_Kernel_Switches
[3] http:/ / linuxwireless. org/ en/ users/ Download
[4] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 557/ 4631/ ti-linux-firmware-wl12xx-r3-m1-rc2. tar. gz
Introduction
compat-wireless backports both the bluetooth and 802.11 subsystems down to older kernels. To be able to
synchronize backporting the latest and greatest the [Link] tree is used as its main source for kernel updates.
General Linux kernel compatibility is addressed through a general kernel compatibility tree, [Link].
compat-wireless then has its own tree for specific wireless compatibility.
Building Instructions
You will then need to checkout three trees to start hacking on compat-wireless:
git://[Link]/TI-OpenLink/[Link]
git://[Link]/TI-OpenLink/[Link]
git://[Link]/TI-OpenLink/[Link]
To update a git, get inside the directory that inclides the git and type:
[Link]
The [Link] tree brings all subsystems being worked on for the next kernel release into one tree. This means
wl12xx will have what people today are working on for the 3.x kernel release.
[Link]
The compat git tree is a general kernel compatibility layer which can be shared among different compatibility
projects, or drivers. compat-wireless is just one of the kernel compatibility projects using [Link]. [Link]
builds a general compatibility module, compat, and any additional modules to let you get new general kernel updates
from future kernels on your old kernels.
[Link]
Anything that is not general kernel compatibility but instead specific to 802.11 or bluetooth goes into
[Link]
Now that we have the git trees, we need to point to them by exporting the following variables:
export GIT_TREE=/home/user/Projects/MAC80211/wl12xx
export GIT_COMPAT_TREE=/home/user/Projects/MAC80211/compat
Where:
• The GIT_TREE variable points to the wl12xx git previously downloaded.
• The GIT_COMPAT_TREE points to the compat git previously downloaded.
Now we need to run scripts/[Link] in order to apply the compat-wireless-2.6 patches and update the
Compat accordingly.
cd /home/user/Projects/MAC80211/compat-wireless
scripts/[Link]
In general, you can update your local sources based on these [Link] and [Link] trees:
Now we need to select the wl12xx. Switch to directory compat-wireless-2.6 and invoke:
scripts/driver-select wl12xx
Deploy to rootfs
In order to install the Compat on the EVM you need to pick up the following kernel objects:
Now you need to reboot the EVM in order to run those kernel objects.
How to Play
Battleship is a well-known 2 player game where the objective is to sink all of your enemy ships.
On the start of the game players set up the positions for each of their ships, and then they take turns guessing squares
on their opponent's grid and seeing if those squares are occupied (a 'hit') or not (a 'miss').
The first player to destroy all of his opponents ships wins the game.
For more details please follow: <Battleship Game description> [1]
Figure 1 -
WiFi Direct Icon
On the WiFi-Direct main screen, check the top-left check-box called "Enable WiFi Direct". Then, click on
"Settings" button as shown below:
Figure
2 - WiFi-Direct Main Screen
Tap on the "Device Name" editor and a virtual screen will appear so you can type the desired device name:
OMAP Wireless Connectivity Battleship Game demo 108
Figure
3 - Setting Device Name
Once you choose the name, click on the "Save" button, followed by "Back" button, then, click "Exit" to quit the
WiFi-Direct application.
Now, the device name is configured and we are ready to play the game.
NOTE that if you don't do this step, your device name will be set to default value which is the machine type, for
example, "am37x-evm".
OMAP Wireless Connectivity Battleship Game demo 109
Figure 4 -
Battleship Icon
Once the game starts, you should see the main screen:
Figure
5 - Main Screen
Here, you have two choices:
1. Host the battelship game
2. Connect to a game (hosted by another EVM)
OMAP Wireless Connectivity Battleship Game demo 110
Hosting Game
If you choose the option "Host Game", the EVM will be the server and wait for other EVM to connect to it.
When choosing this option, this is the screen you get:
Figure
6 - Hosting Game
Connecting Game
If you choose the second option, which is called "Connect to Game" you will have a dialog window where you can
choose the EVM you want to connect to:
Figure
7 - Connecting Game Dialog
The dialog box will show all available WiFi-Direct devices in range.
Choose the device you want to connect to, and the game should start in a few seconds.
OMAP Wireless Connectivity Battleship Game demo 111
References
[1] http:/ / en. wikipedia. org/ wiki/ Battleship_(game)
[2] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 830/ 5504/ am37x-dbus-rootfs_battleship_game_march_28_2012. tgz
[3] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 831/ 5505/ am37x-dbus-boofs_battleship_game_march_28_2012. tgz
[4] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 833/ 5507/ am180x-root-battleship_game_march_28_2012. tgz
[5] https:/ / gforge. ti. com/ gf/ download/ frsrelease/ 832/ 5506/ am180x-boot-battleship_game_march_28_2012. tgz
Overview
This document covers the general use of U-Boot v2012.10 and the AMSDK on following platforms:
• am335x EVM
• am335x EVM-SK
• BeagleBone
[1]
For am3517 EVM, am37x EVM and Beagleboard xM support please see the AMSDK 5.05.00 documentation .
For am180x information please see this page.
The latest release has been validated in the following hardware configurations. If your hardware platform is not
listed below you can either use the release provided in the SDK [13] for your device or try this u-boot release and
provide feedback [14] on issues encountered so they can be addressed in a future release.
AMSDK u-boot User's Guide 112
Board Wired ethernet USB gadget ethernet NAND SD/MMC USB Host (mass storage) SPI flash
We assume that a GCC-based toolchain has already been installed and the serial port for the board has been
configured. If this is not the case, please refer back to the Sitara Linux Software Developer’s Guide. We also assume
that a Linux Kernel has already been built (or has been provided) as well as an appropriate filesystem image.
Installing and setting up DHCP or TFTP servers is also outside of the scope of this document, but snippets of
information are provided to show how to use a specific feature, when needed.
Finally, please note that not all boards have all of the interfaces documented here. For example, the BeagleBoard xM
and BeagleBone do not have NAND.
General Information
Updated Toolchain
Starting with Sitara Linux SDK 6.0 the location of the toolchain has changed and for non ARM 9 devices a new
Linaro based toolchain will be used. Details about the change in toolchain location can be found here [2]. Also details
about the switch to Linaro can be found here [3].
AM18x users are not affected by the switch to Linaro. Therefore, any references to the Linaro toolchain prefix
"arm-linux-gnueabihf-" should be replaced with "arm-arago-linux-gnueabi-".
$ rm -rf ./am335x_evm
U-Boot Environment
Restoring defaults
It is possible to reset the set of U-Boot environment variables to their defaults and if desired, save them to where the
environment is stored, if applicable. To do so, issue the following commands:
Networking Environment
When using a USB-Ethernet dongle a valid MAC address must be set in the environment. To create a valid address
please read this page [4]. Then issue the following command:
The default behavior of U-Boot is to utilize all information that a DHCP server passes to us when the user issues the
dhcp command. This will include the dhcp parameter next-server which indicates where to fetch files from via
TFTP. There may be times however where the dhcp server on your network provides incorrect information and you
are unable to modify the server. In this case the following steps can be helpful:
AM335x EVM am335x_evm CPSW ethernet DM814x ROM (PG1.0) or AM335x AM335x U-Boot SPL
ROM (PG2.0 and later)
AM335x EVM am335x_evm_usbspl SPL and U-Boot via AM335x ROM AM335x U-Boot SPL
(PG2.0 and later) USB RNDIS
AM335x EVM am335x_evm_uart_usbspl SPL via UART, U-Boot N/A AM335x U-Boot SPL
(PG1.0) via USB RNDIS
AM335x HS EVM am335x_hs_evm_usb SPL and U-boot via AM335x ROM AM335x U-Boot SPL
(PG2.0) USB RNDIS
If using ISC dhcpd an example host entry would look like this:
host am335x_evm {
hardware ethernet [Link];
# Check for PG1.0, typically CPSW
if substring (option vendor-class-identifier, 0, 10) = "DM814x ROM" {
filename "[Link]";
# Check for PG2.0, CPSW or USB RNDIS
} elsif substring (option vendor-class-identifier, 0, 10) = "AM335x ROM" {
filename "[Link]";
} elsif substring (option vendor-class-identifier, 0, 17) = "AM335x U-Boot SPL" {
filename "[Link]";
} else {
filename "[Link]";
}
}
Note that in a factory type setting, the substring tests can be done inside of the subnet declaration to set the default
filename value for the subnet, and overriden (if needed) in a host entry.
If you have removed NetworkManager from your system (which is not the default in most distributions) you need to
configure your /etc/network/interfaces file thusly:
allow-hotplug usb0
iface usb0 inet static
address [Link]
netmask [Link]
AMSDK u-boot User's Guide 115
If you are using NetworkManager you need to create two files. First, as root create
/etc/NetworkManager/system-connections/AM335x USB RNDIS (and use \ to escape the space) with the following
content:
[802-3-ethernet]
duplex=full
mac-address=[Link]
[connection]
id=AM335X USB RNDIS
uuid=INSERT THE CONTENTS OF 'uuidgen' HERE
type=802-3-ethernet
[ipv6]
method=ignore
[ipv4]
method=manual
addresses1=[Link];16;
#!/bin/sh
IF=$1
STATUS=$2
Multiple Interfaces
On some boards, for example when we have both a wired interface and USB RNDIS gadget ethernet, it can be
desirable to change from the default U-Boot behavior of cycling over each interface it knows to telling U-Boot to use
a single interface. For example, on start you may see lines like:
And ensure that a DHCP server is configured to serve addresses for the network you are connected to.
AM335x EVM (PG2.0 and later) am335x_evm_restore_flash_usbspl SPL and U-Boot via USB RNDIS
AM335x EVM (PG1.0) am335x_evm_restore_flash_uart_usbspl SPL via UART, U-Boot via USB RNDIS
An example script file, which we call [Link] that will download files via tftp and then write them to NAND
looks like:
# erase NAND
nand [Link]
# get MLO
tftp 0x81000000 MLO
# make 4 copies in the RAM
cp.b 0x81000000 0x81020000 20000
cp.b 0x81000000 0x81040000 20000
cp.b 0x81000000 0x81060000 20000
# get [Link]
tftp 0x81080000 [Link]
# write the whole block (4*MLO + [Link]) to NAND
nand write 0x81000000 0x0 0x260000
AMSDK u-boot User's Guide 117
Then [Link], along with MLO and [Link] go in to the top directory that your tftp server uses to serve files
from. Along with having configured the dhcp server as discussed above to boot the target machine it will now boot
and program the NAND flash.
Using NAND
This section documents how to write files to the NAND device and use it to load and then boot the Linux Kernel
using a root filesystem also found on NAND. At this time, no special builds of U-Boot are required to perform these
operations on the supported hardware. Finally, for simplicity we assume the files are being loaded from an SD card.
Using the network interface (if applicable) is documented above.
dfu_alt_info=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
This means that you can tell dfu-util to write anything to any of:
• SPL
• SPL.backup1
• SPL.backup2
• SPL.backup3
• u-boot
• kernel
• rootfs
Before writing you must erase at least the area to be written to. Then to start DFU on the target on the first NAND
device:
prior to starting dfu in U-Boot, a number of messages will be supressed and a slightly faster write will occur.
This means that you can tell dfu-util to write anything to any of:
• boot
• rootfs
And that the MLO, [Link] and [Link] files are to be written to a FAT filesystem.
To start DFU on the target on the first MMC device:
prior to starting dfu in U-Boot, a number of messages will be supressed and a slightly faster write will occur.
Using SPI
This section documents how to write files to the SPI device and use it to load and then boot the Linux Kernel using a
root filesystem also found on SPI. At this time, no special builds of U-Boot are required to perform these operations
on the supported hardware. The table below however, lists builds that will also use the SPI flash for the environment
instead of the default, which typically is NAND. Finally, for simplicity we assume the files are being loaded from an
SD card. Using the network interface (if applicable) is documented above.
Using NOR
This section documents how to write files to the NOR device and use it to boot u-boot. At this time, there are two
builds of u-boot that are used: the first boots from memory or peripherals and is used to flash the second, which will
boot from NOR. The table below however, lists the two builds. Finally, for simplicity we assume the files are being
loaded from an SD card. Using the network interface (if applicable) is documented above.
Archived Versions
• 5.07.00 [5]
• 5.03.03 [6]
• 5.03.00 [7]
• 5.05.00 [1]
AMSDK u-boot User's Guide 122
Additional Information
• AM335x
• AM335x Flash Programming Guide
• AM335x u-boot User's Guide
References
[1] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_u-boot_User%27s_Guide& oldid=109080
[2] http:/ / processors. wiki. ti. com/ index. php/ Sitara_Linux_SDK_GCC_Toolchain#Updated. C2. A0Linux-Devkit_Structure
[3] http:/ / processors. wiki. ti. com/ index. php/ Sitara_Linux_SDK_GCC_Toolchain#Switch_to_Linaro
[4] http:/ / www. denx. de/ wiki/ view/ DULG/ WhereCanIGetAValidMACAddress
[5] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_u-boot_User%27s_Guide& oldid=151547
[6] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_u-boot_User%27s_Guide& oldid=88139
[7] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_u-boot_User%27s_Guide& oldid=83941
Overview
This article will cover the basic steps for building the Linux kernel and driver modules for TI Sitara devices.
Preparing to Build
In order to build the Linux kernel you will need a cross compiler installed on your system which can generate object
code for the ARM core in your Sitara device. In the case of the AMSDK this compiler can be found inside of the
SDK in the <sdk install dir>/linux-devkit/sysroots/i686-arago-linux/usr/bin directory. If you have not already done
so you should add this compiler to your path by doing:
Where <sdk install dir> should be replaced with the directory where the SDK was installed.
IMPORTANT
It is important that when using the GCC toolchain provided with the SDK or stand alone from TI that you do NOT
source the environment-setup file included with the toolchain when building the kernel. Doing so will cause the
AMSDK Linux User's Guide 123
For users who are building the kernel from within the AMSDK you can also use the Makefile at the root of the SDK
installation at <sdk install dir>/Makefile to clean the kernel by doing:
will look in the arch/arm/configs directory for the configuration file (<config> in the line above) use that file to set
default configuration options. The table below shows the default configuration files for various platforms.
NOTE
The configuration file used to build the pre-built binaries found in the SDK can be found in the arch/arm/configs
directory as tisdk_<device>_config and can be used in place of the config file given below to reproduce the SDK
Linux kernel configuration settings. The differences between these files generally revolve around enabing/disabling
additional modules for expected SDK use cases.
AMSDK Linux User's Guide 124
For example, to build the default PSP configuration for the AM335x the command would be:
To build the SDK configuration for the AM335x the command would be:
After the configuration step has run the full configuration file is saved to the root of the kernel tree as .config. Any
further configuration changes are based on this file until it is cleanup up by doing a kernel clean as mentioned above.
Once the configuration window is open you can then select which kernel components should be included in the
build. Exiting the configuration will save your selections to a file in the root of the kernel tree called .config.
AMSDK Linux User's Guide 125
This will result in a kernel image file being created in the arch/arm/boot/ directory called uImage. This file can be
used by u-boot to boot your Sitara device.
If you selected any components of the kernel to be build as dynamic modules you must issue an additional command
to compile those modules. The command is:
This will result in .ko (kernel object) files being placed in the kernel tree. These .ko files are the dynamic kernel
modules. The next section will cover how to install these modules.
NOTE
For users who are building the kernel from within the AMSDK you can also use the Makefile at the root of the SDK
installation at <sdk install dir>/Makefile to configure the kernel with the default SDK configuration and compile the
uImage and kernel modules by doing:
For example if you are installing the modules to an NFS share located at /home/user/targetNFS you would do:
NOTE
For users who are building the kernel from within the AMSDK you can also use the Makefile at the root of the SDK
installation at <sdk install dir>/Makefile to install the kernel modules into the location pointed to by DESTDIR in
your [Link] file by doing:
Additional Information
The links below provide additional information about the PSP kernel releases.
• For AM335x/Beaglebone
• AM335x PSP [Link] Release Notes
• AM335x PSP [Link] Features and Performance Guide
• For AM37x/AM3517/Beagleboard
• AM35x-AM37-PSP [Link] Feature Performance Guide
• AM35x-AM37-PSP [Link] Release Notes
• For AM180x
• AM180x-PSP [Link] Feature Performance Guide
• AM180x-PSP [Link] Release Notes
Archived Versions
• [Link] [2]
• [Link] [3]
• [Link] [4]
References
[1] http:/ / processors. wiki. ti. com/ index. php/ AMSDK_Linux_User%27s_Guide#Archived_Versions
[2] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_Linux_User%27s_Guide& oldid=106920
[3] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_Linux_User%27s_Guide& oldid=90942
[4] http:/ / processors. wiki. ti. com/ index. php?title=AMSDK_Linux_User%27s_Guide& oldid=83825
Code Composer Studio v5 Users Guide 127
Overview
Code Composer Studio v5.3 is currently provided with the Sitara Software Development Kit. It uses the Eclipse
backend and includes the Remote System Explorer plug-in that provides tools to provide access to the remote target
board.
Updated Toolchain
Starting with Sitara Linux SDK 6.0 the location of the toolchain has changed and for non ARM 9 devices a new
Linaro based toolchain will be used. Details about the change in toolchain location can be found here [2]. Also details
about the switch to Linaro can be found here [3].
AM18x users are not affected by the switch to Linaro. Therefore, any references to the Linaro toolchain prefix
"arm-linux-gnueabihf-" should be replaced with "arm-arago-linux-gnueabi-".
Clicking this link will prompt you to fill out an export restriction form. After filling out the form you will be given a
download button to download the file and you will receive an e-mail with the download link. Download the tarball
and save it to your Linux host development system.
NOTE: If the Install Code Composer option is selected and the CCS install files are not located in the same
directory as the Sitara Linux SDK installer you will be given a message that the installer could not be located and the
SDK installation will continue as normal. To install CCS later you can follow the steps in the next section to bypass
the Sitara Linux SDK installer.
2. At the Choose Installation Location screen do NOT check Add TI plug-ins into an existing Eclipse install
Code Composer Studio v5 Users Guide 131
3. At the Processor Support screen make sure to select the AMxx Cortex-A and ARM9 processors option
4. At the Select Components screen do NOT select TI ARM Compiler Tools. These tools are the TI compiler tools
for ARM devices, whereas for Linux the Sitara Linux SDK uses the open source GCC compiler.
Code Composer Studio v5 Users Guide 132
5. At the Select Emulators screen make sure that JTAG Emulator Support is enabled but you do not need to select
individual emulators unless you require support for that model of JTAG. To install those drivers later see the
Installing Emulator Support section below.
6. At the CCS Install Options screen verify that the options look correct and then select Next to begin installation.
Code Composer Studio v5 Users Guide 133
sudo <CCSv5_INSTALL_PATH>/ccsv5/install_scripts/install_drivers.sh
where <CCSv5_INSTALL_PATH> is the path that was chosen when the CCSv5 installer was run.
Launching CCS
After the CCS installer has finished executing you should have an icon on your desktop call Code Composer Studio
v5 like:
2. The next window will be the Workspace Launcher window which will ask you where you want to locate your
CCSv5 workspace. You can take the default here or choose a custom directory.
3. CCS will load the workspace and then launch to the default TI Resource Explorer screen
Code Composer Studio v5 Users Guide 135
4. Close the TI Resource Explorer screen. This screen is useful when making TI CCS projects which use TI tools.
The Sitara Linux SDK uses open source tools with the standard Eclipse features and therefore does not use the TI
Resource Explorer. You will be left in the Project Explorer default view.
Code Composer Studio v5 Users Guide 136
Note: The Qt C++ Perspective is not compatible with this version of Eclipse. Instead Qt projects are to be
built using the Makefiles inside of the project as will be detailed in the later sections of this guide.
Importing Qt Projects
Since the Qt plugin does not work with the latest version of Qt the example projects have been modified to use a
Makefile to handle the build step. You can use projects like the matrix-gui-browser project as a reference for how
to configure a Qt project to build using a Makefile. The following steps detail the changes that should be made for an
existing Qt project to use a Makefile to build.
5. Click OK
6. You should now see the matrix_browser project listed as being selected for import into CCS
Code Composer Studio v5 Users Guide 140
9. Now you will need to add the Qt version found in the SDK to CCS. This can be done using Window ->
Preferences and selecting the Qt' menu item
Code Composer Studio v5 Users Guide 141
4. You will find the matrix_browser executable built in the matrix_browser project.
Code Composer Studio v5 Users Guide 144
3. Click OK
You can now build the install target using the steps in the Changing the Make Target section above.
Using a Makefile
In order for the above steps to work a [Link] Makefile was created in the matrix-gui-browser directory. This
[Link] has some key points that are worth mentioning.
• The [Link] file is included from the top-level of the Sitara Linux SDK. This is to provide access to variables
like DESTDIR for installing the built executable.
-include ../../[Link]
• There is a variable called ENV_SETUP that points to the environment-setup script in the linux-devkit directory.
The qmake target, which is used by the release and debug targets will first source the environment-setup script
to get access to qmake2 and configure the build to use the Qt version inside of the Sitara Linux SDK
3. Click Next
4. On the Import Projects page click Browse
Code Composer Studio v5 Users Guide 147
5. In the file browser window that is opened navigate to the <SDK INSTALL DIR>/example-applications
directory and click OK
6. The Projects: list will now be populated with the projects found.
Code Composer Studio v5 Users Guide 148
3. Click Next
4. In the C Project dialog set the following values:
Project Name: helloworld
Project type: Cross-Compile Project
5. Click Next
6. In the Command dialog set the following values:
Tool command prefix: arm-linux-gnueabihf-. Note the the prefix ends with a "-". This is the prefix of the
cross-compiler tools as will be seen when setting the Tool command path
Tool command path: <SDK INSTALL DIR>/linux-devkit/sysroot/i686-arago-linux/usr/bin. Use the
Browse.. button to browse to the Sitra Linux SDK installation directory and then to the linux-devkit/bin
directory. You should see a list of tools such as gcc with the prefix you entered above.
7. Click Next
8. In the Select Configurations dialog you can take the default Debug and Release configurations or add/remove
more if you want.
Code Composer Studio v5 Users Guide 152
9. Click Finish
2. From the main CCSv5 window select File -> New -> Source File menu item
3. In the Source File dialog set the Source file: setting to helloworld.c
4. Click Finish
Code Composer Studio v5 Users Guide 154
2. Change the build configuration to Release by selecting Project -> Build Configurations -> Set Active ->
Release
3. Compile the helloworld project by selecting Project -> Build Project
4. The resulting executable can be found in the Release directory
Code Composer Studio v5 Users Guide 155
5. You can now install the executable to the target file system using Remote System Explorer, NFS, or any other
method you want.
Archived versions
• Sitara SDK 05.07 CCSv5 User Guide (archived) [2]
• Sitara SDK 05.03 CCSv5 User Guide (archived) [3]
• Sitara SDK 05.02 CCSv5 User Guide (archived) [4]
References
[1] http:/ / processors. wiki. ti. com/ index. php/ Sitara_Linux_SDK_Setup_Script
[2] http:/ / processors. wiki. ti. com/ index. php?title=Code_Composer_Studio_v5_Users_Guide& oldid=137210
[3] http:/ / processors. wiki. ti. com/ index. php?title=Code_Composer_Studio_v5_Users_Guide& oldid=84244
[4] http:/ / processors. wiki. ti. com/ index. php?title=Code_Composer_Studio_v5_Users_Guide& oldid=68253
Background
Dependencies
The following dependencies apply to Run Mode Debug:
• CCS versions: CCSv5.3 or greater
• Devices: any core that is capable of running Linux: Cortex-A, ARM9, C66x.
• Host requirement: a cross platform GDB debugger (typically part of a GCC package like CodeSourcery or Arago)
• Target requirement: a GDB server that is compatible with the GDB debugger located on the host (typically part of
a SDK package like EZSDK, DVSDK, etc.)
• A GCC project (see How to create GCC projects in CCSv5).
The run mode debug requires two connections to the target system:
1. One connection to the target console is used to execute Linux commands.
• If using a serial port (common in all TI's EVMs and low-cost boards like Beagleboard and Pandaboard), this
connection can be done using a simple terminal program like Hyperterminal, Putty, TeraTerm or even a CCSv5
terminal plug-in.
• If using Ethernet, this connection must be done using one of the programs above and configuring it for telnet or
SSH. Keep in mind that the linux running on the target board requires a telnet or SSH server running on it.
2. The other connection is used by the gdb debugger to communicate with the gdb server running on the target.
• This connection can be done either via Ethernet or serial port. Keep in mind the speed of a serial connection can
be a lot slower and timeouts may occur.
Procedure
IMPORTANT! In certain versions CCSv5 does not enable "CDT GDB Debugging" configurations. You need to
enable them from the Capabilities tab in the Preference dialog (select Window --> Preferences --> General -->
Capabilities).
1. Bring up the Debug Configurations dialog by selecting menu Run --> Debug Configurations
2. Select C/C++ Remote Application
3. Click on the icon New launch configuration (Top left of the pane)
4. Set the fields C/C++ Application: andProject: respectively to the existing project in the workspace and the binary
executable file
Note: If the project is already in focus (Active or highlighted) in the Project Explorer view, these fields will be
already populated.
5. In tab Main, click on the link Select Other at the bottom where it says Using GDB (ASF) Automatic Remote
Debugging Launcher. Check Use configuration specific settings and select GDB (DSF) Manual Remote
Degugging Launcher. Click OK.
Linux Debug in CCSv5 158
Note: It is possible to set up CCSv5 to automatically connect and launch the debugger in the target by leaving
the settings above untouched. Check section 8 of the Eclipse CDT FAQ [1].
Note: Other options like Enable auto build, arguments and others can be modified at this time.
6. Select the Debugger tab and specify the GDB debugger as well as the GDB command file. In this case the GDB
debugger from Arago is being used, but it is possible to use also CodeSourcery or other toolchain.
Click browse next to "GDB command file" and browse to the .gdbinit file in the SDK install directory. When you
try to browse to the .gdbinit file, you will need
to R-Click -> Show Hidden Files to see the file. Click the Close button and you are now ready to debug the
application!
• In this example of the [Link] SDK, the path is:
/home/user/AM335X/SDK/ti-sdk-am335x-evm-[Link]/linux-devkit/sysroot/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gd
• The GDB init file is located: /home/user/AM335X/SDK/ti-sdk-am335x-evm-[Link]/.gdbinit
7. On the Debugger Connection tab, specify the IP address and port of the GDB server running on the target.
Note: the port number is arbitrary and is specified when the gdbserver is launched - unless you have a strong
reason to change it, the value of 10000 is just fine.
Note: the IP address of the target can be determined from the target linux console.
IMPORTANT! Some SDKs do not have gdbserver installed by default in the supplied filesystem. Check the
SDK documentation for details on how to install it.
Linux Debug in CCSv5 159
8. On the target console, start the GDB server specifying the application file and the port number.
Note: make sure the port number matches the one specified in the Debugger Connection tab (10000 by
default).
Note: the application under debug must be located on the target filesystem. This can be done in multiple ways:
either copying it to the shared NFS directory, to the SD card being used to boot linux, etc.
Linux Debug in CCSv5 160
10. You may need to set the shared library (object) search path in a cross compile debug enviroment.
• Under Debug Configuration -> Debugger tab -> Shared Libraries tab enter the path to the target filesystem lib
directory
• You may need a copy of the target filesystem on the local debug host
Linux Debug in CCSv5 161
Dependencies
The following dependencies apply to Stop Mode Debug:
• CCS version 5.3.0 or greater. This facilitates working on either a Windows host, or a Linux host.
In addition to the procedure below, a short video clip is located here [2].
• Devices: any core that is capable of running Linux: Cortex-A, ARM9, C66x.
• Host system requirements:
• Target system requirements: a Linux distribution running on the target. Kernel releases 2.6.x and 3.1.x were
tested.
The stop mode debug requires a JTAG connection to the target system. It supports either a standalone JTAG
emulator (XDS100, XDS510, XDS560) or an embedded emulator on the development board (OMAPL137EVM,
Beaglebone, etc.)
An additional connection to the target console is helpful to monitor the Linux boot procedure and the integrity during
the debug session.
Procedure
Although it is possible to connect to the device using the JTAG emulator without any reference to the source code,
this makes the debugging process very difficult as the information in the debugger will consist in pure assembly
code. In order to perform low-level debugging with complete visibility of the Linux kernel source code, a few steps
are necessary:
1. Compile the kernel with the appropriate debug symbols (EABI executable file vmlinux).
2. Create a project in the CCS workspace that contains all Linux kernel source code.
3. Create a debug configuration that loads the debug symbols to the debugger and references the source code in the
Linux kernel tree.
Note: the building process depends on the Linux distribution being used, therefore it is recommended to read the
SDK documentation regarding this step.
2. In the section Existing Code Location, click on Browse... and point to the root directory of the Linux kernel source
tree. Leave the toolchain as <none> and click Finish.
Linux Debug in CCSv5 163
3. To prevent CCS from building the Linux kernel automatically before launching the debugger, this option must be
disabled. Highlight the Linux kernel project in the Project Explorer view, right click and select Build Options..., then
select C/C++ Build in the left tree and the tab Behaviour. Uncheck all the build rules boxes and click OK.
Note: it is possible the C-syntax error checker built into Eclipse is also activated, which may throw errors
while launching the debugger. It can be configured by right-clicking on the project --> Build Options... -->
click on Show Advanced Settings --> C/C++ General --> Code Analysis. It can also be completely disabled by
going to the submenu Launching and then unchecking the box Run as you type (selected checkers).
Linux Debug in CCSv5 164
3. Click on the button File System... near the box Target Configuration to select the target configuration file (.ccxml)
for your hardware.
Optional: give a meaningful name for the Debug Configuration at the box Name:
Optional: depending on the target configuration, at this point a list of cores will be shown and can be disabled
to improve the debugger performance.
Linux Debug in CCSv5 165
4. Select the tab Program to assign the Linux kernel source code to the Debug configuration.
5. On the drop-down menu Device select the core where the Linux is running.
In this example the core Texas Instruments XDS100v2 USB Emulator_0/CortxA8 was selected
6. Click on the button Workspace... near the box Project to select the Linux kernel project
• In this example it was used the project [Link]
• For the latest version, use
/home/user/AM335X/SDK/ti-sdk-am335x-evm-[Link]/board-support/linux-3.2.0-psp04.06.
7. Click on the button File System... near the box Program to select the EABI executable vmlinux that contains
the debug symbols
Note:If the Linux kernel was rebuilt, the location of this file is usually in the main directory of the Linux
kernel source tree.
/home/nick/AM335X/SDK/ti-sdk-am335x-evm-[Link]/board-support/linux-3.2.0-psp04.06.00.11
Important! It is common that a file vmlinux is also provided in the boot partition of the SD card shipped
with the development board (where the file uImage is also located). However, check its size; if it is
relatively small when compared to uImage (3, 4 times larger) it is possible it does not carry debug information.
A typical size for the vmlinux file usually starts at 30~40MB.
8. At last, check the box Load symbols only. Click Apply.
Linux Debug in CCSv5 166
9. Now the debug session is ready to be launched. At this point, the emulator must be connected, the target board
powered up and Linux running (typically in the command prompt). Click on the Debug button.
Linux Debug in CCSv5 167
4. Put the target to run. When the application calls sleep() the Stop mode debug session should halt at the
breakpoint, as shown in the screen below:
Linux Debug in CCSv5 168
Important! Keep in mind that halting the Linux kernel while GDB/GDBserver are running may cause
communication timeouts, clock skews or other glitches inherent from the fact that the host system and other
peripherals are still running.
Archived
Sitara Linux SDK 05.07 [3]
References
[1] http:/ / wiki. eclipse. org/ index. php/ CDT/ User/ FAQ
[2] http:/ / software-dl. ti. com/ sdo/ sdo_apps_public_sw/ CCSv5/ Demos/ Linux_kernel_debugging/ Linux_kernel_debugging. html
[3] http:/ / processors. wiki. ti. com/ index. php?title=Linux_Debug_in_CCSv5& oldid=127228
How to setup Remote System Explorer plug-in 169
Overview
Remote System Explorer (RSE) is an Eclipse plug-in that provides:
• Drag-and-drop access to the remote file system
• Remote shell execution
• Remote terminal
• Remote process monitor
Prerequisites
Before you configure RSE you should make sure the following prerequisites are met:
1. The RSE capability is enabled
2. The EVM you plan to connect to is powered on and you know the IP address of the EVM.
• You can obtain the IP address of the EVM using matrix and selecting Settings -> Network Settings or by
connecting over the serial console and using the ifconfig command.
The first time this plug-in is used, a connection to the target EVM needs to be established and configured. Follow the
procedures below to setup and configure RSE for use with the Sitara Linux SDK.
3. Click OK
4. You will now have the RSE view opened
How to setup Remote System Explorer plug-in 170
How to setup Remote System Explorer plug-in 171
3. Click Next
4. In the Select Remote System Type window select the Linux system type
How to setup Remote System Explorer plug-in 172
5. Click Next
6. In the Remote Linux System Connection window enter
Host name: Enter the IP address of your target EVM. This can be determined as detailed in the Prerequisites
section above
Connection name: The default value is the same as the host name, but this can be changed to a more human
readable value like My Target EVM
You can un-check Verify host name or leave it checked depending on whether you want to verify the IP
address you entered for the Host name field.
How to setup Remote System Explorer plug-in 173
3. Click OK
• NOTE: If you do not like the location of the C/C++ Projects view you can drag it to another location in CCS
my dragging and dropping the Tab.
How to setup Remote System Explorer plug-in 177
3. Click OK
• NOTE: If you do not like the location of the Remote Systems view you can drag it to another location in CCS
my dragging and dropping the Tab.
4. A Remote Systems tab appears in the CCS perspective. The target connection named My Target EVM is shown
in a tree structure with branches for the various Remote System functions which communicate with the target
EVM using a secure SSH connection.
Sftp Files - Provides a drag and drop GUI interface to the target file system.
Shell Processes - Provides a listing of processes running on the remote system and allows processes to be
remotely killed.
Ssh Shells - Provides a Linux shell window for the remote system within CCS.
Ssh Terminals - Provides a terminal window for the remote system within CCS.
How to setup Remote System Explorer plug-in 178
4. Click OK
The Remote System Explorer is now ready for use. The first time the target EVM file system is booted a private key
and a public key is created in the target file system. Before connecting to the target EVM the first time, the public
key must be exported from the target EVM to the Linux host system. To configure the key do
1. Right-Click the My Target EVM node and select Connect
2. A dialog like the one shown below will appear
At this point, all Remote System Explorer functions will be functional.; After this, each time CCSv5 is started, the
first time a Remote System Explorer function is accessed, a login prompt will appear. Just click OK and leave the
password blank.
NOTE: You can save the blank password and bypass any future prompts as well.
The local file system on the Linux host can also be accessed by expanding the Local -> Local Files node.
SSH Terminals
To open an SSH Terminal view
1. Right-Click the Ssh Terminals node under the target EVM connection
2. Select Launch Terminal from the context menu
3. Type shell commands at the prompt in the terminal window. Below is a sample command to list the contents of
the remote /usr folder.
How to setup Remote System Explorer plug-in 183
SSH Shells
To open an SSH Shell view
1. Right-Click the Ssh Shells node under the target EVM connection
2. Select Launch Shell from the context menu.
3. Type a shell command into the Command edit box and press the Enter key. Below is the output from the ps
command which displays the processes running on the remote system
How to setup Remote System Explorer plug-in 184
Archived Versions
• Sitara SDK 05.07 (Archived) [1]
References
[1] http:/ / processors. wiki. ti. com/ index. php?title=How_to_setup_Remote_System_Explorer_plug-in& oldid=136444
Preliminary Requirements
1. The Sitara SDK for your hardware platform has been installed on your Ubuntu host machine.
2. A serial connection between your host machine and the target board with a serial terminal emulator running on
the host. Minicom is recommended. You could also use a telnet window to the target system.
3. An Ethernet connection between your host machine and the target board.
4. This article assumes that the Remote System Explorer plug-in has been setup to provide an SSH connection to the
remote file system. See How_to_setup_Remote_System_Explorer_plug-in [1]
5. Boot up the target EVM.
6. Start CCSv5 and open the project you wish to debug.
7. The executable to be debugged must reside in the target file system. It must have been built from the debug build
configuration so that it contains the symbol information.
NOTE: For this example, we are going to debug the dhrystone project
Updated Toolchain
Starting with Sitara Linux SDK 6.0 the location of the toolchain has changed and for non ARM 9 devices a new
Linaro based toolchain will be used. Details about the change in toolchain location can be found here [2]. Also details
about the switch to Linaro can be found here [3].
AM18x users are not affected by the switch to Linaro. Therefore, any references to the Linaro toolchain prefix
"arm-linux-gnueabihf-" should be replaced with "arm-arago-linux-gnueabi-".
You should see a response that is similar to this. The actual target Ethernet IP address will appear where the
[Link] is shown below. (This IP address will be used in a later step):
Interrupt:80
3. Double click C/C++ Remote Application. You should then see a new debug configuration named "dhrystone
Debug" as shown below.
Select your target connection from the Connection drop-down box. In the example the target connection is called
My Target EVM.
How to Run GDB on CCSv5 187
4. Click the Search Project button to open the Program Selection dialog box below. Click on the "armle
- /dhrystone/Debug/dhrystone" item and click OK.
5. Click the "Browse..." button for "Remote Absolute File Path for C/C++ Application". Navgate to the executable
file on the remote
file system. For this example, the executable file is found at "/usr/bin/dhrystone".
How to Run GDB on CCSv5 188
The .gdbinit file is used by GDB to locate source files and library files on the target. The .gdbinit file is created
when the SDK environment script runs. Here is an example of a .gdbinit file.
6. Click the Debugger tab. On the Debugger page, the Main tab should be selected. Click Browse next to "GDB
debugger" and browse to the GDB executable.
• in the [Link] SDK, the path is :
/home/sitara/ti-sdk-am335x-evm-[Link]/linux-devkit/sysroot/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gdb
• the GDB init file is located: /home/sitara/ti-sdk-am335x-evm-[Link]/.gdbinit
Click browse next to "GDB command file" and browse to the .gdbinit file in the SDK install directory. When you
try to browse to the .gdbinit file, you will need
to R-Click -> Show Hidden Files to see the file. Click the Close button and you are now ready to debug the
application!
How to Run GDB on CCSv5 189
3. R-Click on the dhrystone file and select Properties. Click Permisions and change it so that all permissions are
set. Also set all permissions on the /usr/bin folder.
How to Run GDB on CCSv5 190
4. Click the green "bug" icon to build the executable, transfer the executable to the target, start gdbserver and and
start debugging.
CCS will change to the CCS Debug perspective. The debug tab will show the running threads and their status. The
source code window will show
the program halted at the first executable source code line in the main() function. The Variables window will show
the local variables and their current
values.
How to Run GDB on CCSv5 191
5. To toggle a breakpoint, highlight the line of code in the source code window. Then click the Run -> Toggle
Breakpoint menu item.
6. Use the debugger "Step Over" and "Step Into" icons to step through the source code.
7. To resume program execution, click the Run -> Resume menu item.
NOTE: Do not click the Run -> Debug menu item, as that will attempt to start a new debug session.
From here, you can make changes to the C source files, save the changes and then just click the green "Bug" icon
again and you will be debugging the new executable on the target.
(Each time you start the debugger the executable is built, automatically transferred to the target board and the
gdbserver program is started for you.)
4) Find the gdbserver process. R-Click on it and select Kill. This will open a "Send a Kill Signal" dialog box. Click
the Kill button.
= Archived Versions
• Sitara SDK 05.07 (archived) [3]
• Sitara SDK 05.03 (archived) [4]
• Sitara SDK 05.02 (archived) [5]
How to Run GDB on CCSv5 193
References
[1] http:/ / processors. wiki. ti. com/ index. php/ How_to_setup_Remote_System_Explorer_plug-in
[2] [Link]
[3] http:/ / processors. wiki. ti. com/ index. php?title=How_to_Run_GDB_on_CCSv5& oldid=128743
[4] http:/ / processors. wiki. ti. com/ index. php?title=How_to_Run_GDB_on_CCSv5& oldid=87960
[5] http:/ / processors. wiki. ti. com/ index. php?title=How_to_Run_GDB_on_CCSv5& oldid=77290
This User's Guide supports Pin Mux Utility v2.4.1.0 (APR 2012) or later which is available
in the Sitara Linux SDK version 05.06
For any previous version of Pin Mux Utility see Pin Mux Utility v1.x User's Guide
(archived) [1]
Introduction
The Pin Mux Utility for TI ARM Cortex-A8 based microprocessors is a Windows-based software tool for
configuring pin
multiplexing settings and I/O cell characteristics for the AM335x, AM35x, AM37x / DM37x, AM387x / DM814x,
AM389x / C6A816x / DM816x and OMAP35x devices. The program has been tested on Windows XP and
Windows 7.
Sitara processors provide pad configuration programmability to control the routing of internal
signals to the external balls of the device. Pad configuration also allows I/O cell characteristics to
be controlled. These include enabling of internal pull-up / pull-down resistors and specifying I/O cell
behavior independently in active and standby modes of operation.
The Pin Mux Utility provides a graphical user interface for selecting the peripheral interfaces that will
be used in the system design and for resolving pin multiplexing conflicts. The currect state of all settings
can be saved as a design state file which can be reloaded to restore the state of all tool settings.
The results can also be output as C header files. The first header file is device-specific and
it specifies all the pad configuration registers that can be programmed on the device. The second
header file is board-specific and it specifies all the pin multiplex and pad configuration settings that
were generated for your specific system design. The output sample header files are in the format used
for the AM35x / AM37x / OMAP35x U-Boot source code. For other supported devices, the source code
provides a complete description of all settings but is not directly usable as U-Boot source code.
Pin Mux Utility for ARM MPU Processors 194
Software Installation
Pin Mux Utility v2_04_01_00 is available for download from the [Link] website here [2]. It is also installed
automatically as part of the Linux EZ Software Development Kit for Sitara ARM Microprocessors [3] but the
version from the [Link] website is recommended to get the most recent updates.
If you are running Linux as a virtual machine on a Windows O/S, the Windows Installer and Pin Mux Utility
program can be run on the Linux host PC under the Windows O/S. The generated source files can then be
transferred to the Linux virtual machine via shared folders or another available method.
If your Linux O/S is not a virtual machine, the Windows installer and Pin Mux Utility program must be
run on a separate PC running the Windows O/S. To run the Windows Installer, run [Link]. The installer
should start running as shown below.
If a previous version of Pin Mux Utility was installed, the following message MAY appear.
Select "Remove Pin Mux Utility" and click Finish to uninstall the previous version. Then,
run [Link] again to install the new version.
Pin Mux Utility for ARM MPU Processors 195
In some cases, if Pin Mux Utility was already installed the following message will appear
instead. In this case, use Add/Remove programs from the Windows Control Panel to
uninstall the original version, then run the installer again.
Pin Mux Utility for ARM MPU Processors 196
Program Startup
To see the current release notes, click on this in the Windows Start menu:
All Programs > Pin Mux Utility > Release_Notes.txt
To start the program, double-click the Pin Mux Utility icon on the desktop, or click
All Programs > Pin Mux Utility > Pin Mux Utility
in the Windows Start menu.
Main Window
• The main window opens with device data populated for the selected device type. All pin mux selections and pad
configurations are in the
power-up-reset state.
• The main window (and the Peripheral Interface View windows) may be maximized or resized so that the
complete signal names can be seen.
• Double-click at the divider between columns in the table row header area to set width of a column to match
the widest column text.
• The title bar indicates the path where output source files will be stored.
• The Peripheral Interfaces data grid shows the current peripheral interface status for the member signals of each
peripheral interface.
• The Device Package selector controls which package type is used to populates the "Bot/Top Ball" ball location
column.
When a signal has been selected and the IO Pad is not connected to any device ball this ball has a RED background
in the "Bot/Top Ball"
column and the "Pkg Conflict!" indicater is shown below the Device Package drop-down box. IO Pads that are not
connected to any device ball
should have all signals Not Selected and be defaulted to the "Selected (Ball Available)" state (unless the ball has a
fixed mux mode).
• The Legend describes the color scheme that is used to give a visual indication of the state of each peripheral
interface and the state of each
signal in the Pin Mux Grid.
• The main Pin Mux Grid represents one device ball in each row and contains columns to display the current pad
configuration and ball location(s).
Columns labeled Mode 0 to Mode N represent the pin mux state at each ball. The state may be changed by double
clicking on a cell.
Multiple cells may be selected in either the Pad Configs column or in the Mux Mode columns. R-Click and use
Pin Mux Utility for ARM MPU Processors 198
Menu Items
File Menu
• File > Save > Design
Saves current pin mux selections and pad configurations to a data file that can be reloaded at any time or
on a subsequent run of the program. This file, by default, will be stored at:
<My Documents Folder>\Pin Mux Utility\Design1\<device_name>\PinMuxDesignState_<device_name>.dat
• File > Open > Design
Opens data file stored previously with the File > Save > Design menu item. Must open a file for the same
device type that was selected at program startup. This will populate all mux selections and pad configuration
parameters from the data file.
• File > Save > Source > Linux
Saves the current pin mux selections and pad configurations to C header files.
• File > Exit
Exits the program. You will be prompted to "Save changes to mux selections and/or pad configurations?". If
Yes is clicked, this will open a file save dialog to save the design data file as when the File > Save > Design
menu command is used.
Help Menu
• Help > ReadMe
Displays a window describing features of the program and a link to this User Guide Wiki article.
• Help > About
Displays the program version.
Legend
The legend below shows the visual indicators that are used to display the status of the pin mux settings at the
peripheral interface and individual ball levels. The tables below describe how these states are to be interpreted.
Legend: As displayed for all device types except AM335x
RED = Conflicting At least one interface member signal is involved in a conflict with another signal on the same ball. These conflicts must be
resolved before obtaining a final pin mux configuration for the device.
VIOLET = This involves cases where the same internal signal is muxed to multiple ball locations and the signal has been selected at
Multi-Muxed more than one of those ball locations. The interface view will contain a status message (at upper left) that indicates the first
Violation two multi-muxed signals that are found to be selected. These conflicts must be resolved before obtaining a final pin mux
configuration for the device.
GREEN = Selected At least one interface member signal is selected and there are no conflicts or violations.
AQUA = All All member signals of the interface are available for selection.
Available
BLUE=Partially At least one but not all member signals of the interface are available for selection. One or more member signal(s) are not
Available available because another interface is already using the ball(s).
WHITE=Nothing None of the member signals of the interface are available for selection. All member signals are unavailable because other
Available interface(s) are already using the ball(s).
Pin Mux Utility for ARM MPU Processors 201
BROWN = IO The peripheral interface has member signals selected and the IO Cells are not all connected to the same voltage.
Power Violation
ORANGE = IO Set The selected members of the interface do not satisfy the requirements of any of the pre-defined IO Sets for the interface. The
Violation selected signals are a superset of all the pre-defined IO Sets. These violations must be resolved before obtaining a final pin
mux configuration for the device.
YELLOW = IO Set The selected members of the interface are a subset of the specified signals for one or more IO Sets. This is an informational
Subset status and is acceptable for a final pin mux configuration for a device.
GREEN = IO Set The selected members of the interface match one of the pre-defined IO Sets exactly. Or, if no IO Sets are defined for the
Match interface, it means at least one interface member signal is selected without conflicts or violations.
Below is the description for the status that occurs on the cells of an individual device ball.
A device ball corresponds to one row in the Pin Mux Grid in the main window or in an
Interface View.
RED = Conflicting The Conflicting status means the user has tried to select two or more signals at the same ball. Conflicting signals are all
shown in RED. Conflicting signals must be deselected until not more than one signal is selected at each ball to generate a
valid pin mux configuration for the device.
GREEN = Selected The Selected status means this signal is selected for this ball without any conflict. (There still may be violations reported at
the peripheral interface level.)
AQUA = Selected The Selected (Ball Available) status means the mux mode is selected by default because no other signal in the row is
(Ball Available) selected.
In addition, the Selected (Ball Available) status means the ball is available for use - you may select any other signal in the
row
without causing a conflict.
WHITE = Not The Not Selected status means this signal is not selected for this ball.
Selected
GREY = Reserved The Reserved status means this mux mode is not a valid selection. These cells cannot be changed.
Original New
Selected (Ball Selected (Ball Available) - Nothing happens when clicking cell with status Selected (Ball Available). Select any other signal
Available) in the row to remove the Selected (Ball Available) status.
Interface Views
The interface view displays only the balls that make up a peripheral interface. To open an Interface View, R-Click
on a cell in the Peripheral Interfaces data grid in the main window and select View Pins from the context menu.
Any number of Interface View windows may be opened at the same time. The signals that are members of the
peripheral interface are shown in bold text.
different locations (the same names occur twice). In some devices, such as AM335x multi-muxed signals have an
added suffix, so that these
would appear as i2c3_scl_mux0 & i2c3_sda_mux0 and i2c3_scl_mux1 and i2c3_sda_mux1 to more clearly show
that the same internal signals are
multiplexed to two locations.
An example solution to resolving this conflict is shown below. In the I2C3 interface view double click i2c3_sda
and i2c3_scl in the Mode 3 column to desect those
signals. Double-click i2c3_scl and i2c3_sda in the Mode 0 column to resolve the conflict. I2C3 is now selected on
balls W16 and W17 and there is no more conflict
with the UART4 interface. For devices without IO Set support the tool does not restrict which signals are chosen.
For those devices, it is generally best to select
signals that are grouped together in the same mux mode as shown below.
Pin Mux Utility for ARM MPU Processors 204
(Some signals do not have a programmable mux mode - for example they always have Mode 0 selected. These
are not changed by the Deselect Interface button.)
In the SPI1 interface view, the user has set the drop-down box to "IO Set 1" and has clicked the Apply IO Set
button. The IO Set status text reads
"Current selections match IO Set #1 exactly."
In the SPI1 interface view, the user has selected IO Set 1, then double-clicked the second chip select
(SPI1_CS1_MUX1) to deselect it because this signal is
not required in the design. The IO Set status text reads "Current selections are a subset of IO Set(s) 1". This is an
acceptable status.
Pin Mux Utility for ARM MPU Processors 207
In the SPI1 interface view, the user has selected IO Set 1, then the user deselected SPI1_D0_MUX1 and instead
selected SPI1_D0_MUX0. There is no IO Set that uses both SPI1_D0_MUX0 and SPI1_D1_MUX1 at the same
time.
The IO Set status text reads "IO Set Violation!" This status must be eliminated. This can be done by selecting one
of the pre-defined IO Sets.
In the MMC0 Interface View you can see in the IO Power column that only MMC0_DAT(3-0), MMC0_CLK and
MMC0_CMD have their IO cells
supplied by VDDSHV4 (which user set to 3.3V). The remaining MMC0 signals are connected to 1.8V IO cell
power. Selection of the MMC0_DAT(7-0)
signals has caused an IO Power Violation, because not all of the selected interface member signals are connected to
the same IO power supply voltage.
(Using multiple IO Power domains is OK, as long as they are the same voltage.) In this example, MMC0 would be
limited to operation with a 4-bit
data bus.
HHV Reset" column in the device data spreadsheet for each pad. To open the Pad Configuration Editor, select one
or
more cells in the Pad Config column (by holding down the left mouse button and dragging downwards). For
example,
you can select an entire 32-bit data bus and set them all to the same pad configuration at once. In the example
below,
a pair of pads with I2C signals selected have been highlighted for pad config editting. R-Click in the highlighted
area and select
Edit Selected Pad Configs to open the Pad Config Editor.
Here the user has changed the Internal Pull from OFF to PU (pull-up). Click OK.
Notice that these two pads have had the third parameter changed to PU
Pin Mux Utility for ARM MPU Processors 211
Examples of the device-dependent and board-dependent header files are shown below.
Pin Mux Utility for ARM MPU Processors 213
The original mux.h file includes register name defines for OMAP35xx, AM35xx and AM37xx. By setting the
configuration
for the make utility, U-BOOT can be built for any of these platforms. However, the Pin Mux Utility generated
mux.h file
will only contain register name defines for the device that was selected when Pin Mux Utility was run. So, U-BOOT
can be
rebuilt for that selected device only.
See also: Pinmux Utilities for Davinci Processors
Pin Mux Utility for ARM MPU Processors 215
References
[1] http:/ / processors. wiki. ti. com/ index. php?title=Pin_Mux_Utility_for_ARM_MPU_Processors& oldid=58259
[2] http:/ / focus. ti. com/ docs/ toolsw/ folders/ print/ pinmuxtool. html
[3] http:/ / focus. ti. com/ docs/ toolsw/ folders/ print/ linuxsdk-am37x. html
Introduction
The Pin Setup Tool for AM18xx ARM Microprocessors is a Windows-based software tool for configuring pin
multiplexing settings for the AM1802, AM1806, AM1808 and AM1810 devices.
Pin Setup provides a graphical user interface for selecting the peripherals that will be used in the system design
and for resolving pin multiplexing conflicts. Results are saved as a C header file that includes a list of all selected
signals and settings for the pin mux registers.
Software Installation
The Pin Setup program is a Windows application. It can be obtained from:
1. Download ZIP archive containing the executable and associated data from here Pin Setup for AM18xx [1]. This
is most frequently updated.
To install, simply unzip this archive to any directory on a PC running the Windows OS. For this document, we have
unzipped this
to a directory named C:\PinSetup.
OR
[3]
2. If the above link does not work, you can obtain the same ZIP archive on [Link] on any of the AM18xx
product pages in the Application Notes
section. Look for "AM18xx Pin Muxing Utility".
OR
3. The program is installed on your Ubuntu Linux host when an AM18x SDK is installed. Copy the entire directory
structure from your Ubuntu Linux host
to a PC running the Windows O/S (which could be the same PC if you are running a virtual Linux machine under the
Windows O/S). You would need
to transfer the directory structure by copying it under a virtual machine shared folder or by using a Samba server.
Copy the entire directory structure at the location below to any directory on the Windows side (suggest:
C:\PinSetup\*.*).
Pin Setup Tool for AM18xx ARM Microprocessors 216
/home/user/ti-sdk-am180x-evm-[Link]/host-tools/pinmux_utils/windows
OR
/home/user/ti-sdk-am181x-evm-[Link]/host-tools/pinmux_utils/windows
OR
4. Running in Linux with wine (tested on Ubuntu 10.04 LTS with wine 1.2.2 and Windows mono 2.10.8):
Install the *Windows* version of mono by downloading and running the installer with wine.
wine ~/Downloads/mono-*.exe
wine regedit
Run the pin setup utility through wine with windows mono by running:
After starting the PinSetup program, the main window opens as shown below.
Registers Display
The registers display is specific to the pin mux architecture of the AM18xx (and similar) devices. There
are 20 pin mux registers. Each register is 32-bits wide and programs the signal selection for 8 device
balls. Each device ball in the details grid has up to 5 different multiplexed signals and controls one nibble
of the registers display. The signal selection is programmed with a 4-bit code as shown in the table below.
Close Button
The Close Button exits the program. This can also be done using the File - Exit menu item, or by double-
clicking the title bar icon, or by clicking the title bar X icon. Unsaved work must be saved first using the
File - Save - Pin Selections menu item.
Details Grid
Each row of the details grid represents a programmable device ball. Device balls that only have a single
signal definition are not shown in the tool. Each device ball has up to 5 selectable signal definitions
shown in the Mux1 - Mux5 columns. The status column indicates "Enabled" if a signal is selected,
"Disabled" if no signal is selected or "Conflict" if a previously selected signal was unselected due
to a conflict (conflicts are shown with a red background). The details grid view can be scrolled up and
down using the vertical scrollbar.
Resolving Conflicts
As an example of conflict resolution, first select the SPI0 peripheral, then the UART0 peripheral. A collision dialog
box appears
indicating a conflict. The decision to select the new signal or not can be made on a signal-by-signal basis or you can
click
Yes to All or No to All.
If Yes to All is selected, the UART0 signals will get selected as shown below. Note that the PINMUX3 register is
selecting Mux2
for the UART0 signals. The conflicting SPI0 signals are no longer selected but are shown in red to indicate that a
conflict occurred there.
Pin Setup Tool for AM18xx ARM Microprocessors 220
If No to All is selected, the UART0 signals do not get selected and no change is made as shown below. Note that the
PINMUX3 register is selecting Mux1 for the SPI0 signals.
Pin Setup Tool for AM18xx ARM Microprocessors 221
Menu Items
File - Exit
The File - Exit menu item closes the program. Program can also be closed by double-clicking the title bar icon at
in upper left corner or by clicking the X icon. Save work using the File - Save - Pin Selections before exiting the
program.
Edit - Find
The Edit - Find menu item open the Find Pin dialog. A signal name is entered. A asterisk "*" may be used
as a wild card character. The is the option to search for the matching signal(s) or to select or unselect the
matching signals.
Pin Setup Tool for AM18xx ARM Microprocessors 222
Help - About
The Help - About menu item displays the program version information.
References
[1] http:/ / www-s. ti. com/ sc/ techlit/ spraba2. zip
AM335x Flashing Tools Guide 223
Select option 1 when prompted. Select option 2 in case if you want to erase the whole NAND.
• Enter the image path to flash when prompted as shown below.
This offset is the start location from where the image should be flashed.
NOTE
Use hex format (For example, Enter 0x0 for flashing MLO image (i.e. 1st Stage)) in first block.
0x80000 for U-Bootto flash it in 4th block.
• Select ECC for flashing.
Always select BCH8 for MLO and U-Boot as the ROM code uses the BCH8 ECC scheme. Enter 1 for selecting
BCH8.
• Ensure that the flash info displayed by the tool matches the NAND flash in the EVM.
• After this the tool should first erase the required region in flash and then start flashing the new image.
• Finally you should see the following message.
References
[1] http:/ / software-dl. ti. com/ dsps/ dsps_public_sw/ sdo_tii/ psp/ LinuxPSP/ AM335x_04_06/ index. html
[2] http:/ / processors. wiki. ti. com/ index. php/ OMAP_and_Sitara_CCS_support
[3] http:/ / www. ti. com/ tool/ tmdxevm3358
Applicability
This tool can only be used on Sitara AM35x, AM37x devices.
This article applies to Sitara SDK 5.0.3.x. For SDK 5.0.2 see archived versions section.
1. This Windows XP-based Flash Tool can be used to program MLO, u-boot and kernel to NAND flash.
2. As an alternate method, you can use U-Boot to program MLO, u-boot and kernel to NAND flash.
See How_To_Program_NAND_Flash_Using_U-Boot [1].
3. File systems must be programmed using Linux kernel commands.
Flash v1.6 User Guide 227
Installation Instructions
1. Download "FlashTool for AM35x, AM37x, DM37x and OMAP35x Devices" from here:
Flash_v1.6.0.0 [2] onto a PC running the Windows XP O/S.
2. Open the downloaded FlashTool_vX.X.X.X zip file and run [Link] to start the Windows Installer.
3. Follow the installer instructions.
4. The default installation directory is "C:\Program Files\Texas Instruments\Flash v1.6", but this
can be changed when running the installer.
5. The FlashTool software can be uninstalled at any time by accessing the Add/Remove Programs
function of Windows (Start -> Control Panel -> Add/Remove Programs).
It is recommended to use the GUI for performing flashing functions. This documentation covers usage
of the GUI. Future documentation will cover the CLI interface in more detail. This application has been
designed with flexibility and portability in mind. It is now possible to modify target register configurations
without rebuilding the tool. This allows for easy modifications to various target peripheral configurations
(such as SDRC, GPMC, Pad Control, etc.). This capability makes it possible to support new DDR devices
and NAND devices without software changes. Check out the section #Porting_Guide for more information
on this feature. Internally, the tool makes use of a ROM code mechanism for peripheral boot from UART
or USB to transfer compatible drivers to the internal memory of the OMAP device. These drivers provide
the mechanism by which the host applications can program binary images into the internal memories
(NAND and SDRAM) of the target. All of this operation is hidden from the user.
Release Notes
Version [Link] (6/24/2011)
New Features
• Added GUI controls for Target OS and 1-Bit ECC Layout.
• Set offset to ECC parity data in spare area based on new GUI controls.
• Added support for ECC offsets used with WinCE for 4/8-bit BCH.
• Eliminated requirement that image size be a mult of 4 bytes.
• Added software NAND unlock command.
Limitations
• Download and execute can only branch to Thumb code
Version [Link] (3/25/2011)
New Features
• Programming flash via UART target connection is now supported.
Limitations
Flash v1.6 User Guide 228
• AM37xx/DM37xx support
• Can support new NAND devices via text config file modification.
• Can modify target registers via text config file modification (for example SDRC, GPMC, pad config
settings)
• ONFI NAND Support
• Supported operations: Download, Download and Execute (to Thumb mode code), Erase Region,
Erase All.
• Windows GUI (no Linux yet).
• Scriptable Windows CLI (no Linux yet).
• Fully open source, BSD-style license.
Limitations
• Download and execute can only branch to Thumb code.
• Storing images to NAND uses HWECC. Therefore, you cannot use a standard xloader to load uboot
from NAND. Xloader uses SWECC when reading from NAND. The workaround is to use the uboot
provided on the SD card to flash itself into NAND memory.
• GUI support does not yet exist to define new platforms. However, two memory choices are supplied,
Hynix and Micron. For experimenting with modifications to the configuration text file (for instance, to
port to a new platform) it is recommended that you modify the Micron files (and save a copy if you need
the originals).
then "Next".
• Select "Install from a list or specific location (Advanced)".
• Use the browse box to select the following folder: <Flash-install-dir>\usb_drv_windows.
Normally, the full path will be:
C:\Program Files\Texas Instruments\Flash vX.X\usb_drv_windows.
• Make sure the box "search removable media" is unchecked.
• Make sure the box "Include this location in the search" is checked.
• Click Next. The driver should install correctly without error messages.
• Click Finish to exit the Found New Hardware Wizard.
AM35xx (Micron) LogicPD AM3517EVM with AM3517A SOM and Micron discrete NAND and DDR2 memories
AM37xx (Hynix) Mistral OMAP3 EVM with AM37x or DM37x SOM containing Hynix POP Memory
AM37xx (Micron) Mistral OMAP3 EVM with AM37x or DM37x SOM containing Micron POP Memory
OMAP35xx (Micron) Mistral OMAP3 EVM with OMAP35x SOM containing Micron POP Memory
Custom AM35xx Board Same as AM35xx (Micron) - Modify for your custom AM35xx design.
Custom AM37xx Board Same as AM37xx (Hynix) - Modify for your custom AM37x/DM37x design.
Custom OMAP35xx Board Same as OMAP35xx (Micron) - Modify for your custom OMAP35xx design.
For SWECC ECC format, only 1-Bit ECC (Hamming Code) is allowed. For HWECC ECC format,
1-bit ECC, 4-bit BCH or 8-bit BCH algorithms can be selected. (4-bit BCH is not available for the
OMAP35xx device due to silicon limitations). For NAND ECC mode, the ECC algorithm provided
by the NAND Internal ECC is used.
• TARGET OS (drop-down box)
This GUI control shows only when HWECC 4-bit BCH or 8-bit BCH is selected. The ECC Offset
in spare area is changed to 2 if the WinCE Target OS is selected.
• 1-Bit ECC Layout (drop-down-box)
This GUI control shows only when HWECC 1-bit ECC is selected. Choose "X-Loader/U-Boot"
when programming XLOADER or U-Boot into NAND. For Linux kernel 2.6.37 or later, you must
change this setting to Kernel when programming the Linux kernel into NAND. This changes
the ECC offset in spare area from 2 to 40, as is needed to be compatible with the JFFS2 NAND
file system. For earlier Linux kernels, "X-Loader/Uboot" setting should be used for programming
the Linux kernel into NAND.
5. CHOOSE OPERATION PARAMETERS (Radio Buttons)
Select the operation to be performed:
• DOWNLOAD
Choose this to download a binary image to either NAND or SDRAM.
Before downloading an image to NAND, you must first erase the region where the image will be
downloaded (or Erase All NAND).
Set OFFSET (hexadecimal value) to the offset from the beginning of NAND or SDRAM where the
image will be downloaded.
• DOWNLOAD AND EXECUTE
Choose this to download a binary image and execute it. Applies to SDRAM as destination only.
Supports Thumb Mode ARM code only.
Set OFFSET (hexadecimal value) to the offset from the beginning SDRAM where the image will be
downloaded.
• ERASE REGION
Choose this to erase a region in NAND flash.
Set OFFSET (hexadecimal value) to offset from beginning of NAND device where erasing begins.
Set SIZE (hexadecimal value) to the number of bytes which will be erased. Use a multiple of the
NAND BLOCK size.
• ERASE ALL
Choose this to erase the entire NAND flash.
6. IMAGE SELECTION (Edit Box)
For download operations, you must specify the binary image to be downloaded. Click the BROWSE
button to select an XLOADER, U-Boot, Linux Kernel. File systems cannot be programmed to NAND
flash using this Flash Tool. U-Boot should be used to program file systems to NAND flash.
7. GO (Button)
Once you have successfully made your selections, the GO button will be enabled. Click the GO start
Flash v1.6 User Guide 234
The Flash Tool will then automatically perform the following operations, as related status information is
displayed in the OUTPUT text window:
• Read the ASIC ID from the target device
• Download the "2nd Loader" program" (for communication with Flash Tool)
• Wait for "2nd Loader" program to start executing on the target board
• Perform register initializations as specified in the Target Configuration file.
• Download a software driver for the specific destination memory device
• Perform the specified Erase or Download operation
If any errors occur, related information will be displayed in the OUTPUT text window. Please cut and
paste the information from the OUTPUT text window if support is needed to diagnose the problem.
10. CLEAR OUTPUT (Button)
At any time, you may clear the OUTPUT text window by clicking the CLEAR OUTPUT button.
The u-boot-2011.09-psp04.06.00.03 is a mainline SPL/u-boot. MLO and u-boot are built from the same sources.
The ability to rebuild the MLO
to load u-boot using 4-bit BCH and 8-bit BCH is coming soon.
The u-boot-2011.09-psp04.06.00.03 is a mainline SPL/u-boot. MLO and u-boot are built from the same sources. The
ability to rebuild the MLO
to load u-boot using 4-bit BCH and 8-bit BCH is coming soon.
Feedback
Several options exist for feedback:
• Leave comments using the link at the bottom of the page. For any error conditions, please
copy and paste the text in the output box into the body of the email. Also, identify your
target board, processor, and memory types. Provide a synopsis of what you are trying to do.
• Join the mailing list (arm_mpu_flash_tool@[Link])
• Join the development effort via the GForge page, and provide feedback there.
Flash v1.6 User Guide 237
Porting Guide
[Remainder of document intended for advanced users]
This is a small porting guide for Flash. It contains an introduction to the modifications that may be necessary in order
to get Flash working on a new board or with a new memory device.
where <platform> is the platform name (use a new name for the new platform), <omap id> is an id number provided
by the OMAP device during peripheral boot over UART or USB along with the <omap version> number, <omap
type> specifies whether the OMAP detected should be a High Security 'HS' or General Purpose 'GP' type, <second
loader file> specifies the second loader to use with the combination of <platform>, <omap id>, <omap version> and
<omap type> and the <board configuration file> is the newly added board configuration.
An example could be:
SDP_MDDR_HYNIX_4G 363007 07 GP Targets\2nd-Downloaders\dnld_startup_omap3_gp_4g.2nd -pheriphalboot_reopen
-board_config Targets\Configurations\configuration_sdp3630_hynix_4g.txt
Note that the installation currently comes with second loaders supporting memory sizes of 2 Gb, 4 Gb and 8 Gb for
GP and HS devices:
The reason for this is that there is a link-time dependency on the placement of the heap and external memory for the
memory device drivers in SDRAM and on the location of the second loader components in internal memory between
HS and GP devices. Pick the right one - e.g. if you have a 4 Gbit memory on an OMAP3 GP based board, use
'dnld_startup_omap3_gp_4g.2nd'.
Flash v1.6 User Guide 238
Board configuration
In order to create the new file it is often useful to start with a copy of one of the existing files. The file has three main
sections:
1. 'use' directive, pointing to a definition file listing a number of OMAP registers and their addresses
2. 'memory' directives, specifying the memories on the platform
3. initialization commands, modifying registers to control the configuration of the OMAP to match the platform
Definitions
A 'use' directive can be used to point to a device definition file, e.g.:
use definitions_omap3.txt
Only one definition file can be used and it must be indicated before the first element using its definitions occurs in
the configuration file. The device definition file basically holds a set of paired of labels and values. The labels can
be used in the device configuration file in place of the values in order to make the device configuration file more
readable. The syntax is as follows:
PRM_CLKSRC_CTRL 0x48307270
CM_CLKEN_PLL 0x48004D00
PRM_CLKSEL 0x48306D40
CM_CLKSEL1_PLL 0x48004D40
CM_CLKSEL2_PLL 0x48004D44
CM_CLKSEL3_PLL 0x48004D48
Memories
Memories are specified using the 'memory' directive:
memory NAME [driver DRIVER] [parameters PARAMETER1 VALUE1 PARAMETER2 VALUE2 ... PARAMETERN VALUEN]
where the device name is NAND and the driver required to access it is present in the binary file
nand_onfi_16bit_8bit.bin (part of this distribution). The driver needs a number of configuration parameters for
correct operation. These are passed directly to driver as written on the line following the 'parameters' keyword. This
distribution contains a number of driver binaries for various memory types. At present these are:
File : nand_onfi_16bit_8bit.bin
Type : NAND
cs (mandatory) Chip select where the device is present (or GPMC-config index)
bberase (mandatory) Erase bad blocks in the device (0 for no, 1 for yes).
Caution: erasing bad blocks may cause an irreversible loss of manufacturing information.
onfi (optional) Read and use ONFI device description from the device (0 for no, 1 for yes).
bpp (mandatory if onfi = 0) Bytes per page if ONFI information is not used.
sbpp (mandatory if onfi = 0) Spare bytes per page if ONFI information is not used.
ppb (mandatory if onfi = 0) Pages per block if ONFI information is not used
Flash v1.6 User Guide 239
bpl (mandatory if onfi = 0) Blocks per logical unit if ONFI information is not used
acv (mandatory if onfi = 0) Address cycle values - 8 bit value with lower 4 bits for row and upper 4 bits for
column.
f (mandatory if onfi = 0) Features - 16 bit value with bit 0 = 16 bit data operation, rest are don't-care
Examples : memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000
bberase 0
bberase 0 onfi 0 bpp 2048 sbpp 64 ppb 64 bpl 4096 l 1 acv 0x23 f 0x0019
For SDRAM, no driver is required, but the memory type must be specified with one parameter stating the base
address in the memory map, e.g.:
Archived Versions
AM35x/AM37x Flash Tool User's Guide for Sitara SDK 5.0.2 (Archived) [7]
References
[1] http:/ / processors. wiki. ti. com/ index. php/ AM35x-OMAP35x-PSP_04. 02. 00. 07_UserGuide#NAND
[2] http:/ / software-dl. ti. com/ dsps/ dsps_public_sw/ am_bu/ amflashutil/ latest/ index_FDS. html
[3] http:/ / processors. wiki. ti. com/ index. php/
How_to_Build_a_Ubuntu_Linux_host_under_VMware#How_to_Set_up_Shared_Folder_in_VMWare
[4] http:/ / processors. wiki. ti. com/ index. php/
How_to_Build_a_Ubuntu_Linux_host_under_VirtualBox#Sharing_Files_Between_Ubuntu_and_Windows
[5] http:/ / processors. wiki. ti. com/ index. php/ Flash_v1. 4_User_Guide#Porting%20Guide
[6] https:/ / gforge. ti. com/ gf/ project/ flash
[7] http:/ / processors. wiki. ti. com/ index. php?title=Flash_v1. 6_User_Guide& oldid=89405
The following details the procedures required to Flash the AM18x EVM.
USB-based Flash Tool support is not planned for ARM9 based processors.
1. Download serial flashing tool here : [Link] [1]. Get
the latest version, 2.35.
Version 2.35 is newer than the version included with the Sitara SDK 5.0.3.x. Version 2.35 has CCS v5.1 projects
for the
CCS/JTAG based flash writer tools.
2. Extract the serial flashing tool onto your Windows machine. It creates a file structure that begins with the folder
OMAP-L138_FlashAndBootUtils_2_35.
3. The OMAP-L138_FlashAndBootUtils program requires Microsoft .NET framework v4.0 or later. To see if it is
neccessary to update your Microsoft .NET Framework
to v4.0
[2]
see How to determine Microsoft .NET Framework version . If v4.0 has NOT been installed, download it from
here: Microsoft .NET 4.0 framework [3] and install it.
Reboot machine if it asks you.
• The OMAP Serial Flash Tool has had some issues running on a vmware and virtual box environment,
if you are using these environments it is recommended to use the Windows version of the tool.
4. Copy your u-boot binary file into the OMAP-L138_FlashAndBootUtils_2_35\OMAP-L138\GNU folder.
The pre-built UBL and u-boot binary file can be found in the ./board-support/prebuilt-images/ folder in the SDK
installation.
• Note: The UBL binary found in the prebuilts section of the SDK is will run the processor at 456MHz.
If your part will not run at that speed please use the UBL binary that ships with the Serial OMAP
Flash Tool. This UBL will expect to find U-boot at a pre-defined sector on the SD Card. Please see
AM18x Flash Tool User's Guide 241
this article on how to write u-boot for a bootable SD Card on AM180x processors. [4]
See How to Set up a Shared Folder in VMWare [3] or How to Setup a Shared Folder in Virtual Box [4]
for help with moving files between a Linux virtual machine and the Windows OS.
5. Open a command prompt window and navigate to OMAP-L138_FlashAndBootUtils_2_35\OMAP-L138\GNU
for a Windows platform and reversing the slashes for a Linux platform
OMAP-L138_FlashAndBootUtils_2_35/OMAP-L138/GNU
6. Set the boot pins to UART2 boot mode. This is done by setting switch S7 on the AM18x EVM according to the
following table:
• Note: As a reminder please remember your existing switch settings before changing so you can switch
back, this affects boot modes etc.
AM180x EVM (Logic)
Pin# 1 2 3 4 5 6 7 8
Pin# 1 2 3 4 5 6 7 8
7. Flash uboot using one of the following commands: (Please note, if you are using Windows command prompt, do
not copy and past the command, you must type it at the command prompt)
For AM180x EVM (Logic): Execute the command “sfh_OMAP-[Link] –flash
ubl\ubl_OMAPL138_SPI_MEM.bin [Link]”.
For AM1810 EVM (Spectrum Digital): Execute the command “sfh_OMAP-[Link] –targetType AM1810 –flash
ubl\ubl_INTDEV0_SPI_MEM.bin [Link]”.
8. Press S5 to reset the target board when the serial flasher program requests it.
9. Set the boot pins to SPI1 boot mode. This is done by setting switch S7 on the AM18x EVM according to the
following table:
AM180x EVM (Logic)
Pin# 1 2 3 4 5 6 7 8
Pin# 1 2 3 4 5 6 7 8
References
[1] http:/ / sourceforge. net/ projects/ dvflashutils/ files/ OMAP-L138/
[2] http:/ / msdn. microsoft. com/ en-us/ kb/ kbarticle. aspx?id=318785
[3] http:/ / www. microsoft. com/ downloads/ en/ details. aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992& displaylang=en
[4] http:/ / processors. wiki. ti. com/ index. php/
GSG:_OMAP-L138_DVEVM_Additional_Procedures#Creating_bootable_SD_card_for_OMAP-L138_EVM_board
Purpose
The purpose of this article is to explain the file systems that are delivered as part of the AMSDK and how those file
systems can be modified to customize them for your use case. The tools discussed in this article are installed by
default in the AMSDK file system for your convenience.
target# opkg
NOTE: This list only contains information about packages that were installed using the package manager.
Applications that were built and copied to the file system and not installed as a .ipk package are not tracked by opkg
AMSDK File System Optimization/Customization 243
Where <pkgname> is the name of the package as given in the opkg list-installed output. This command will produce
a list of all the files on the file system that belong to the given package.
This command will find which package installed the given file. This may be useful later when you want to remove
an particular file because this command can help you find the package to remove.
This command will print the list of packages the depend on the package you entered, as well as the packages that
depend on those packages, and so forth.
Removing Packages
One of the simplest ways to modify the contents of the file system is to use the opkg utility to remove packages (or
install if you have pre-built packages). Removing a package is often as simple as:
However, sometimes a package is a DEPENDENCY of another package. In this case you have the following
options:
• Use the --force-depends option
• This option will force the removal of the package but will leave any packages that depend on this package
installed. This can be useful in the case that you want to remove a particular package, but that package is
depended on by some other package that you do not want removed.
• Use the --force-removal-of-dependent-packages option
• This option will go up the dependency list and remove all packages in the dependency chain. You should
check all the packages being removed to make sure they are indeed packages you want to remove and do not
contain other files you want.
• Remove the individual packages that depend on this package first
• This way you can control exactly which dependent packages are removed and which are left in place.
NOTE: opkg will print the packages that depend on the package being removed. It is usually a good idea to use the
opkg files command for the packages that depend on the one being removed so that you can make sure that no files
AMSDK File System Optimization/Customization 244
Adding Applications
In most cases installing additional applications can be as simple as copying the the binary executable to the file
system. However, if you have built your own .ipk packages you can use opkg to install those ipks into the target file
system. One major advantage of using the package manager is the ability to track the package and it's content with
the opkg package manager. More details will be coming about how to build your own packages, but for now please
refer to this link [1] to learn more about building custom file systems with Arago.
References
[1] http:/ / arago-project. org/ wiki/ index. php/ Building_with_Arago
Training Modules
We have a number of modules that are complete and others we are actively working on. All of our Linux training is
provided on this wiki.
If you have comment on the training or a request for Linux training that is not be captured here, please let us know
using the sdk_feedback@[Link] [14] mailing list
NOTE
The presentations below are loaded to a Google Drive share site. To download the presentations please follow the
link to the Google Drive site and then select File -> Download to save the presentation
NOTE
If you are unable to access Google Drive documents you can also find this training material at
[Link]/sitarabootcamp [15]
Sitara Linux Training 245
Linux Host Sitara Linux Training: This page details how the Linux Host is configured for Sitara Linux Training. These are the
Configuration Linux Host same methods to prepare laptops used in live TI training.
Configuration
Introduction to Linux - Introduces the community-based Linux ecosystem on TI platforms. What will be covered are
the components that make up the ecosystem such as the boot loader, Linux kernel, device
drivers, user application layer and the relationship between them.
[16] - Looks at all aspects of the boot process from power up to running user a application beginning
Linux Boot Process
with ROM boot loader progressing through secondary program loader, u-boot, kernel and
finishing with user-level initialization.
Sitara Linux Training: Learn about the various components that make up the ARM MPU Linux software development
Sitara Linux Training:
Hands on with the kit including the out-of-box application launcher, the CCS IDE, example applications. In
Hands-on with the SDK
[17] SDK addition, host tools such as the pin-mux utility and the flash tool will be introduced. All these
components are packaged into a single easy to use installer from [Link]
Code Composer Studio Code Composer Studio Covers what the Eclipse-based Code Composer Studio is, how to use it for embedded Linux
v5 v5 application development, debugging and additional plug-ins that are provided
Sitara Linux Training: Discusses how to improve product power performance by minimizing power consumption and
Sitara Linux Training:
[18] Power Management guaranteeing system performance. In addition, power management techniques enabled via the
Power Management
Linux SDK will be discussed
Sitara Linux Training: Covers cryptography basics and explore cryptographic functions enabled via open source
Sitara Linux Training:
[19] Cryptography projects. In addition, cryptographic hardware acceleration access and Linux SDK example
Cryptography
applications will be discussed.
Sitara Linux Training: Discusses the fundamentals necessary to port a TI Linux-based EVM platform to a custom
Sitara Linux Training:
[20] Linux Board Port target platform. Introduces the necessary steps needed to port the following components: Linux
Linux Board Port
kernel.
Sitara Linux Training: Discusses the fundamentals necessary to port a TI Linux-based EVM platform to a custom
Sitara Linux Training:
[20] U-Boot Board Port target platform. Introduces the necessary steps needed to port the following components:
U-Boot Board Port
secondary program loader, u-boot.
Sitara Linux Training: Learn about how U-Boot and Kernel Debug can be done using CCSv5 using JTAG. This
Sitara Linux Training:
U-Boot Linux Debug presentation and accompanying lab will discuss what debug information is necessary to be built
U-Boot/Kernel Debug
[21] with CCSv5 into U-Boot and the Kernel to allow source code level debug with a JTAG interface.
with CCSv5
ARM Multimedia ARM Multimedia Introduces open-source based multimedia codecs for the ARM Cortex-A8. In addition, look at
the capability of the NEON coprocessor to accelerate multimedia. Plus, introduces GStreamer,
an open-source pipeline-based framework that enables access for multimedia through
FFMPEG/libav support on the ARM. GStreamer will be illustrated with Linux SDK examples.
Learn how to develop a GUI quickly with the Linux SDK. Learn background information on
Sitara Linux Training: [Linux Training:
[22] QT. Learn how to use the SDK to get started developing a GUI. Learn about QT Creator and all
Hands on with QT Hands on with QT
[23] the QT toolset.
]
Oprofile Oprofile Introduces the Opensource tool Oprofile. When is it useful during the development cycle.
Introduce some of the more popular features. Cover both modes of operation, internal HW
counters or timer interrupts. Cover internal operation details. Also point out use cases where
Oprofile may not be useful.
[24] Sitara Linux Training: Learn how the Linux init scripts work with the sysvinit system as well as how the profile scripts
Init Scripts
Init Scripts can be used to affect the login process.
Sitara Linux Training: Learn how to identify the portions of the Linux boot taking the most time and remove or defer
Optimizing Linux Boot
[25] Optimizing Linux those operations until later. The goal of this lab is to have a system booting to a display on the
Time
Boot Time LCD and reading a touchscreen event in less than 3 seconds.
How to use a Mouse instead of the Touchscreen with Matrix 246
Introduction
A mouse can be used instead of touchscreen input with the Matrix GUI by following these steps. It is also possible to
use touchscreen and mouse input simultaneously.
Restrictions: For AM37x and AM35x: The mouse must be connected through a USB 2.0 hub to the EVM. It must
not be connected directly to the EVM.
Enable Mouse
On your Target File system, edit the file: /etc/init.d/matrix-gui-2.0 This script file will set Mouse support by default,
but if it detects a touchscreen, then it will setup touchscreen support. If you comment out the touchscreen support
then the default will remain mouse support. Use the '#' to comment out the line below:
For Mouse support, Replace:
if [ -e /dev/input/touchscreen0 ]
then
export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
with
if [ -e /dev/input/touchscreen0 ]
then
# export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
with
Warning: If you enable both, the touchscreen now requires a double touch instead of a single touch.
How to use a Mouse instead of the Touchscreen with Matrix 247
Kernel
The Kernel has been configured to enable mouse support in your SDK, so this step is not necessary if you are using
the SDK.
If you have built your own kernel: The kernel must be configured to include the PS/2 mouse support. To verify this,
run the menuconfig utility.
Instructions on executing menuconfig can be found here:
[Link]/[Link]/AMSDK_Linux_User%27s_Guide#Customizing_the_Configuration [1]
Look under:
Device Drivers ---> Input device support ---> <*> Mouse interface
Device Drivers ---> Input device support ---> <*> Mice --->
If mouse support is not already included in the kernel, enable the above two configuration by typing 'y' and rebuild
the kernel. You can find instructions for rebuilding kernel here:
AMSDK Linux User's Guide#http:.[Link].2FAMSDK_Linux_User.27s_Guide
NOTE: If you have Matrix or any other GUI application already running you should stop that application (How to
Stop Matrix) before running ts_calibrate so that you can see the calibration screen.
Exporting TSLIB_CALIBFILE
The environment variable TSLIB_CALIBFILE is used by the tslib package to indicate the location of the pointercal
file. The default value for TSLIB_CALIBFILE is /etc/pointercal. If you are writing a program that uses tslib you
should make sure that you export TSLIB_CALIBFILE to point to the location of your pointercal file (as indicated in
the previous section), or that you place a copy of the pointercal file at the default /etc/pointercal location.
U-Boot
In AM335x the ROM code serves as the 1st stage bootloader. The 2nd and the 3rd stage bootloaders are based on
U-Boot [1]. In the rest of this document when referring to the binaries, the binary for the 2nd stage is referred to as
SPL and the binary for the 3rd stage as simply U-Boot. SPL is a non-interactive loader and is a specially built
version of U-Boot. It is built concurrently when building U-Boot.
The ROM code can load the SPL image from any of the following devices
• Memory devices non XIP (NAND/SDMMC)
The image should have the Image header. The image header is of length 8 byte which has the load address(Entry
point) and the size of the image to be copied. RBL would copy the image, whose size is given by the length field in
the image header, from the device and loads into the internal memory address specified in the load address field of
Image header.
• Peripheral devices (UART)
AM335x U-Boot User's Guide 249
RBL loads the image to the internal memory address 0x402f0400 and executes it. No Image Header present.
Updated Toolchain
Starting with Sitara Linux SDK 6.0 the location of the toolchain has changed and for non ARM 9 devices a new
Linaro based toolchain will be used. Details about the change in toolchain location can be found here [2]. Also details
about the switch to Linaro can be found here [3].
AM18x users are not affected by the switch to Linaro. Therefore, any references to the Linaro toolchain prefix
"arm-linux-gnueabihf-" should be replaced with "arm-arago-linux-gnueabi-".
Building U-Boot
Prerequisite
GNU toolchain for ARM processors from Arago is recommended. Arago Toolchain can be found in the linux-devkit
directory of the SDK here [2]
NOTE
Below steps assumes that the release package is extracted inside directory represented as $AM335x-PSP-DIR
Change to the base of the U-Boot directory.
$ cd ./[Link]/src/u-boot/[Link]
Building into a separate object directory with the "O=" parameter to make is strongly recommended.
AM335x U-Boot User's Guide 250
Commands
$ [ -d ./am335x ] && rm -rf ./am335x
$ make O=am335x CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm am335x_evm
This will generate two binaries in the am335x directory, MLO and [Link] along with other intermediate binaries
that may be needed in some cases (see below).
Host configuration
NOTE
If Teraterm is being used, ensure that the latest version (4.67 is the latest version as of writing this user guide) of
Teraterm is installed. The implementation of the Kermit protocol in Teraterm is not reliable in older versions. The
latest version of Teraterm 4.67 can be downloaded from here [3]. Recent Teraterm updates causes slow Binary
transfer over UART. In such cases, use Windows in-built HyperTerminal application.
Target configuration
• Make sure that the EVM boot switch settings are set to required boot mode and then power on the board.
NAND
In order to boot from the NAND flash, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5
SPI
In order to boot from the SPI flash, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5
USB
In order to boot from the USBmode, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5
UART
In order to boot from the UART mode, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5
SD
In order to boot from the SD card, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5
Position ON ON ON OFF ON
CPSW Ethernet
In order to boot from the CPSW ethernet mode, set the SW3 switch as follows:
Dip switch # 1 2 3 4 5 6 7 8
NOTE
The setting of switch SW3:[7:6] is because the EVM uses RGMII mode. For more details please refer to the TRM.
NOTE
Due to heavy pin-muxing, boot device is selectively available on selected AM335x EVMs & profiles. Details about
the availability of the peripherals on different Profiles can be found from the EVM reference manual [3].
Boot Modes
NAND
NOTE
• The following sub-sections illustrate the usage of NAND specific commands on AM335X EVM.
• Refer to EVM Switch Settings section for more info on enabling/disabling different boot devices.
This section gives an overview of the NAND support in U-Boot. It also describe how to store the kernel image,
RAMDISK or the UBIFS filesystem to NAND so as to have a network-free boot right from powering on the board to
getting the kernel up and running.
AM335x U-Boot User's Guide 253
Overview
Micron NAND parts (page size 2KB, block size 128KB) are supported on AM335XEVM platforms.
NAND Layout
The NAND part on the EVM has been configured in the following manner. The addresses mentioned here are used
in the subsequent NAND related commands.
Writing to NAND
To write len bytes of data from a memory buffer located at addr to the NAND block offset:
NOTE
• Offset & len fields should be in align with 0x800 (2048) bytes. On writing 3000 (0xbb8) bytes, len field can be
aligned to 0x1000 ie 4096 bytes. Offset field should be aligned to page start address, multiple of 2048 bytes.
If a bad block is encountered during the write operation, it is skipped and the write operation continues from next
'good' block.
For example, to write 0x40000 bytes from memory buffer at address 0x80000000 to NAND - starting at block 32
(offset 0x400000):
If a bad block is encountered during the read operation, it is skipped and the read operation continues from next
'good' block.
For example, to read 0x40000 bytes from NAND - starting at block 32 (offset 0x400000) to memory buffer at
address 0x80000000:
For example, to mark block 32 (assuming erase block size of 128Kbytes) as bad block - offset = blocknum * 128 *
1024:
NOTE
• The user marked bad blocks can be viewed by using this command only after a reset.
Erasing NAND
To erase NAND blocks in a particular the address range or using block numbers:
NOTE
• start offset addr & len fields should align to 0x20000 (64*2048) bytes, [Link] block size 128KB.
This commands skips bad blocks (both factory and user marked) encountered within the specified range.
For example, to erase blocks 32 through 34:
H/W ECC - Hamming Code Should use this scheme only for flashing the U-Boot ENV variables.
H/W ECC – BCH8 Should use this scheme while flashing any image/binary other than the U-Boot ENV variables.
Usage:
AM335x U-Boot User's Guide 256
sw - Set software ECC for NAND hw <hw_type> - Set hardware ECC for NAND <hw_type> - 0 for Hamming code
1 for bch4 2 for bch8 3 for bch16 Currently we support only Software, Hamming Code and BCH8. We do not
support BCH4 and BCH16
Environment NA Hamming NA
variables
Flashing Kernel
TFTP the kernel uImage to DDR.
Now flash the kernel image to NAND at the appropriate offset (refer to NAND layout section for the offsets)
NOTE
• Image_size should be aligned to page size of 2048 (0x800) bytes
UART
This section describes how to use UART boot mode using TeraTerm.
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 1st stage u-boot image “MLO” and click “OPEN” button
• Wait for download to complete and then run following commands in u-boot prompt
If no error messages are displayed the SPL of NAND boot has been successfully transferred to NAND.
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 2nd stage u-boot image “[Link]” and click “OPEN” button
• Wait for download to complete and then run following commands in U-Boot prompt
If no error messages are displayed the U-boot of NAND boot has been successfully transferred to NAND.
AM335x U-Boot User's Guide 258
If no error messages are displayed the SPL of NAND boot has been successfully transferred to NAND.
If no error messages are displayed the U-boot of NAND boot has been successfully transferred to NAND.
The file [Link] is automatically loaded from SD if the bootcmd is run. It can be loaded and put into the
environment manually.
SPI
Note
• This feature is not supported prior to PSP [Link] (and AMSDK [Link]).
• This feature changed kernel location and filenames with PSP [Link] (and AMSDK [Link]).
• The release package does not contain the binary for SPI boot. Please follow the steps mentioned here for
compiling u-boot and use the [Link] and [Link] files that are produced.
• Following those same instructions but building for am335x_evm_spiboot rather than am335x_evm will result in
binaries that will use the SPI flash for environment rather than NAND.
In this example we initially boot from an SD card and use that to transfer the files to write to SPI flash. If loading via
other methods, modify the commands below.
1. Switch ON EVM with switch settings such that SPI is present and boot via non-SPI. See SPI boot for more
information.
2. Write it to SPI memory by executing the following commands:
U-Boot# sf probe 0
U-Boot# sf erase 0 +E0000
U-Boot# mmc rescan
U-Boot# fatload mmc 0 ${loadaddr} [Link]
U-Boot# sf write ${loadaddr} 0 ${filesize}
U-Boot# fatload mmc 0 ${loadaddr} [Link]
U-Boot# sf write ${loadaddr} 0x80000 ${filesize}
CPSW Ethernet
Note
• This feature is not supported prior to PSP [Link] (and AMSDK [Link]).
• The release package does not contain the binary for CPSW ethernet boot. Please follow the steps mentioned here
for compiling u-boot and use the spl/[Link] and [Link] files that are produced.
host am335x_evm {
hardware ethernet [Link];
AM335x U-Boot User's Guide 261
• Copy the [Link] and [Link] files you have build to the directory tftpd serves files from.
• Switch ON EVM with switch settings for CPSW ethernet boot.
• Hit enter and get to u-boot prompt “U-Boot# ”
and copy the resulting [Link] file to the location tftpd serves files out of. For more information please see the
doc/[Link]-spl/README file in the source tree.
NOTE
• When setting a MAC address please ensure that the LSB of the 1st byte if not 1 i.e. when setting the MAC
address: y in xy:ab:cd:ef:gh:jk has to be an even number. For more info this refer to the wiki page http:/ / en.
[Link]/wiki/MAC_address
In case a static ip is not available run the dhcp command to obtain the ip address from the DHCP server on the
network to which the EVM is connected.
U-Boot# saveenv
In all cases we make use of optargs to control passing in of additional arguments and ip_method to determine how
the kernel will deal with networking PRIOR to userspace spawning init. This does not control for example if a dhcp
client will be started as part of the userspace init sequence.
NOTE
• The sizes of images mentioned in the above commands have to be modified based on the actual image size. Also,
it should be aligned to sector size of the flash device used.
AM335x U-Boot User's Guide 263
The value of PARTITION_ID depends on MTD device which holds the rootfs, YYYY depends on the page size of
the partition and VOLUME NAME depends on the volume name given in [Link] file while creating
UBIFS image as described here . In cases where you have multiple UBI volumes, ubi0 would change to the volume
with the root partition.
Once nand_root is set:
U-Boot# setenv ethaddr <unique-MAC-address> <-- Set only if not present already, format uv:yy:zz:aa:bb:cc
U-Boot# boot
Archived
Sitara Linux SDK 05.07 [5]
References
[1] http:/ / www. denx. de/ wiki/ U-Boot/ WebHome
[2] http:/ / software-dl. ti. com/ dsps/ dsps_public_sw/ am_bu/ sdk/ AM335xSDK/ latest/ index_FDS. html
[3] http:/ / logmett. com/ index. php?/ products/ teraterm. html
[4] http:/ / processors. wiki. ti. com/ index. php/ AM335x_JFFS2_Support_Guide
AM335x U-Boot User's Guide 264
Overview
Inside of the Sitara Linux SDK there is a top-level Makefile that can be used to build some of the sub-components
found within the SDK. This Makefile uses the [Link] file and gives an example of how the various components
can be built and the parameters to use.
NOTE: You should not call this makefile with the environment-setup script sourced. The sub-component
Makefiles will handle sourcing this script where appropriate, but some make targets such as the Linux kernel make
target do not work properly when this script is already sourced.
[Link]
The following sections cover the [Link] file found in the top-level of the Sitara Linux SDK.
Purpose
The [Link] file in the top-level of the Sitara Linux SDK is used not only by the top-level Makefile, but also by
many of the sub-component Makefiles to gain access to common shared variables and settings. The next section
covers the main variables defined in the [Link] file.
Variables Defined
• PLATFORM - This represents the machine name of the device supported by the SDK. This machine name has a
direct correlation to the machine definition in the Arago project [1] build system. The PLATFORM variable can
be used by component Makefiles to make decisions on a per-machine basis.
• ARCH - This represents the architecture family of the machine. This can be used by component Makefiles to
change settings such as mtune values in CFLAGS based on the architecture of the PLATFORM.
• UBOOT_MACHINE - This us used when building u-boot to configure the u-boot sources for the correct device.
• TI_SDK_PATH - This points to the top-level of the SDK. This is the same directory where the [Link] file
itself is located.
• DESTDIR - This points to the base installation directory that applications/drivers should be installed to. This is
usually the root of a target file system but can be changed to point anywhere. By default the initial value is a
unique key value of __DESTDIR__ which is replaced with the location of the target NFS file system when the
[Link] script is run.
• LINUX_DEVKIT_PATH - This points to the linux-devkit directory. This directory is the base directory
containing the cross-compiler and cross-libraries as well as the environment-setup script used by many
component Makefiles to source additional variable settings.
Sitara Linux SDK Top-Level Makefile 265
• CROSS_COMPILE - This setting represents the CROSS_COMPILE prefix to be used when invoking the
cross-compiler. Many components such as the Linux kernel use the variable CROSS_COMPILE to prepend the
proper prefix to commands such as gcc to invoke the ARM cross-compiler.
• ENV_SETUP - This points to the environment-setup script in the linux-devkit directory used by many
components to configure for a cross-compilation build.
• LINUXKERNEL_INSTALL_DIR - This points to the location of the Linux kernel sources, which is used by
components such as out-of-tree kernel drivers to find the Linux kernel Makefiles and headers.
Makefile
The following sections cover the Makefile found in the top-level of the Sitara Linux SDK
Target Types
For each of the targets discussed below the following target type are defined
• <target> - This is the build target which will compile the release version of the component
• <target>_install - This target will install the component to the location pointed to by DESTDIR
• <target>_clean - This target will clean the component
Top-Level Targets
The Sitara Linux SDK provides the following targets by default which will invoke the corresponding component
targets:
• all - This will call the build target for each component defined in the Makefile
• install - This will call the install target for each component defined in the Makefile
• clean - This will call the clean target for each component defined in the Makefile
Common Targets
The following targets are common to all Sitara Linux SDKs
• linux - Compiles the Linux kernel using the default tisdk_<PLATFORM>_defconfig configuration
• matrix-gui - Builds the matrix-gui sources
• am-benchmarks - Builds the ARM Benchmarks for the ARCH defined in [Link]
• am-sysinfo - Build the helper applications used by the system settings demos in Matrix
• matrix-gui-browser - Builds the matrix GUI browser Qt project
• refresh-screen - Builds the refresh screen Qt project
Additional Targets
Depending on the capabilities and software available for a given device additional targets may also be defined. You
can find the list of all the targets by looking at the all target as described in the Top-Level Targets section above.
Add devices will have one or the other of the following targets depending on the u-boot version used:
• u-boot-spl - This target will build both u-boot and the u-boot SPL (MLO) binaries used in newer versions of
u-boot. This actually provides a u-boot and u-boot-spl target in the Makefile.
• u-boot-legacy - This target will build the u-boot binary for older versions of u-boot which do not support the SPL
build.
• wireless - Starting with Sitara Linux SDK 05.04 there is now a wireless top-level build target that can be used to
rebuild the wireless drivers against the kernel sources in the board-support directory.
Sitara Linux SDK Top-Level Makefile 266
Usage Examples
The following examples demonstrate how to use the top-level Makefile for some common tasks. All of the examples
below assume that you are calling the Makefile from the top-level of the SDK.
• Build Everything
host# make
• Clean Everything
• Install Everything
References
[1] http:/ / arago-project. org
Sitara Linux SDK GCC Toolchain 267
Overview
Starting with SDK 06.00 the Sitara Linux SDK contains a Linaro based toolchain for Cortex A8 devices. AM18x
will continue to use arm-arago-linux-gnueabi toolchain. The Linaro toolchain also enables hardware floating point
(hardfp) support. Older toolchains including arm-arago-linux-gnueabi- uses software floating point (softfp). This
results in software built using a hardfp toolchain being incompatible with software built with a softfp toolchain.
Switch to Linaro
Starting with Sitara Linux SDK 6.0 non ARM9 devices will use a Linaro based tool chain. Other than using a newer
version of GCC the Linaro tool chain also supports hard floating point also known as Hard-FP. Hard-FP uses the
FPU on the ARM instead of simulating it. Older tool chains including the Arago tool chain uses soft floating point
(Soft-FP). Binaries built using a soft-fp tool chain are not compatible with binaries built using a hard-fp. Therefore,
you must rebuild all binaries to use either hard-fp and soft-fp since you can't mix and match. By default all binaries
included in the Sitara Linux SDK will be built for hard-fp.
The name of the toolchain binaries have also been updated. Pre SDK 6.0 toolchains used a prefix of
"arm-arago-linux-gnueabi-". Post SDK 6.0 toolchain uses a prefix of "arm-linux-gnueabihf-" For example the
new toolchain's gcc compiler is named arm-linux-gnueabihf-gcc.
AM18x Users
As highlighted in the Switch to Linaro [3] section the move to Linaro doesn't affect the AM18x SDK. The toolchain
prefix remains "arm-arago-linux-gnueabi-". For example, the filename of the gcc compiler is
arm-arago-linux-gnueabi-gcc. However, the updated Linux-Devkit structure [2] does affect AM18x.
Location in SDK
The toolchain is located in the Sitara Linux SDK in the <SDK INSTALL DIR>/linux-devkit directory. The
following sections will cover the key components of the toolchain.
Cross-Compilers/Tools
The cross-compilers and tools such as qmake2 can be found the the <SDK INSTALL DIR>/linux-devkit/bin
directory. Adding this directory to your PATH will allow using these tools. For example:
host# export PATH="<SDK INSTALL DIR>/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH"
the cross-compile tools are prefixed with the arm-linux-gnueabihf- prefix. i.e. the GCC cross compiler is called
arm-linux-gnueabihf-gcc. Additional tools are also located here such as the qmake2, rcc, uic tools used by Qt. In
addition there is a [Link] file that can be used by tools such as Qt creator to use the pre-built libraries found in the
Sitara Linux SDK.
Cross-Compiled Libraries
The toolchain within the Sitara Linux SDK contains more than just the cross-compiler, it also contains pre-built
libraries that can be used in your applications without requiring you to cross-compile them yourself. These libraries
include packages from alsa to zlib. The libraries are located in the <SDK INSTALL
DIR>/linux-devkit/sysroots/<device specific string>-oe-linux-gnueabi/ directory. For a list of the libraries you
can refer to the software manifest found in the <SDK INSTALL DIR>/docs directory or look at the list of libraries
available in the <SDK INSTALL DIR>/linux-devkit/sysroots/<device specific string>-oe-linux-gnueabi/usr/lib
directory. You will also find the header files corresponding to these libraries in the <SDK INSTALL
DIR>/linux-devkit/sysroots/<device specific string>-oe-linux-gnueabi/usr/include directory. Usage of these
libraries will be covered in more detail in the next sections, but as an example if your application wants access to the
alsa asound library then you can now do the following command (assuming you have added the cross compiler to
your PATH):
environment-setup script
When cross-compiling packages that use configuration tools and autotools there are many settings that are required
to make sure that the proper cross-compile libraries are used. The environment-setup script located in the <SDK
INSTALL DIR>/linux-devkit directory handles this for you. This script exports variables to perform actions such
as:
• Adding the toolchain to the PATH
• Setting up CPATH
• Setting up PKG_CONFIG_* paths
• Setting standard variable such as CC, CPP, AR to the cross-compile values
To use the environment-setup script you only need to source it. This is as simple as:
To know if the environment setup script has been sourced in your current shell the shell prompt will be changed to
contain the [linux-devkit]: prefix in the command prompt.
The Usage section below will cover some cases where using the environment-setup script is useful.
Usage
The following sections give some examples of how to use the included toolchain to compile simple applications such
as HelloWorld to more complex examples such as configuring and compiler GStreamer plugins.
Simple Cross-Compile
In the simplest case the cross-compiler can be used to compile simple applications that just need access to standard
libraries. The two examples below cover an application that uses only the standard libgcc libraries and another
example that uses the pthreads threading library.
HelloWorld
Simple applications like HelloWorld can be compiled using just a call to the cross-compiler since the cross-compiler
can find the libraries it was built with without any issues. The following steps will show how to make a simple
helloworld application and cross-compile that application.
1. Create a helloworld.c file
#include <stdio.h>
int main() {
printf ("Hello World from Sitara!!!\n");
return 0;
}
Sitara Linux SDK GCC Toolchain 270
2. Cross-compile the helloworld.c file using the cross-compile toolchain. In this example we will invoke the
toolchain without it having been added to our PATH.
host# <SDK INSTALL DIR>/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
helloworld.c -o helloworld
After the above steps are run you should now have a helloworld executable in your directory that has been compiled
for the ARM. A simple way to check this is to run the following command:
NOTE: the ARM entry above was made bold for emphasis
Using PThreads
In many cases your simple application probably wants to use additional libraries that the standard libgcc and glibc
libraries. In this case you will need to include the header files for those libraries as well as add the library to the
compile line. In this example we will look at how to build a simple threading application and use the pthread library.
This example was derived from the example code at [Link] [1]
• Create a file thread-ex.c with the following contents
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
data1.thread_no = 1;
strcpy([Link], "Hello!");
data2.thread_no = 2;
Sitara Linux SDK GCC Toolchain 271
strcpy([Link], "Hi!");
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
exit(0);
}
/* do the work */
printf("Thread %d says %s \n", data->thread_no, data->message);
return 0;
}
• Cross-compile the thread-ex.c file using the cross-compile toolchain. In this example we will first add the
toolchain to our PATH. This only needs to be done once. We will also add the pthread library to the compile line
so that we will link with the library file that provides the pthread_* functions.
export PATH="<SDK INSTALL DIR>/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH"
arm-linux-gnueabihf-gcc -lpthread thread-ex.c -o thread-ex
NOTE: the -lpthread entry above was made bold for emphasis
Configure/Autotools
The last case to cover is one where the environment-setup script is useful. In this case we will download the
gst-plugins-bad package and configure and build it using the environment-setup script to configure the system for
the autotools to properly detect the libraries available as pre-built libraries.
1. First download the [Link] [2] package
wget [Link]
IMPORTANT
In order to build the gst-plugins-bad package you will need libglib2.0-dev installed on your system. You can
install this using sudo apt-get install libglib2.0-dev
2. Extract the plugins tarball
tar zxf [Link]
3. Change directory into the extracted sources
cd gst-plugins-bad-0.10.11
4. Source the <SDK INSTALL DIR>/linux-devkit/environment-setup script to prepare to configure and build
the plugins.
source <SDK INSTALL DIR>/linux-devkit/environment-setup
Sitara Linux SDK GCC Toolchain 272
5. Now configure the package. We need to define the host setting to tell the configuration utility what our host
system is, and we will also disable some plugins that are known to be bad.
./configure --host=i686 --disable-deinterlace2 --disable-x264
6. When the configuration is done the last sections will show which plugins will be build based on the libraries
available. This is the key point behind what the environment-setup script provides. By setting up the
PKG_CONFIG_* paths and other variables the configure script was able to check for required libraries being
available to know which plugins to enable. Now that the sources have been configured you can compile them
with a simple make command.
make
Archived
Sitara SDK 5.07 [3]
References
[1] http:/ / www. amparo. net/ ce155/ thread-ex. html
[2] http:/ / gstreamer. freedesktop. org/ src/ gst-plugins-bad/ gst-plugins-bad-0. 10. 11. tar. gz
[3] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_SDK_GCC_Toolchain& oldid=117497
Overview
Starting with the Sitara Linux SDK version [Link] there is now a script in the <SDK INSTALL DIR>/bin
directory named [Link]. The purpose of this script is to create SD cards for the following high-level use
cases:
1. Create the SD card using default images from the Sitara Linux SDK
2. Create the SD card using custom images
3. Create the SD card using partition tarballs (This is not common and is used most often by board vendors)
The script will give you information about each step, but the following sections will go over the details for the use
cases above and walk you through how to use the script as well.
Sitara Linux SDK create SD card script 273
Common Steps
No matter which use case above that you are creating an SD card for the following steps are the same.
If you fail to execute the script with root permissions you will receive a message that root permissions are required
and the script will exit.
• Options:
• y - This will allow you to change the partitioning of the SD card. For example if you have a 3 partition card
and want to create a 2 partition card to give additional storage space to the root file system you would select y
here.
NOTE: This operation WILL ERASE the contents of your SD card
• n - If the SD card already has the desired number of partitions then this will leave the partitioning alone. If you
select n here skip on to the Installing SD Card Content section.
Sitara Linux SDK create SD card script 274
• Options:
• 2 - This is the most common use case and will give the most space to the root file system.
• 3 - This case should only be used by board manufacturers making SD cards to go in the box with the EVM.
This requires access to the partition tarballs used for Out-Of-Box SD cards. This option should be selected if
you are going to follow the SD card using partition tarballs steps below
After selecting the number of partitions move on to the next section.
Prerequisites
1. The Sitara Linux SDK is installed on your host system
2. The SD card you wish to create is inserted into the host system and has a size sufficiently large to hold at least the
bootloaders, kernel, and root file system.
3. You have started running the script as detailed in the Common Steps section above.
################################################################################
################################################################################
You should choose option 1 to create an SD card using the pre-built images from the SDK.
If you executed this script from within the SDK then the script can determine the SDK path automatically and will
start copying the contents to the SD card. Once the files are copied the script will exit.
If you executed the script from outside of the SDK (i.e. you copied it to some other directory and executed it there)
please see the next section.
Enter the path to the SDK installation directory here. For example if the SDK was installed into the home directory
of the sitara user the path to enter would be /home/sitara/ti-sdk-<machine>-<version>. You will be prompted to
confirm the installation directory. The SD card will then be created using the default images and the script will exit
when finished.
Prerequisites
1. The Sitara Linux SDK is installed on your host system
2. The SD card you wish to create is inserted into the host system and has a size sufficiently large to hold at least the
bootloaders, kernel, and root file system.
3. You have started running the script as detailed in the Common Steps section above.
################################################################################
################################################################################
Prerequisites
1. The Sitara Linux SDK is installed on your host system
2. The SD card you wish to create is inserted into the host system and has a size sufficiently large to hold at least the
bootloaders, kernel, and root file system.
3. You have started running the script as detailed in the Common Steps section above.
Sitara Linux SDK create SD card script 277
Archived Versions
• Sitara Linux SDK 05.07 [1]
References
[1] http:/ / processors. wiki. ti. com/ index. php?title=Sitara_Linux_SDK_create_SD_card_script& oldid=114505
How to add a JVM 278
Introduction
This article shows the steps necessary to add an Oracle Hotspot Java Virtual Machine (JVM) to your Sitara SDK.
Due to the licensing of this JVM, it can not be delivered with the Sitara SDK. You must download it and install it
separately. Customers wishing to evaluate this JVM should also investigate and evaluate the Oracle Hotspot license.
PATH=$PATH:/home/root/ejre1.7.0_04/bin
add the above line before the following line which is found near the bottom of /etc/profile
3. Now each time you login, your path will be automatically set up to include the "java" executable from your
installed JVM. By typing "java -version", you can verify you are setup correctly.
• you should see the JVM version displayed similar to the results below. Your version may be different
depending on which one you downloaded:
java CaffeineMarkEmbeddedApp
3. Benchmark information:
• There are 6 tests associated with the Embedded version. Each tests runs for about the same amount of time
and reports back how many iterations of the test could be completed in allocated time period. The higher the
score the better. There is also an overall result which takes in to account all the test results.
How to Build a Ubuntu Linux host under VMware Source: [Link] Contributors: Alanc, Cem8101, Cjc211, Fcooper, Gregturne, Jefflance01,
Kevinsc, Pprakash, SiddharthHeroor
Sitara SDK Installer Source: [Link] Contributors: Cem8101, Kevinsc, Mike Tadyshak, Nangelou
Sitara Linux SDK Setup Script Source: [Link] Contributors: Fcooper, Kevinsc, TimHarron
Matrix Users Guide Source: [Link] Contributors: [Link], BernieThompson, Cem8101, ChrisRing, ClayMontgomery, Fcooper,
Gregturne, Jefflance01, Kevinsc, Mike Tadyshak, Stevek, Tpotthast
AM335x Power Management User Guide Source: [Link] Contributors: Fcooper, Gguyotte
AM37x Power Management User Guide Source: [Link] Contributors: Fcooper, Gguyotte
OMAPL1: Changing the Operating Point Source: [Link] Contributors: DanRinkes, SekharNori
ARM Multimedia Users Guide Source: [Link] Contributors: Cem8101, D-gerlach, Fcooper, Kevinsc, Pprakash
Cryptography Users Guide Source: [Link] Contributors: Cem8101, Gregturne, Joelagnel, Kevinsc, Lo, TimHarron
WL127x WLAN and Bluetooth Demos Source: [Link] Contributors: A0221015, Ksgarcia
OMAP Wireless Connectivity OpenSource Compat Wireless Build Source: [Link] Contributors: A0389760, A0794974, Benburns, Eyalreizer,
Moosa
OMAP Wireless Connectivity mac80211 compat wireless implementation Architecture Source: [Link] Contributors: A0794974, Eyalreizer,
Moosa
OMAP Wireless Connectivity Battleship Game demo Source: [Link] Contributors: A0794974, Dmeixner, Moosa
AMSDK u-boot User's Guide Source: [Link] Contributors: Cem8101, Fcooper, Jefflance01, Joelagnel, Mike Tadyshak, Stevek, Trini
AMSDK Linux User's Guide Source: [Link] Contributors: Cem8101, Fcooper, Gregturne, Jefflance01, TimHarron
Code Composer Studio v5 Users Guide Source: [Link] Contributors: Cem8101, Cjc211, Fcooper, Jefflance01, Kevinsc, Mike Tadyshak
Linux Debug in CCSv5 Source: [Link] Contributors: Ali Bahar, AndyW, Arnier, Fcooper, John, Jsarao, Kevinsc, Nangelou, Rp, Rsjsouza, Stater
How to setup Remote System Explorer plug-in Source: [Link] Contributors: Cem8101, ChrisRing, Mike Tadyshak, Nangelou
How to Run GDB on CCSv5 Source: [Link] Contributors: [Link], Cem8101, Cjc211, Fcooper, Jefflance01, John, Kevinsc, Mike
Tadyshak, SchuylerPatton
Pin Mux Utility for ARM MPU Processors Source: [Link] Contributors: [Link], Cem8101, Erives, Kevinsc, Kevinvap, Mike
Tadyshak, Nfatemi
Pin Setup Tool for AM18xx ARM Microprocessors Source: [Link] Contributors: Benburns, Jefflance01, Kevinsc, Mike Tadyshak
AM335x Flashing Tools Guide Source: [Link] Contributors: Cem8101, Gururaja, Kevinsc, Rachna, SekharNori, [Link], X0155329
Flash v1.6 User Guide Source: [Link] Contributors: Kevinsc, Mike Tadyshak
AM18x Flash Tool User's Guide Source: [Link] Contributors: Alanc, Gguyotte, Jeff Cobb, Jefflance01, Kevinsc, Mike Tadyshak,
SchuylerPatton
AMSDK File System Optimization/Customization Source: [Link] Contributors: Cem8101, Jefflance01, Kevinsc
How to use a Mouse instead of the Touchscreen with Matrix Source: [Link] Contributors: ClayMontgomery, Fcooper, Jefflance01, Kevinsc
How to Recalibrate the Touchscreen Source: [Link] Contributors: Cem8101, Gguyotte, Jefflance01, Kevinsc
AM335x U-Boot User's Guide Source: [Link] Contributors: Akshay.s, Cem8101, Fcooper, Gururaja, Jinleileiking, Joelagnel, Rachna, Trini,
VaibhavBedia, X0155329
Sitara Linux SDK Top-Level Makefile Source: [Link] Contributors: Cem8101, Jefflance01, Kevinsc
Sitara Linux SDK GCC Toolchain Source: [Link] Contributors: Cem8101, Fcooper, Jefflance01, Kevinsc
Sitara Linux SDK create SD card script Source: [Link] Contributors: Cem8101, Jefflance01, Kevinsc, Nangelou
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER
APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE
A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
License
1. Definitions
a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or
phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work
that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in
timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below,
which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting
separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.
c. "Creative Commons Compatible License" means a license that is listed at http:/ / creativecommons. org/ compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License,
including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made
available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.
d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.
f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a
performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the
producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression
including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a
musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or
lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography,
topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not
otherwise considered a literary or artistic work.
i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise
rights under this License despite a previous violation.
j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to
make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the
communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected
performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights
Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other
applicable laws.
3. License Grant
Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated
below:
a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original
Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
d. to Distribute and Publicly Perform Adaptations.
e. For the avoidance of doubt:
i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right
to collect such royalties for any exercise by You of the rights granted under this License;
ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect
such royalties for any exercise by You of the rights granted under this License; and,
iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via
that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and
formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
4. Restrictions
The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or
Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License.
You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly
Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License.
This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from
any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable,
remove from the Adaptation any credit as required by Section 4(c), as requested.
b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license
(either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the
licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the
terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You
may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable
License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when
You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to
that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to
the terms of the Applicable License.
c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the
medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute,
publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the
extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with
Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The
credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of
the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this
Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the
Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections,
You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in
which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's
honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this
License (right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING
THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,
NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT
ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability
EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE
OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License,
however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different
license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this
License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this
agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not
be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979),
the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject
matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the
standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the
license of any rights under applicable law.