+ All Categories
Home > Documents > SDK 5 hands-on From CCS development environment up … · SDK 5 hands-on" From CCS development...

SDK 5 hands-on From CCS development environment up … · SDK 5 hands-on" From CCS development...

Date post: 29-Jul-2018
Category:
Upload: buitruc
View: 216 times
Download: 0 times
Share this document with a friend
26
SDK 5 hands-on" From CCS development environment up to Linux tips and tricks” 1
Transcript

SDK 5 hands-on" From CCS development environment up to Linux tips and tricks”

1

This morning session

• Put you hands on!

IS IS NOT

• Demo AM335x using Beaglebone • Linux training

• Configuring development environment

for AM335x• Device Driver detail

2

for AM335x• Device Driver detail

• Building your first AM335x program • Android or WinCE

• Exploring Linux SW beside SDK5 • AM335x product training

AM335x software solutions

• Complete Linux software development kit

• Based on Linux kernel 3.1

• Integrated support for WL1271 WiFi/BT

• Includes easy to navigate launcher GUI based on QT/HTML5.0

• Gingerbread based SDK

• Graphics accel for optimal performance

• arowboat.orgcommunity

• RowboPERFbenchmarking application

AndroidStarter

Ware

• Windows Embedded

Compact 7 SDK

• Full support for ARM

v7 instructions

provide greater

Cortex-A8

performance

• 3D graphics SDK

integrated

• OS free programming tool

• Easily migrate from MCU code compatibility with Stellarisware

• Peripheral and graphics libraries

• USB and networking stacks

• Broad support for numerous RTOS including QNX and Integrity

• Mentor Graphics, Ittiam, VisualONsolutions for both graphics and video

• Commercial Linux, Android, WinCE customization options

Linux WinCERTOS

3P

WAREStarter

QT/HTML5.0

• Graphics and video demos, benchmarks, real-time comparisons

• Pre-integrated ARM video Codecs

• Integrated Flash Support

• Example

applications

• Code examples

• Small memory footprint

• Optimized for low latency

options

• Solutions for PRU development and system optimization

Available for free via www.ti.com

3

Selecting Linux as OS

• You’re set on Linux based Kernel, what is the next move ?

• Build Everything yourself

– You know and control everything what’s inside

– Can be long and painful– Can be long and painful

– Everything/every little bits need to be recompiled

• Use a pre-made Distribution

– You know what’s inside

– Better time-to-market

– Package management

4

• TI changed internal development to GIT (mainstream, mainline Linux) in early 2008

• Selling points:

– TI is setting the standard for the EP industry

– Customer Board ports

TI & linux as key selling point

– Customer Board ports easier

– Not the usual suspects on this list…

5

What Is a ‘Linux Distribution’A ‘Linux distribution’ is a combination of the components requiredto provide a working Linux environment for a particular platform:

1. Linux kernel port

� BSP,LSP, PSP = Linux kernel port to a platform, not just a set of device drivers

2. Bootloader

� Eg : U-boot is the standard bootloader for ARM Linux

3. Linux ‘file system’3. Linux ‘file system’

� This does NOT mean a specific type of file system like FAT file system or flash file system … rather, it is more like the “C:\” drive in Windows

� It refers to all the ‘user mode’ software that an application needs such as graphics libraries, network applications, C run-time library (glibc, uclibc),

4. Development tools

� Code Sourcery - GCC, GDB

� CCSv5, GHS Multi, etc.

6

Linux Distributions

Windowing System

OfficeSuite

Browser

• Linux distributions supporting TI ARM MPU Community boards : Angstrom, Ubuntu, Fedora, Android,

Gentoo, ARMedslack and ALIP or Arago

• WindRiver, MontaVista ,Timesys provide commercial (i.e. production) distribution for TI’s ARM MPUs

Kernel

System

• Linux distributions supporting TI ARM MPU Community boards : Angstrom, Ubuntu, Fedora, Android,

Gentoo, ARMedslack and ALIP or Arago

• WindRiver, MontaVista ,Timesys provide commercial (i.e. production) distribution for TI’s ARM MPUs

7

ARM-MPU Linux SDK Contents

