42
Bridging the Gap From Cortex -M to Cortex -A with StarterWare

Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Bridging the Gap From Cortex™-M to Cortex™-A with StarterWare

Page 2: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

2

Presentation Outline

• Introducing TI Embedded Processing Porfolio Sitara Family overview

AM335x Cortex™-A8 low cost MPU

Development tools

• Introducing the BeagleBone

Platform overview

Expansion options „Capes‟

• From StellarisWare to StarterWare

History

StarterWare Deep Dive

Examples and Development Tools

Flashing and Running Program

• Demonstration

• Performance Optimisations with VFP

Page 3: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

3

TI ARM® investment and innovation

* TI licensed in July 2003, but publicly announced Oct 2005.

Newest DaVinci

solution for

flexible,

HD video

Two ARM Cortex-R4

cores for

automotive

TI Licenses

first ARM core

1995

1st single-chip digital baseband -

DSP/ARM multi-core

1st multi-core applications processor,

ARM9-based

2002 2005

*TI first licensee for ARM Cortex™- A8

Introduced DaVinci™ processors for

digital video – ARM9™-based SoCs

2006

1st ARM Cortex-A8

based silicon

2007

TI Licenses

ARM Cortex-A9

2009

TI Acquires Luminary

Micro

TI announces

31 new Stellaris®

and ARM-based

MPUs

Stellaris® Sandstorm

Class

Stellaris® Fury Class

2008

Stellaris® DustDevil

Class

Stellaris® Tempest

Class

Stellaris MCU Fixed/

Floating- Point ARM9 SoC

1993

TMS570F MCU

1st R4F-based floating-point, dual-core auto

MCU

DaVinci™

OMAP™

OMAP 3

OMAP™

OMAP1510

DaVinci™ TMS570 MCU

OMAP™

OMAP-L138

2010 2011

Lead Licensee

on Cortex-

M4

Introduce ARM Cortex-A9

based silicon

OMAP™

OMAP 4

Introduce ARM

Cortex-A15

based silicon

OMAP™

OMAP 5

TI Licenses Cortex-A15

TI has shipped over 6 billion ARM-based products and continues to invest in a large portfolio of scalable platforms from $1 to >1GHz

Page 4: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

A TI embedded processor to meet your needs L

ow

er

Po

we

r C

on

su

mp

tio

n*

Higher Performance

Digital Signal Processors (DSPs)

ARM®-based MCUs and MPUs

Microcontrollers (MCUs) C6000™ High-perf DSPs

• Up to 25 MHz • Value Line as low as 25¢

MSP430™ Ultra Low Power MCUs

• 300 MHz – 1.5 GHz • C6000 Floating Point DSPs • OMAPL1x DSP + ARM9 processors

C6000™ High-perf Multicore DSPs

• 1 to 8 CPU Versions • Fixed & Floating Pt DSP • Up to 320 GMACS/ 160 GFLOPS

Sitara™ ARM® MPUs

• ARM9 and Cortex-A8™ MPUs • ARM9 under $5 • Cortex-A8 to 1.5GHz

• Industry’s most complete embedded

processor portfolio

• One Software Development Environment

across the entire portfolio

• Software and tools to make development

fast, easy and pain-free

Code Composer Studio™ Integrated Development Environment

C2000™ Real-time MCUs

• 40 MHz - 300 MHz

C5000™ Ultra- Low Power DSPs

• Up to 300 MHz • Start at $1.95

• ARM Cortex™ M3 MCUs • Up to 80 MHz

Stellaris® ARM®

MCUs

* Active power based on performance range for the product family

~180 devices

>70 devices

~300 devices

Page 5: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

5

of the Gap WARE Be bridging the Gap Starter There are pearls on either side

• ARM Cortex™ M3 MCUs • Up to 80 MHz

Stellaris® ARM®

MCUs

~180 devices

Sitara™ ARM® MPUs

• ARM9 and Cortex-A8™ MPUs • ARM9 under $5 • Cortex-A8 to 1.5GHz

>70 devices

Migrating from MCU to MPU

Page 6: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

7

Sitara™ offers

Strength of Software

• Free and easy access to software

• Low cost development tools with reference

code

• Application specific and advanced

development kits

• Aggressive Linux community, Windows

Embedded CE and RTOS ecosystem of

development partners

• Driver software available for most high-level

operating systems

Performance

