the advantages of nxp arm based microcontrollers

47
Copyright © 2016 SOMNIUM® Technologies Limited 1 SOMN-MS-0051 Presented at ENOVA Paris 2016 Thu 15th Sept in the NXP IoT Truck Room EUF-DES-T2250 Smaller, faster, lower-cost! Benefits of NXP ARM microcontrollers for embedded developers Dave Edwards CEO/CTO SOMNIUM® Technologies 11/09/2016

Upload: daniel-ohara

Post on 16-Apr-2017

392 views

Category:

Software


9 download

TRANSCRIPT

Page 1: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 1SOMN-MS-0051

Presented at ENOVA Paris 2016Thu 15th Sept in the NXP IoT Truck RoomEUF-DES-T2250

Smaller, faster, lower-cost! Benefits of NXP ARM microcontrollers

for embedded developersDave Edwards

CEO/CTO SOMNIUM® Technologies11/09/2016

Page 2: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 2SOMN-MS-0051

Abstract

Time to market and development cost are driving factors in embedded system design

Yet many developers aren't aware of the benefits in using ARM technology,even in low-end resource constrained designs such as IoT edge nodes.

Page 3: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 3SOMN-MS-0051

Contents

Problems faced by embedded developers An overview of ARM microcontroller hardware

How can using an ARM based device help? ARM microcontroller and system architecture overview NXP ARM microcontroller overview Performance and energy overview

An overview of ARM software An overview of NXP software ecosystem Software tools and choices available Demonstrations of the features available with NXP microcontrollers.

Page 4: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 4SOMN-MS-0051

Problems faced by embedded developers

Page 5: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 5SOMN-MS-0051

Time to market is important

Only 38% of projects are on time 62% of projects are late! Every year its getting worse ...

Page 6: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 6SOMN-MS-0051

Choose your microcontroller wisely

Many chips are similar Ecosystem is important Not all ecosystems are equal ;-)

Page 7: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 7SOMN-MS-0051

Engineering challenges

Debugging is time consuming Better debug tools are needed Vendor supplied information is

vital

Page 8: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 8SOMN-MS-0051

How can using an ARM based device help?

Customer benefits from choice, features, availability and quality ARM's business model amortizes cost of complex design across many customers Semiconductor vendor leverages to build hardware and software ecosystem Tools providers leverage compatibility to support a huge range of devices

Page 9: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 9SOMN-MS-0051

ARM microcontroller overview

Page 10: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 10SOMN-MS-0051

ARM Cortex-M : architecture advantages

Modern instruction set architecture and microarchitecture First V7-M architecture device was Cortex-M3 announced in 2004 25 years younger than the 8051 architecture!

Designed to run high level C/C++ No need for assembly language = lower cost of software development ARM Thumb®-2 technology has dense instruction encoding

Low gate count Lower silicon cost Small form factor packaged parts

Powerful Significantly higher performance than 8-bit/16-bit microcontrollers

Energy Efficient Fast and efficient interrupt handling

KL03 fits in the dimple of a golf ball!● 1.9x1.6mm● 48MHz Cortex M4● 32KBytes ROM, 2K RAM● 75 cents in quantities of 100,000

Page 11: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 11SOMN-MS-0051

ARM Cortex-M : huge range of choices available

Processor performance versus features versus cost 20MHz .. 200MHz+ Simple microcontroller (M0/M0+) thru DSP capable microcontroller (M3/M4) and beyond Single core to multi-core

Memory size versus requirements versus price versus energy required As little as required: 8KBytes ROM/1KBytes RAM As much (?) as required: 2MByte ROM/256KByte RAM and beyond

Wide range of peripherals and interfaces Sensors, USB, Ethernet, BLE Highly integrated with great software enablement

Broadly compatibility instructions and source code Can scale up (or down) your design as required But ... beware of low-level system software differences

Page 12: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 13SOMN-MS-0051

Range of processor cores available

Page 13: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 14SOMN-MS-0051

Instruction set : clean superset from M0 upwards

Page 14: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 16SOMN-MS-0051

Cortex M0 system architecture

Common across all Cortex-M● M0 supports up to

32 interrupt sources● 16 (M0), 15 (M0+) cycle

interrupt latency● Number of priorities

can vary between devices

Program traceDoesn't require high end