» Linux Kernel, Bootloaders & Filesystem

» Revamped Documentation» New Quick Start Guide & SW Developer’s Guide

» Matrix Application Launchers» GUI & TUI based on Qt/WebKit & Ncurses» Touchscreen, Mouse & Keyboard support, Web

Browser

» Example Applications» ARM Benchmarks, WLAN/Bluetooth, 2D/3D graphics,

Power, USB, Browser, Multimedia, CryptographyPower, USB, Browser, Multimedia, Cryptography

» SDK Installer» Easy installation of all target and host software

components & documentation

» CCSv5 (Eclipse IDE)» Linux aware - Compile, build, debug» Preconfigured projects for all Example Applications

» Host Tools» Pin Mux Utility

8

SDK Goal : Be able to Develop

9

• Typical Connectivity– Target vs Host

– TFTP & NFS

• Virtual Machine– VirtualBox or VMWare

– Shared Folders or Samba

– USB SD card reader

SDK Development Environment

– USB SD card reader

• Ubuntu 10.04 LTS

• GCC compiled within Arago

• SDK Installer

• Code Composer Studio v5

10

Setup Script

1. <prompt$> sudo ./setup.sh

2. Install Ubuntu host packages

3. Untar Target Filesystem

4. Setup Network Filesystem

5. Setup TFTP Root Dir

6. Setup Minicom

7. Configure Uboot

8. Load Uboot Settings

11

Next SDK Goal : OOBE

12

Matrix GUI Application Launcher

• HTML5 based user interface

• Exercise peripherals and see

immediate benchmark and

performance results

• Easily add your own stuff and

exercise it using CCSv5

• Starts up on EVM power up• Starts up on EVM power up

• Output to

• LCD / external monitor

• or remote display via network

connection

• Launch applications and navigate

with touch screen or mouse

13

ARM Microprocessor Benchmarks• End users can run benchmarks on their target platform under their own conditions

• Details of architecture and compiler performance

• The ARM Benchmarks are small benchmarks targeting specific performance concerns– Dhrystone: Raw CPU speed, generally targeted for control processor activities– Whetstone: Double precision floating point– Linpack: Single precision floating point, it could also be re-built for double precision floating point

analysis

• All the above benchmarks fit entirely into L1 cache, so once loaded into cache, they are really measuring raw CPU speed.

• None of the benchmarks utilize NEON.– In order to use NEON, the benchmarks would have to be re-written.– Generally these well known benchmarks are intended to run as-is.

CPU ClockSpeed Dhrystone Whetstone Linpack

300 MHz 1.9 DMIPS/MHz 172.4 MWIPS 10719 Kflops

600 MHz 1.9 DMIPS/MHz 357.1 MWIPS 21437 Kflops

800 MHz 1.9 DMIPS/MHz 454.5 MWIPS 28353 Kflops

1 GHz 1.9 DMIPS/MHz 555.6 MWIPS 36622 Kflops

Source: http://www.netlib.org/benchmark/

Performance results for different OPP settings

14

Example Applications• USB Profiler

– Measurement of USB throughput via Bonnie++ benchmark

• Power Manager

– Provides details of power applications integrated into the Matrix GUI,

along with helpful command line equivalents.

• Cryptos

– Enables AES/3DES/SHA/MD5 cryptography and examples– Enables AES/3DES/SHA/MD5 cryptography and examples

– Utilizes the open source Open Crypto Framework and OpenSSL APIs

• Multimedia

– Enables ARM/Neon based multimedia codecs including H.264, MPG4 and

AAC

– Utilizes GStreamer and FFMPEG

15

Pin Mux Utility• Designed for scalability

and device independence

• Imports device information to parse and populate the tool

• Identifies pin mux conflicts and configure conflicts and configure pad IOs

• Save & load board configurations

• Generates uboot source code for the selected pin mux & pad configuration

16

Running servers

Here is a list of some of the running servers:

• ssh (port 22) - for access to a shell

• bone101 (port 80) - small server written in node.js serving up an intro

presentation

• GateOne (port 443) - access to a shell through Firefox or Chrome