• Up to 450MHz ARM9™ to 1.5GHz Cortex™-

A8 devices

• Industry‟s first widely available Cortex-A8

devices - 2 DMIPS per MHz

• Graphics acceleration up to 27M polygons/s

performance for advanced user interface

• High speed DDR2 and DDR3 memory

performance

Connectivity

• 10/100/1000 Ethernet

• CAN 2.0 and High speed USB interface

• Multiple serial port options per device

• Lowest cost processor with SATA interface

• Flexible LCD controller for up 720p displays

moving to 1080p in future devices

• Industrial peripheral support

Scalability

• Largest software compatible ARM MCU &

Embedded MPU portfolio

• ARM only to ARM + accelerator functionality

while reusing both SW and HW designs

• Leverage TI‟s extensive portfolio of

embedded ARM devices to maximize your

product‟s changing needs

• Fully pin-for-pin and software compatible

options to scale from ARM only to ARM +

DSP

Page 7: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

8

Sitara™ ARM9™ & Cortex™-A8 target markets Industrial

Automation

Long Product Lifecycles with Focus on Reliability and Quality

• Industrial control and

connectivity interfaces

• Low heat dissipation core (no

fan or heat sink)

• Extended temp range

• 3D graphics accelerator for

building advanced GUI

functions

• Real-time Linux kernel

supported

Broad Market Data Terminals

• Flexible industrial connectivity

• 3D graphics accelerator for

building advanced GUI

functions

• High performance core for fast

response times

• Power efficient (down to 7mW

standby, 182mW active)

• Broad embedded processing

portfolio to allow for

optimization on performance,

power and cost

• Flexible integrated peripherals

and connectivity options

• Large ARM® ecosystem and

third-party network simplifies

application development

Page 8: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

9

Page 9: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

10

Page 10: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

TI Confidential – NDA Restrictions

11

AM18x • 375/450MHz

• 10/100 Enet, SATA

• SDRAM / LPDDR1 /DDR2

• 10ku $5 - $8

AM37x • 800MHz/1GHz

• LPDDR1

• 10ku $12 - $24

AM35x • 600MHz

• 10/100 Enet, CAN

• LPDDR1 / DDR2

• 10ku $12 - $17

AM335x • Up to 720 MHz

• 1G-Enet switch, TSC/ADC

• LPDDR1/DDR2/DDR3

• 10ku $8 - $20

Production Development Sampling

AM4x Next • More Interface Options

• Increased Security Features

Concept

I

C

S

S

3

D

3

D Cortex-A8

Cortex-A8

Cortex-A8

ARM9

Cortex-A9

AM2x Next • More Interface Options

• Increased Security Features

• Lower Power

Cortex-A7

AM389x • Up to 1.5 GHz

• 2x GbE, HDMI,

• 2x PCIe, 2x SATA

• 2xDDR2 / DDR3

• 10ku $29 - $31

AM387x • Up to 1.0 GHz

• GbE, HDMI, PCIe, SATA

• 2xLPDDR1 / DDR2/ DDR3

• 10ku $22 - $32 3

D

Cortex-A8 Cortex-A8

Sitara ARM® Processor Roadmap

3

D

I

C

S

S

3

D

AM2x Next • More Interface Options

• Increased Security Features

Dual Cortex-A7

Perf

orm

ance

+ In

tegr

atio

n

Available Now | 2012 | 2013 | 2014

= PRU Industrial Communication Sub System

= 3D Graphics Accelerator

= Recently Announced

3D

ICSS

Page 11: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

12

Migraine free development with TI

Sales and Logistics Business model

Supply chain logistics

Sales channels

Market presence and

reputation

Support Product scalability

Ease of use

Documentation/Sales Collateral

Demos

Developer Network and

community Ecosystem

Software Operating system

Industry standard frameworks

Graphics SDK

Applications

Development community

Silicon Analog – Power/Signal Chain

Roadmap

Packaging

Quality / Lifecycle

commitments

Tools Code Composer Studio (TI IDE)

eXpressDSP™ Data Visualization tool

OS specific tools (Code Sorcery for Linux; Visual Studio for

MS Windows Embedded CE, etc)

Developer Network tools for enhanced debugging

Hardware Platforms System collateral

Evaluation hardware

System modules

Low cost boards

Starter kits

Page 12: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

13

Page 13: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Introducing the BeagleBone

