19
1 1 Making a smooth software migration from 8051 to ARM Cortex -M3

Smooth migration from 8051 to CM3 - rtcgroup.comrtcgroup.com/arm/2007/presentations/120 - Making a Smooth Software... · 4 XDATA Classic 8051 Memory Layout DATA Classic 8051 has 3

  • Upload
    trandan

  • View
    229

  • Download
    2

Embed Size (px)

Citation preview

111

Making a smooth softwaremigration from 8051 to

ARM Cortex™-M3

222

Agenda8051 DevicesMemory, I/O and peripherals

Place in the modern world

Modern 8051 programmingLimitations and issues

Cortex-M3Solutions to the problems

Keil development toolsSupport for 8051 to Cortex-M3

333

8051 PopularityAvailable for >20 yearsMany engineers worked with it at university

Know what it can do (and what it cannot)

Available from many vendorsWide choice of performance, peripherals and packages

There is an 8051 for you

New applications8051 finds new low-end applications

8051 Reaching its limitsPushed beyond its original architecture

Struggling with modern programming techniques

444

XDATA

Classic 8051 Memory Layout

DATA

Classic 8051 has 3 main memory regionsSource Code uses memory types for variable placementcode – Program memory

data / idata – data and variables

xdata – external data memory

Today Hard to Understand

Physical Memory Limitsbypassed with bankinginefficient

hard to maintain

Recent 8051 Deviceshave on-chip SFR paging

extend memory with banking

Classic 8051 Memory Layout

555

Programming 8051 – The IdealProgrammed in Assembly LanguageHand crafted code for specific 8051 device8051 core differences, peripherals and I/O structure

8051 introduced before high level language popularity

Small application code ~64KB (<1MB)

Optimize all functions and sub routines

Application aimed at one 8051 deviceNot designed to be moved between 8051 devices

666

8051 – In The Modern WorldVery limited support for modern techniquesVery low code reuseDifficult to move code between 8051 devices

Auto code generation not supported (pointers)

RTOS / pre-emptive very difficult (no stack)

Object orientated programming not possible

C programming new to 8051Good tools available (Keil Cx51)

Assembly language skills not common in 21st Century

Legacy application codeDifficult to maintain due to lost knowledge and complexity

Impossible to port new 8051 devicesEasier to move to new modern architecture (Cortex-M3)

777

8051 – Debugging8051 offers few debugging optionsMost devices need to use Monitor programsSuch as Keil Mon-51

JTAG debugging is available on few devicesVery few ICE vendors support 8051 JTAG

Will support be available in 5 years

888

Cortex-M3 debuggingARM Cortex-M3 supports JTAG and moreJTAG - debugging and flash programming

Serial Wire Debug – 2 wire debug and flash programming

Serial Wire Viewer – simple instruction trace capability

TPIU

DWTCM3Core

ITM

ETM

2 pinSWV

S/W Trace

Instr Trace Trigger5 pin

port

Data

Trace

999

Cortex-M3 – The Modern 8051Hardware BenefitsHigher performanceUp to 10x the performance of 8051

Linear address space of 4GBNo pages or complex mapping

More memory efficient~70% saving in Flash/ROM usage

Lower power0.19mW/MHz

STM32 offers 2uA in stand-by

New devices offering variety of communications interfacesCAN, USB, Ethernet, SPI, I2C etc

Available today from Luminary Micro and STMicroelectronics

101010

Cortex-M3 – The Modern 8051Software BenefitsDesigned to be programmed in C“EasyARM” - Aligned with migration from 8-Bit and 16-Bit

Simple vector table associated with hardware interrupts

No AssemblerAll interrupt & exception PUSH & POP in hardware

Startup, Reset, NMI, Fault Handlers all handled in standard C handlers

Thumb-2 delivers optimal performance & code size

Fundamental Pre-emptive RTOS supportStack orientated architecture

Auto code generation and object orientated programming

Advanced debugging supportJTAG, SWD and SWV

111111

Designing with Cortex-M3The definitive guide to the Cortex-M3

121212

Keil Tools for 8051and ARM Cortex-M3

131313

Keil an ARM CompanyLeading supplier of MCU development toolsANSI C/C++ compilers, Debuggers

Device simulation

Middleware components

Extensive Device Database®

>1,200 8/16/32 bit MCUs

Established supportWeb support portal

User group structure

Global distribution network

Huge installed base100K+ users world wide

141414

Target DebugTarget DebugULINK2 USB-JTAG Adapter

with Real-Time Agent

Keil PK518051 Development Kit

Keil PK518051 Development Kit

Keil C Compiler

RTX-Tiny RTOS

Exa

mpl

esan

dTe

mpl

ates

Tools for ARM and 8051T

hird

Par

tyU

tilit

ies

RealView MicrocontrollerDevelopment Kit

RealView MicrocontrollerDevelopment Kit

Exa

mp

les

and

Tem

pla

tes

µVisionDevice Database & IDE

RTX RTOS Kernel

RealView C/C++ Compiler

µVisionDebugger & Analysis Tools

Complete Device Simulation

µVisionDevice Database & IDE

µVisionDebugger & Analysis Tools

Complete Device Simulation

Evaluation BoardsEvaluation BoardsARM7, ARM9 and Cortex-M3

based MCU devices

151515

µVision IDELeading microcontroller Integrated Development

Environment.µVision is the industry leading Integrated Development Environment (IDE)

for microcontroller and standard devices.

Common to ARM and 8051 platformsIncludes target device configuration and Device Database

High speed simulationInstruction Set

On-chip peripherals

Source code editor

Project debugging

Flash programming

161616

Microcontroller Development Kit

Industry leading technologyARM RealView Compiler

Keil µVision IDE / Debugger

Complete device supportARM7, ARM9, Cortex-M3 MCUs

Includes Start-up code & Flash algorithms

Complete device simulation

Board support packages (BSPs)

RTX Real-Time KernelEfficient RTOS Kernel for small systems

Complete software development environment for ARM processor-basedmicrocontrollers. Easy to learn and easy to use!

RealView MicrocontrollerDevelopment Kit

RealView MicrocontrollerDevelopment Kit

Exa

mp

les

and

Tem

pla

tes

µVision Device Database

RTX RTOS Kernel

RealView C/C++ Compiler

µVision Debugger &Analysis Tools

Complete Device Simulation

171717

Hardware Components

Range of evaluation boards and debug hardware.

ULINK2 USB – JTAG AdapterDebug and Flash programming

JTAG and SWD support

Evaluation BoardsARM7, ARM9 & Cortex-M3

NXP, ST & Luminary

181818

Get More Information

Application Notes

Program Examples

Device Database

Support Knowledge

Discussion Forum

Customers use www.keil.com on a daily basis to obtainprogram examples, latest technical information, and support.

191919

Thank You