• Cloud9 IDE (port 3000) - text editor and debugger for node.js applications • Cloud9 IDE (port 3000) - text editor and debugger for node.js applications

through Firefox, Chrome or Safari

17

The SD Card

• Boot (vfat partition 1)

– MLO

– uEnv.txt

– u-boot.img

– uImage

– windows_users.htm

– quickstartguide.pdf

• rootfs (ext3 partition 2)

SDK 5 Directory Structure

• rootfs (ext3 partition 2)

– the untarred rootfs

• START_HERE (ext3 partition 3)

– setup.htm

– ccs_install.sh + CCS dir.

– ti-sdk-am335x-evm-05.03.00.00-Linux-x86-

Install

– beaglebonequickstartguide.pdf

– START_HERE.sh

18

Matrix Application Launcher

2D Accel

Qt Embedded

QWidgetQGLWidget

ARM Benchmarks Pwr/Clk Browser Sys Info2D/3D

BlueZ

GStreamer

FFMPEG

(MPG4, H.264, AAC)

Wifi

WLAN

ARM-MPU Linux SW Stack

OpenGL ES

System on Chip

Target Board

FBDEV

DSS2

V4L2

ALSA

McSPI

USB MMC/SD UART

EthernetTouchscreen

19

RS232

Putty

BeagleBone Development Environment

• CCS supports both Windows and Linux host PCs

• Linux application debug supported via integrated GDB

• Linux kernel debug supported via JTAG debug

LAN

Gdbserver on target linux

Putty

LAN JTAG

CCS

LAN

Gdb on CCS

20

CCSv5 Features & Plugins

» Eclipse based - v3.7

» Runs on the Linux host

» Multi-Core Debug

» Run-Mode Linux debug support » Remote GDB debug

» Debug your Linux application and application processes » Debug your Linux application and application processes

» Stop-Mode Linux Support» Control target using JTAG

» Enables examination of target and current Linux process

» Requires installation of emulator package

» Linux & Embedded Development Eclipse plugins» GNU ARM Toolchain plugin

» Qt Integration plugin

» Remote System Explorer plugin

21

CCSv5 – Remote System Explorer (RSE)

• Target Management plugin

• Configures and manages

remote systems,

connections & services

– Drag-and-drop access to – Drag-and-drop access to

remote file system

– View remote shell and

terminal

– Monitor remote process

table

22

CCSv5 – Debugging Applications• Linux debugging is enabled using

gdbserver

• GDB and gdbserver communicate via a TCP connection

• Requires configuration of GDB on both host and target

• To debug a project, gdbserverwith port number 10000 (defined during configuration) should be initialized

• Regular debugging functions like Breakpoints, Step Over and Step Into can be used to walk through the source code

23

Несколько слов о GDB...• GDB (GNU debugger) может облегчить рутинную отладку приложений на встроенных Linux-

системах.

• Чем полезен GDB: гораздо удобнее и правильней отлаживать программу, чем слепо гадать,

в каком месте происходит ошибка.

• Суть использования GDB состоит в том, чтобы запускать на целевой платформе не

полноценный GDB, а GDBserver. GDBserver позволяет запускать отладчик на другой машине,

отличной от той, где работает приложение. Преимущество использования GDBserver

состоит в том, что он использует лишь малую часть ресурсов, так как реализует лишь состоит в том, что он использует лишь малую часть ресурсов, так как реализует лишь

низкоуровневые функции отладчика, а именно установку точек останова (breakpoints),

доступ к регистрам процессора и чтение/запись памяти. GDBserver берет управление

приложением на себя и ожидает инструкций от удаленного GDB (работающего на машине

разработчика).

• Обычно процессор на рабочей станции разработчика (к примеру, x86) отличается от

процессора на целевой платформе (ARM, etc).

24Ссылка на источник:http://rus-linux.net/lib.php?name=/MyLDP/algol/gdb-remote.html

» Direct access to Factory Applications teams

» Quality answers from TI, Partners & Community Participants

» Search First -

E2E Forums - e2e.ti.com

» Search First -Customers may find answers to their questions without asking

25

TI Embedded Processors.Wiki.ti.com

26


Recommended