• >700-MHz superscalar ARM

Cortex™-A8

• 256-MB DDR2 RAM

• 1-port USB 2.0 host

• Integrated 10/100 Ethernet

• microSD slot and 2-GB microSD

card with validation and

demonstration image from the

Angstrom Distribution

• USB 2.0 flexible device port with

ability to supply power

• On-board USB-to-serial/JTAG over

shared USB device port

• 3.3-V 2 46-pin peripheral with

multiplexed LCD signals and

battery-control expansion headers

• Board size: 3.4” 2.1”

Page 14: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

• BeagleBone Breadboard - A prototyping cape

• BeagleBone DVI-D Cape - A DVI-D cape

• BeagleBone LCD3 Cape - A 3.5" touchscreen LCD cape

• BeagleBone Breakout Cape - A troubleshooting cape

• BeagleBone LCD7 Cape - A 7" touchscreen LCD cape

Expanding BeagleBones Capabilities

Page 15: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

16

Traditional OS with Cortex-A8 / ARM9

• Large memory footprint

• Complex architecture

• Steep learning curve when moving up from MCU

Page 16: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Software Development Options

TI Confidential - NDA Restrictions

Platform From Suitability Benefits / Focus

SYS/BIOS Industrial SDK TI Bare-metal developers

familiar with 32-Bit MCU,

lightweight Real Time OS.

Industrial SDK, Drivers,

Protocols

(Profibus,EtherCAT

etc). CCS 5 Tools

Sitara Starterware TI Bare-metal developers

familiar with 16 / 32-Bit

MCU environments

A „No OS‟ solution with

peripheral drivers and

libraries. CCS 5 Tools

Sitara Linux 3.2 SDK or

(Angstrom)

TI High level OS developers

– Not Real-time!

Open Source. Good for

HMI, Comms, Media.

GPL a consideration

Android (ICS) TI High level OS developers

– Not Real-time!

Open Source-but not

Free! Good tools

Windows CE (Compact 7) TI /

Adeneo

High level OS developers

– a religious choice! Hard

Real-time kernel.

Lots of software support

but not free. No GPL

issues.

QNX Momentics 6.5.0

(Foundry 27)

QNX POSIX API . A 3rd Party

Commercial RTOS well

suited to multicore

Safety critical certified –

Medical & Military. No

GPL issues.

Page 17: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

• StellarisWare software is an extensive suite of software designed to simplify and speed development

of Stellaris-based microcontroller applications.

• Features:

• StellarisWare software includes source-code

and royalty-free libraries

• Keep all your programming in C/C++,

including ISR‟s and startup code

• The key functional areas are:

• Stellaris Peripheral Driver Library

• Stellaris Graphics Library

• Stellaris USB Library

• Stellaris IQmath Library

• Stellaris IEC 60730 Library

• Includes reference application software

• Stellaris In-System Programming support

• StellarisWare® Software is supported

by all the most popular tools vendors

• Robust: StellarisWare is preprogrammed

into ROM on most Stellaris MCUs

• Part #: SW-LM3S

• Availability: NOW

• Price: Free

StellarisWare® - The Starting Point

Development – Stellaris® Cortex-M

TI Confidential - NDA Restrictions

18

Page 18: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

19

StarterWare – Evolved From StellarisWare

• Free bare-bones software suite for ARM9, Cortex-A8 and C6000 DSP

Also compatible with some RTOS

• Evolved from StellarisWare with compatible library APIs, enabling streamlined

migration from Stellaris MCU to TI MPU

• Full access to and configurability of the following features

Peripheral driver library

Graphics library

Lightweight USB and network stacks

Code examples

Application Notes

• Available for Windows and Linux with tool options

Code Composer Studio

Keil

IAR

GCC

• Supported available through wikis and Tis e2e community

Page 19: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Components

System / Device Abstraction Layer

Peripheral Register Layer

Peripheral Hardware

Peripheral Usage

Examples Demo Application

Uses multiple

peripherals

Graphics Library EMAC, USB Stacks

StarterWare Libraries

StarterWare Package

• Simple and

intuitive API

• Interrupt +

EDMA

capability

• Peripheral

drivers

• Interrupt

controller

• Pinmux

Show

individual

driver usage

• Consistent

with

peripheral

specs

• Similar to

RCSL

DSP Core ARM Core

Boot / UBL Helper

Configuration Utility