debug adaptors

All devices have thisSupports simple/low cost

debug adaptors

Typically: at least 2..4 breakpoints

0..2 watchpoints (can trigger things within PC range)

Page 15: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 17SOMN-MS-0051

Cortex M4 system architecture

Same as Cortex M0 NVIC with:● Up to 240 interrupt sources● 12 cycle interrupt latency● Number of prioritiescan vary between devices

OPTIONALSophisticated trace

and triggersBUT .. requires area, pins

and high end debug adaptor

All devices have thisSupports simple/low cost

debug adaptors

Page 16: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 18SOMN-MS-0051

NXP ARM-based microcontroller overview

Page 17: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 19SOMN-MS-0051

Kinetis family - sensors and analog integration

KV10 is possibly thehighest performance

Cortex M0+ device available

High performanceLarge memory

Sensors and interfaces

Low cost, small memory, small physical size

Page 18: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 20SOMN-MS-0051

LPC family - optimized for power and cost

LPC8xx : ● low power● space efficient● low-pin count● great for 8/16 -bit migration

All are Cortex M4 based● Many single core devices● Some LPC43xx & LPC5xxx

devices are dual core CortexM4 and a Cortex M0+

Page 19: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 21SOMN-MS-0051

Measuring energy consumption

SOMNIUM are members of the EEMBC® Automotive Subcommittee and use their industry standard benchmarks.

We measure energy, measured to the uJ using the high accuracy EEMBC EnergyMonitor™