Configures PLL,

EMIF and loads

application

PC application that

generates

configuration code

Page 20: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

• driver.lib – device abstraction layer APIs for supported peripherals

• platform.lib – board-specific code for configuring peripherals

• system.lib – ARM/DSP core specifics like interrupt controller code

• grlib.lib – graphics library supporting primitives (lines, circles) and UI widgets

• usblib.lib – implements USB stack

• utils.lib – miscellaneous functionality for StarterWare applications

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

device host

hid msc

uartStdio delay

tick cmdline

cdc bulk

Page 21: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

Driver library contents: – Peripheral configuration, access, and control

• peripheralInit(…)

• peripheralEnable(…) and peripheralDisable()

• peripheralIo(…)

– System control • peripheralReset(…)

• peripheralClocking(…)

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 22: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

Platform library contents: – Pinmux configuration API

• Supports EVM (including all example applications)

• Peripheral-specific APIs (ex. I2CPinMuxSetup(…))

• Complete GPIO muxing not supported

• Locks/unlocks the write-protection of the SYSCFG module (i.e. kick registers)

– Signal routing on EVM • Some pins need to be routed differently based on which peripheral is using them

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 23: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

System library contents: – Cache configuration

– ARM and DSP interrupt controller • Enable/disable interrupts

• Specify user callback functions

– Exception Handler definitions • Define exception interrupt vector table

– Initialization & Startup Code • IVT initialization

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 24: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

Graphics library contents:

– Graphics primitives

• Draw individual items such as lines, circles

• Render text

– UI widgets

• Combines one or more graphics primitives to create a UI element

• Application-defined responses to user interaction

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 25: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

USB library contents: – Lightweight USB stack

– Device mode support for the following classes: • CDC

• HID

• MSC (with EDMA support)

• Generic bulk

– Host mode support for the following classes: • HID

• MSC

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 26: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

Utils library contents: – UART-based STDIO replacement (puts, gets, etc.)

– Delay functionality (specified as real time, not just cycles)

– Periodic “tick” with user-specified callback function

– Command line argument handling

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 27: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

StarterWare Libraries – Deep Dive

Not Shown:

– lwIP • Third party lightweight networking stack

• Supports DHCP, TCP/IP, UDP, and more

– FatFs • Third part lightweight filesystem (FAT)

• Used to interface with external memory devices (ex. USB flash drive)

– NAND library

– MMC/SD library

drivers.lib

psc

Peripheral Hardware

Application

system.lib

uart

gpio emac

pinmux cpu cache

interrupt exception

grlib.lib

fonts canvas

widget checkbox

i2c mcasp

raster …

syscfg

init startup image circle

slider …

platform_X.lib usblib.lib utils.lib

uartStdio delay

tick cmdline

device host

hid msc

cdc bulk

Page 28: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

30

StarterWare – Example Applications

• Many example applications including

• ADC, Timers, PWM, GPIO

• Ethernet

• Interrupts, Cache and MMU

• USB

• Device: Mouse, MSC, CDC

• Host: Mouse, MSC

Page 29: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

JO

HN

ST

EV

EN

SO

N

TI Information – Selective Disclosure

StarterWare – Development Tools

• Code Composer Studio (CCS)

• Integrated development environment for TI embedded processors

– Includes debugger, compiler, editor, simulator, OS…

– The IDE is built on the Eclipse open source software framework

– Extended by TI to support device capabilities

• CCSv5 is based on “off the shelf” Eclipse

– Going forward CCS will use unmodified versions of Eclipse

• TI contributes changes directly to the open source community

– Drop in Eclipse plug-ins from other vendors or take TI tools and drop them into an

existing Eclipse environment

– Users can take advantage of all the latest improvements in Eclipse

• Integrate additional tools

– OS application development tools (Linux, Android…)

– Code analysis, source control…

• Low cost!

Page 30: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

32

StarterWare - Running examples within CCS

StarterWare includes GEL scripts to perform bootloader initialisations and

application loading within your IDE using a JTAG emulator

Page 31: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Application Code &

Data Sections

StarterWare - Bootloader Utility

• Acts as bridge between

RBL and application

• Applies same EMIF, PLL

settings as GEL file

• Use host PC tools to

prepare boot image:

– AISgen

– out2rprc

– Serial flash tool (SFH)

• Boot your application

quickly from SPI Flash