EEMBC CoreMark™ is used to demonstrate the usable performance of a processor system running typical algorithms including list processing (to stress test data accesses), matrix manipulation (to stress test and mathematical operations, and state machines (to stress test complex control flows).

Page 20: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 23SOMN-MS-0051

Wide range of performance and energy options

Higher performanceLower energyMore expensive

Extreme performanceHigher energyMore expensive

Baseline device● Good performance ● Low energy consumption● Low cost

Page 21: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 25SOMN-MS-0051

ARM software ecosystem overview

Page 22: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 26SOMN-MS-0051

CMSIS

Cortex Microcontroller Software Interface Standard

Some components are supported by silicon vendors Other components are not supported by silicon vendors Available from ARM , and from some software tools vendors Be aware ...

Some implementations of some features are NULL Implementations vary (features, bugs etc.) Are you using the “official” silicon vendor version? There is no standards compliance procedure

Page 23: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 27SOMN-MS-0051

What's in CMSIS?

Used in evaluation boardOpenOCD debug probes.

Segger & PEMicro aresignificantly faster and

more robust

Generally suppliedpre-compiled

No publicly availabletest suite

Some parts are “essential”Some parts are obsoleted by

vendor-specific APIs

Not widely used?

Page 24: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 28SOMN-MS-0051

CMSIS files

Originated by ARM For a given Cortex <X> device (<X> = 0, 3, 4, 7)

core_cm<X>.h global declarations and definitions, function protoypescore_cm<X>.c global definitions (functions and data)

Originated by silicon vendor For a given <device> e.g. MK64F12system_<device>.h device specific definitions (memory mapped registers etc.)system_<device>.c device specific function definitions

(sometimes vector table is supplied as .s file)<device>.h device specific definitions (registers etc.)

Page 25: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 29SOMN-MS-0051

NXP microcontroller software ecosystem overview

Page 26: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 31SOMN-MS-0051

NXP Kinetis: Kinetis SDK v2: CMSIS “and more”

Pre-integrated with industrystandard RTOS

Not like CMSIS:No concept of separate HAL

and driver layers

Minimal implementation(use Kinetis-specific

Peripheral drivers instead)

Page 27: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 32SOMN-MS-0051

Kinetis Expert: web based SDK creator

● Select components and export source code● New tool to configure pins etc.

● Check everything is correctly setup

Page 28: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 33SOMN-MS-0051

Kinetis Design Studio (KDS)- free of charge Eclipse IDE + GNU tools SOMNIUM Technologies worked with Freescale to produce KDS

Windows, Linux & MacOSX hosts Vanilla code generation and debug

Page 29: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 34SOMN-MS-0051

NXP LPC: LPCOpen: CMSIS “and more”

High quality free of charge middlewareDifferent APIs to Kinetis

equivalents

Flexible configurations and mostly “compliant” CMSIS-CORE

Page 30: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 35SOMN-MS-0051

LPCXpresso - Eclipse IDE + GNU tools Free of charge (256KByte codesize limit)

Windows, Linux & MacOSX hosts Vanilla code generation Advanced trace

Page 31: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 36SOMN-MS-0051

NXP software enablement summary

Separate software enablement for Kinetis and LPC devicesBoth Kinetis and LPC have their own historyA few compatibility “bumps” along the way

Kinetis Design Studio and LPCXpresso are similar but different Both have vanilla GNU tools, Eclipse IDE platform Both are free (for initial versions) Different user interface and project formats LPCXpresso has more debug features

3rd party tools are available : SOMNIUM DRTTight integration with NXP enablement

Can import existing Kinetis and LPC projects with no source code changes Compatible with historical Kinetis and LPC enablement And current/future enablement Also supports a wider range of devices

Page 32: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 37SOMN-MS-0051

SOMNIUM® DRT - Professional C/C++ development environment

Save memorysmaller ROM/RAM device, lower cost designs

Save moneyfaster time to market, optimize BOM costs

Increase performancemore features, “do more with less”

Save energyhigher quality design, reduce lifetime costs

Page 33: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 38SOMN-MS-0051

DRT supports the latest C/C++ standards

SOMNIUMDRT

C standardsC: ISO/IEC 9899:2011 (known as C11) yes

C99 yes

GNU99 yes

C90 yes

C89 yes

C++ standardsC++14 yes

C++11 yes

C++03 yes

C++ exception handling yes

“vanilla” GNU products

? no

yes ?

yes no

yes yes

yes yes

? no

yes no

yes yes

no (Newlib only) ?

Page 34: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 39SOMN-MS-0051

Rigorous approach to correctness & quality

To our best knowledge no other tools vendors apply this rigour Tests are applied on-host (simulated) and on-target (real silicon) Tested to destruction ! Flash ROM wears out after ~2 months of our testing 3 axis testing : size and performance and energy

DejaGNU tests: GNU compatibility conformance SolidSands SuperTest: C/C++ standard conformance and functional correctness

Over 136,000 individual tests per Cortex-M variant (~4 hours on-host run time) NULLSTONE for C: optimization test suite

Almost 40,000 individual tests (over 48 hours run time if using one board at a time) EEMBC® Autobench™ and CoreMark™ Over 3,000 examples and demos from our semiconductor partners SOMNIUM proprietary test suite

Well placed for future certification (e.g. ISO26262) Moving forwards not backwards

Full regression testing to ensure each release is better than the last

Page 35: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 40SOMN-MS-0051

SOMNIUM® DRT :The professional C/C++ development environment Advanced Eclipse based IDE

Ease of use enhancements Best in class debug and trace Windows and Linux hosted, MacOSX (coming soon)

Advanced C/C++ code generation Patented resequencing optimizations Smaller, faster, more energy efficient code No source code changes required

Technical support Direct from SOMNIUM's customer engineering team Regular product updates and new features

Page 36: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 41SOMN-MS-0051

SOMNIUM® DRT - GNU compatible with added benefits

Free of charge tools use "vanilla" GNU Commercial tools also use "vanilla" GNU

Software enablement is supplied as GNU compatible source code

SOMNIUM® DRT is the only product which offers GNU compatibility with advanced code generation

Page 37: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 42SOMN-MS-0051

DRT recognizes that memory is the bottleneck

SOMNIUM® DRT optimizes for the whole system

It dominates performance and cost

Page 38: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 43SOMN-MS-0051

Benchmark proven: Smaller, faster, lower energy

EEMBC® CoreMark® built with DRTUp to 29% energy saving

Up to 38% higher performanceUp to 12% ROM savingUp to 21% RAM saving

Page 39: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 44SOMN-MS-0051

Small memory footprint for C execution

Kinetis Cortex M0+ example (KL46Z)

Hardware initialization before main () and “Empty” C programint main (int argc, char *argv[]){ while (1) {}; return 0;}

DRT significantly reduces ROM/ROM footprinta huge impact on usability of small memory low-cost devices

LPC Cortex M0+ example (LPC824)

ROM RAM

KBytes KBytesDRT 0.6 n/a n/a 0.1 n/a n/a

LPCX Nano 1.0 72% 424 0.1 -3% -4

LPCX RedLib 2.6 359% 2112 1.1 691% 968

DRT saving(% and bytes)

DRT saving(% and bytes)

ROM RAM

KBytes KBytesDRT 1.5 n/a n/a 0.1 n/a n/a

KDS3 Nano 2.4 59% 908 0.6 314% 440

KDS3 Newlib 3.9 164% 2504 1.5 1009% 1412CW10.6 Nano 2.5 66% 1004 0.6 317% 444

CW10.6 Newlib 4.5 201% 3064 1.5 1009% 1412CW10.6 EWL 5.0 238% 3632 4.1 2863% 4008

DRT saving(% and bytes)

DRT saving(% and bytes)

Page 40: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 45SOMN-MS-0051

Real world middleware demos

Only DRT can fit into a 128KByte deviceother tools need the more expensive

256KByte varient

Attach V1 Demo @ Os : doesn't fit with KDS3 NanoROM RAM

KBytes DRT saving KBytes DRT savingDRT 123.5 n/a 13.5 n/a

KDS3 Nano 128.4 4% 13.4 0%KDS3 Newlib 137.3 11% 15.4 15%

Attach V2 Demo @ -Os : features cut so KDS3 Nano just fitsROM RAM

KBytes DRT saving KBytes DRT savingDRT 122.0 n/a 14.9 n/a

KDS3 Nano 127.0 3% 14.9 0%

KDS3 Newlib 144.8 17% 17.0 26%

Kinetis “Attach” demo (MKL26Z128)Uses Sensor Fusion & EGUI middleware

ROM RAMKBytes DRT saving KBytes DRT saving

“Out of box” Optimized for speed @ O3DRT 39.7 n/a n/a n/a

KDS3 Nano 47.9 21% 8448 0%CW10.6 Nano 43.2 9% 3617 -2%

Optimized for size @ OsDRT 35.2 n/a n/a n/a

KDS3 Nano 38.1 8% 2952 0%

Kinetis Sensor Fusion Library (FRDM-KL46)Uses Sensor Fusion middleware

DRT significantly reduces ROM usagewhen optimizing for size

and when optimizing for speed

Page 41: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 46SOMN-MS-0051

Unique project importers

Import and automatic conversion from Atmel START (GPDSC format) KDS 2 KDS 3x CodeWarrior for MCUs 10.6 (GNU projects) CodeWarrior for MCUs (non GNU projects) LPCXpresso Atollic TrueSTUDIO (STM32CubeMX)

Coming soon SW4STM32 STM32 CubeMX custom “SOMNIUM DRT” format MBED

Page 42: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 47SOMN-MS-0051

Leading edge debug features

Live viewing of memory/variables – no need to breakpoint!

Page 43: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 48SOMN-MS-0051

Leading edge debug features

MTB trace on Cortex M0+ (auto configured, full debug features)

Page 44: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 49SOMN-MS-0051

Leading edge debug features

Fault diagnosis – extract and decode, navigate source code

Page 45: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 50SOMN-MS-0051

SOMNIUM® DRT Cortex-M IDE

Wide range of host support Windows and Linux, Mac OSX (coming soon)

Wide range of target support

Single User Fixed Perpetual license $2,500 €2,100 Any one user at a time, on a fixed machine One SOMNIUM portal account

Three User Floating Perpetual license $6,000 €5,200 Any three users at a time, on a any machine Three SOMNIUM portal accounts

12 months support and updates included Annual renewal for 20% of purchase price

Page 46: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 51SOMN-MS-0051

Summary

Choosing the right microcontroller and the right tools is criticalMake the right choice and you can save time, money and get the best results!

ARM devices Competitive cost, features and energy Wide range of devices Great choice - cost, performance, energy, features Strong ecosystem support from NXP

SOMNIUM DRT - the professional C/C++ IDE Offers real advantages to developers Save time, money, get best results Only solution to provide GNU compatibility and benefits High quality technical support

Page 47: The Advantages of NXP ARM based microcontrollers

Copyright © 2016 SOMNIUM® Technologies Limited 52SOMN-MS-0051

Please get in touch for more [email protected]

Demos running on Booth F120

Free of charge trials of SOMNIUM DRT are availablehttp://www.somniumtech.com/product-selector