Bootloader AIS

SPI Flash Memory

Application Binary

Device Memory

Application Code

& Data Sections

RBL loads and

executes

bootloader

Bootloader

applies PLL ,

EMIF settings

Bootloader

copies code &

data to device

memory

Bootloader jumps to

application entrypoint

Page 32: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Beagebone Flashing And Booting – SD Card • Simple two step process

– Prepare SD Card

• The SD card needs to be prepared, by FAT formatting it as follows.

• Choose a SD card and a USB based or similar SD card reader/writer. Plug it to a

Windows host system.

• The converted bootloader binary has to be renamed to "MLO" and the application

binary has to be renamed to "app".

• Run the TI_SDCard_boot_utility_v1_0.exe executable (which is in release

package in the following directory - tools/sd_format/).

– Select the SD Card drive name, location of bootloader file (MLO) and

application image (app) path.

• Safely eject/remove the card from the host, unplug the card reader, remove the

SD card. The SD card is ready for use on the target.

– Booting the BeagleBone

• Insert the SD card into the SD slot

• Connect to the Virtual serial Port on PC (115200, 8, N, 1)

• On power on, the MLO is first detected and copied and executed from the OCMC0

RAM. The MLO then copies the application image (app) from the card to the DDR

and passes the control to the application. On Successful boot, following messages

appear on the serial console.

Page 33: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

35

Beaglebone Boot with StarterWare

ROM

Bootloader

(RBL)

On-chip RAM

Bootloader

StarterWare

Application

On Power-up execution begins from on-chip ROM which:

1. Checks the boot setting (configured by DIP switches)

2. Loads the secondary bootloader from the respective

medium to on-chip RAM

3. Hands over control to the on-chip RAM

The secondary bootloader then:

1. Initialises PLLs

2. Enables Peripheral Clocks

3. Initialises DDR

4. Sets the operating frequency (up to 720 MHz)

5. Loads the application from respective medium to off-

chip DDR

6. Hands over control to DDR

The StarterWare Application code is then executed from DDR

Page 34: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

36

DEMONSTRATION

Page 35: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

37

StarterWare - Demonstration

• Import a CCS Project from

the StarterWare Release

package

• Build the CCS Project

• Create the Target

Configuration

• Launch and Debug project

Page 36: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Performance optimisation (1) –

Enabling the ARM VFP with Starterware • The AM335x Cortex A8 family feature the ARM VFPv3 Vector Floating Point

co-processor:

– Provides a significant performance boost for floating point arithmetic heavy

applications

– This is not enabled by default!

• Starterware build options, libraries and initialisation code require some simple

changes

– Initialise and enable the VFP and NEON sub-system in init.asm

(..\AM335X_StarterWare_02_00_00_06\system_config\armv7a\cgt\init.asm)

– Insert the following code before Clear_Bss_Section:

; Initialize NEON and VFP MRC p15, #0, r3, c1, c0, #2 ; Read CPACR ORR r3, r3, #0x00F00000 ; Enable access to CP10 and CP11 MCR p15, #0, r3, c1, c0, #2 ; Write CPACR ; Enable NEON and VFP MOV r0, #0x40000000 VMSR FPEXC, r0 VMRS R1, FPSID

Page 37: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Performance optimisation (2) –

Rebuild Libraries with ARM VFP Support • To make use of the VFP the support libraries and your application code all need

to be re-built with the ARMv3 options (check the <project>.cmd build file to

see the library dependencies ) :

– Platform, Drivers, System, Utils

– In the project settings select Runtime support library rtsv7A8_A_le_v3_eabi.lib

and float_support option VFPv3 then Clean and Build all dependent projects

Page 38: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Performance optimisation (2) –

Starterware Benchmark Results

Without VFP Enabled: /*************

CPU @720 MHz , -O2, -mf5, VFP disabled (default), debug build,

Starterware ****************/

[CortxA8] Dhrystone 2.1 Integer Benchmark:

[CortxA8] ===========================

[CortxA8] Dhrystone Benchmark, Version 2.1 (Language: C)

[CortxA8]

[CortxA8] Program compiled with 'register' attribute

[CortxA8]

[CortxA8] Execution starts, 500000 runs through Dhrystone

[CortxA8] Execution ends

[CortxA8]

[CortxA8] Microseconds for one run through Dhrystone: 38.0

[CortxA8] Dhrystones per Second: 26315.8

[CortxA8]

[CortxA8] Whetstone Floating Point Benchmark:

[CortxA8] =============================

[CortxA8] Loops: 1000, Iterations: 1, Duration: 37 sec.

[CortxA8] C Converted Double Precision Whetstones: 2.7 MIPS

[CortxA8]

[CortxA8] Pi (float) - Performing 100000000 iterations...

[CortxA8] Pi = 3.141383647919 in 349 secs

[CortxA8]

[CortxA8] Pi (double) - Performing 100000000 iterations...

[CortxA8] Pi = 3.141592644576 in 842 secs

[CortxA8] Terminating

[CortxA8]

With VFP Enabled: /*************

CPU @720 MHz , -O2, -mf5, VFP enabled, debug build, Starterware

****************/

[CortxA8] Dhrystone 2.1 Integer Benchmark:

[CortxA8] ===========================

[CortxA8] Dhrystone Benchmark, Version 2.1 (Language: C)

[CortxA8]

[CortxA8] Program compiled with 'register' attribute

[CortxA8]

[CortxA8] Execution starts, 500000 runs through Dhrystone

[CortxA8] Execution ends

[CortxA8]

[CortxA8] Microseconds for one run through Dhrystone: 38.0

[CortxA8] Dhrystones per Second: 26315.8

[CortxA8]

[CortxA8] Whetstone Floating Point Benchmark:

[CortxA8] =============================

[CortxA8] Loops: 1000, Iterations: 1, Duration: 6 sec.

[CortxA8] C Converted Double Precision Whetstones: 16.7 MIPS

[CortxA8]

[CortxA8] Pi (float) - Performing 100000000 iterations...

[CortxA8] Pi = 3.141383647919 in 9 secs

[CortxA8]

[CortxA8] Pi (double) - Performing 100000000 iterations...

[CortxA8] Pi = 3.141592644576 in 13 secs

[CortxA8] Terminating

[CortxA8]

TI Confidential - NDA Restrictions

Result = Full double precision support in less CPU MIPS, lower power consumption

and MUCH faster floating point code than software emulation !

Page 39: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

41

Appendix – Additional Resources

Page 40: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

Software Resources • Code Composer Studio (Free Evaluation)

– http://processors.wiki.ti.com/index.php/Download_CCS

• SYS/BIOS Industrial SDK

– http://www.ti.com/tool/sysbiossdk-ind-sitara

• Sitara™ AM335x Starterware

– http://processors.wiki.ti.com/index.php/StarterWare

• Linux EZ Software Development Kit (EZSDK) for Sitara™ ARM®

Microprocessors

– http://www.ti.com/tool/LINUXEZSDK-SITARA

• BeagleBone Angstrom Linux Distribution

– http://www.angstrom-distribution.org/demo/beaglebone

• Linux Training Resources (Free Electrons)

– http://free-electrons.com/blog/beagle-labs/

• Nacissus (Angstrom) Online Linux Image Builder

– http://www.angstrom-distribution.org/builder/

Page 41: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

• One-stop shop for software and hardware documentation. Collateral includes examples, documentation

(datasheets, user‟s guides, etc.), and drivers (DriverLib, USB software package) to develop applications

on the MSP430.

• Features:

• Collection of MSP430 design resources

• Sleek & intuitive GUI for browsing content

• Automatic filtering of content using a

unique 2-pane view

• Auto-updates through the web

• Features the new MSP430 Driver Library

• Available as a CCS plug-in or

standalone executable

• Part #: (Part of CCS v5.1)

• Availability: NOW

• Price: Free

43

MSP430Ware Development – MSP430

TI Confidential - NDA Restrictions

Page 42: Bridging the Gap - Hitex · Bridging the Gap From Cortex ™-M to ... fast, easy and pain-free Code Composer Studio™ Integrated Development Environment ... = PRU Industrial Communication

• Within TI‟s Resource Explorer, the MSP430Ware package includes: – Traditional C Code Examples

– Grace Code Examples

– Data Sheets & User‟s Guides

– Errata

• Provides an MSP430 solution that complements StellarisWare & ControlSuite

• Auto-updates latest versions from the web

• Filter content by Device, Development Tool or Software library

MSP430Ware, featuring Driver Library

– Dev kit out of box experience code

– Driver Library APIs

– Driver Library Code Examples

– And more…