ARM Keil MDK IDE and Middleware for ARM Cortex-M based MCUs

ARM Keil MDK IDE and Middleware for ARM Cortex-M based MCUs Satish K FTD Solutions PTE LTD ARM Tech Forum 2016 – Singapore August 30th 2016 © ARM 201...
29 downloads 0 Views 3MB Size
ARM Keil MDK IDE and Middleware for ARM Cortex-M based MCUs Satish K FTD Solutions PTE LTD

ARM Tech Forum 2016 – Singapore August 30th 2016 © ARM 2016

Keil MDK Version 5 Development System

Software Packs

MDK Tools

July 2016

2

MDK-Core

ARM C/C++ Compiler

DS-MDK

µ Vision IDE

ARM Compiler 5

DS-5 IDE

with Pack Management

with Qualification Kit

with Pack Management

µ Vision Debugger

ARM Compiler 6

DS-5 Debugger

with Streaming Trace

LLVM Technology

with Streamline

Device

CMSIS

Startup

CMSIS-Core

Middleware IPv4 Network

IPv6 Network

mbed TLS SSL/TLS Encryption

Device HAL

CMSIS-DSP

USB Device

USB Host mbed Client

CMSIS Drivers

© ARM 2016

CMSIS-RTOS

File System

Graphics

IoT Connector

MDK Editions Professional

Plus

Cortex-M

Lite

 

 

 

 32 KB

 





32 KB

  

  



  

  

 





$$$

$$

$

free

µVision IDE with Editor, Pack Installer Debugger

ARM Compiler C/C++ Compilation Tools Extended Maintenance and Qualification Kit

ARM Processor Support ARM Cortex-M ARM SecurCore (SC000, SC300) ARM7, ARM9, ARM Cortex-R4

RTOS and Middleware CMSIS-RTOS RTX with full source code Middleware (IPv4 Network, USB Device, File System, Graphics) Middleware (IPv6 Network, USB Host , IoT Connectivity)

Pricing 3

© ARM 2016

Debug

DS-MDK for Cortex-A/M Hybrid Devices

OS awareness

Analyze

Optimize

Multicore Support

i.MX 7Solo 4

© ARM 2016

keil.com/mdk5/ds-mdk

ARM C/C++ Compiler

5

© ARM 2016

ARM Compiler v5     

6

Reference compiler for the ARM Architecture Co-developed with the ARM Processor cores Supplied with MicroLib C library for smallest code size Extended Support branch available Support for safety critical projects

© ARM 2016

ARM Compiler Qualification Kit Included in Keil MDK Professional Edition 

Safety Manual 



Defect Report 



Tests conformance to the ISO c90 and c99 C language standards and the ANSI/ISO C++ standard

Software Development Process Document 

7

Listing of all known defects that cause run-time failures and any known workarounds

Perennial Test Report 



Usage information relevant to safety critical software developers  Definition of the safety function  Behaviour under erroneous conditions  Error detection facilities

Description of the ISO 9001:2008 compliant software development process

© ARM 2016

Commitment to Functional Safety IP • Safety Manual • Qualification Results • Development Interface Agreement

Compiler • Qualification Kit • TÜ V Certification • Extended Maintenance

Testing

Third Party

• Streaming Trace • MISRA checking • Full MC/DC Code • Device Selftest Coverage • Policy-driven • Execution Profiler Development

Solutions for the complete development process 8

© ARM 2016

ARM Compiler 6 

ARM Compiler 6 is the next generation   

9

Based on open source LLVM compiler framework Optimizations for ARM Cortex-M Performance improvements



Support for C++11, C++14, C14 language features



Preview for ARMv6-M and ARMv7-M architectures



Default compiler for ARMv8-M architecture

© ARM 2016

Cortex Microcontroller Software Interface Standard (CMSIS)

10

© ARM 2016

CMSIS Version 4 Application Code Middleware

Code Templates

Third Party Software Pack

CMSIS Software Pack

CMSIS-DSP

CMSIS-RTOS

CMSIS-Driver

DSP Library

API

API

Real Time Kernel 3rd

Code Templates

Debugger

Device HAL

Party

Silicon Vendor

CMSIS-CORE Core Access Functions, SIMD Intrinsics for Cortex -M4, Peripheral & Interrupt Definitions

Cortex-M CPU Microcontroller

11

© ARM 2016

SysTick RTOS Kernel Timer

NVIC

Debug

Nested Vectored Interrupt Controller

Trace

+

CMSISSVD Other Peripherals

CMSIS-DAP

CoreSight

CMSIS-Driver 2.0 





API describing peripheral driver interfaces for middleware stacks and user applications Generic and independent of a specific RTOS Covers a wide range of use cases for the supported peripheral types

Software Packs Microcontroller

Device

Middleware Control Structs

Startup/System USB Device Driver

USB

USB Controller

Rx1/Tx1

USART

USART Driver

USART1

Ethernet

Ethernet PHY

Ethernet PHY

ETH_PHY0

Ethernet MAC

Ethernet MAC

ETH_MAC0

SPI1

USBD0

SPI #1

SPI2

SPI #2

SDIO0

SDIO

I/O

Memory Controller

USB

USB Controller

© ARM 2016

TCP/IP Networking

SPI Driver

SPI1 SPI2

Graphics

MCI Driver

MCI0

File System

NAND Flash Driver

NAND0

USB Host Driver

USBH0

RTE_Device.h 12

USB Device

Configuration File

USB Host

Web Portal for Software Packs

13

© ARM 2016

Commitment to Standardization Higher Software Productivity

Faster Device Support Device Family Pack

CMSIS-Pack

Application Framework

 

14

Device Parameters

Evaluation Board

Debug Awareness

Software Driver

CMSIS-DSP

CMSIS-RTOS

CMSIS-SVD

CMSIS-CORE

CMSIS-Driver

CMSIS-DAP

Flash Programming

Documentation

Cortex® -M CPU

Peripherals

CoreSight™

Web Portals

Development Tools

Removes unnecessary differentiation But allows relevant product differentiation © ARM 2016

DS5, Eclipse, MDK, IAR and others

Faster Device Support with CMSIS-Pack Traditional Device Support Device Vendor (SiP)

Tool Vendor A

Customers

• Create CMSIS Files

• Integration into tool chain Vendor B •Tool Verification

• Use Published Devices

• Integration into tool chain Tool Vendor C • Verification • Integration into Tool Chain • Verification

Verification failed

Device Support using CMSIS-Pack

15

Device Vendor (SiP)

Development Tools

• • • •

• Automatic Integration • Customers can use right away • Optional Distribution to Early Customers only

Create CMSIS Files Create Software Pack In-house Verification Flexible Publishing

© ARM 2016

  

Early verification during chip design phase  better overall quality One Pack for multiple tool chains Flexible distribution to early/general availability customers  faster development start

RTOS & Middleware

16

© ARM 2016

CMSIS-RTOS RTX Real-Time OS      

17

Source included in all MDK editions Supports cooperative, round-robin and pre-emptive scheduling Low interrupt latency, zero latency for Cortex-M3/M4 Unlimited number of tasks Memory footprint < 5 KB Kernel-aware debug in MDK

© ARM 2016

Market Leading RTOS

Source: 2015 UBM Electronics Embedded Market Study 18

© ARM 2016

CMSIS-RTOS RTX Benefits 

Commercial level RTOS at no additional cost 



Fully integrated into µVision IDE and Debugger 



Choose between pre-emptive, round robin, or co-operative

Developed specifically for embedded systems 

19

RTX kernel-aware tools enable easy configuration and debug

Flexible scheduling 



Royalty-free with source code included in MDK

Fast operation, with memory footprint as small as 5 KB

© ARM 2016

MDK Middleware 

Enable users to develop projects faster  



Low risk solution  





20

Applications easily developed within µVision IDE Numerous examples and templates provided Single vendor for development tools and middleware Optimized for Cortex-M based devices

Relies on CMSIS-Driver 2.0 and CMSIS-RTOS Part of MDK-Professional or MDK-Plus

© ARM 2016

Middleware IPv4 Network

IPv6 Network

USB Device

USB Host

mbed TLS SSL/TLS Encryption

mbed Client File System

Graphics

IoT Connector

Middleware: Network



21

© ARM 2016

Service

Network Component Compact Web Server SNMP Agent

Full Web Server Using File System DNS Client

SNTP Client

FTP Server

TFTP Server

Telnet Server

FTP Client

TFTP Client

SMTP Client

Socket



Add IPv4/IPv6 TCP/IP network connectivity via Ethernet or Serial Extensive range of service applications Specifically designed for devices with small memory footprint

BSD

TCP

UDP

Interface



Ethernet

PPP (Serial)

SLIP (Serial)

CORE with IPv4/IPv6 DualStack

Middleware: USB Host



USB Host component available in MDK-Professional only

  

22

USB Host



HID CDC Connect common USB Human Interface Device Communications Device devices easily MSC Custom Mass Storage Class Custom Device Class Support for various popular microcontroller host controllers High performance and small footprint USB 1.1 Low Speed (1.5 Mbit/s) and Full Speed (12 Mbit/s) Supports USB Flash drives and card storage devices



© ARM 2016

USB Host Core

Middleware: USB Device



USB Device component available in MDK-Professional and MDK-Plus



23

USB Device



HID CDC Standard USB Device Human Interface Device Communications Device classes supported MSC Custom Mass Storage Class Custom Device Class Plug’N’Play: No need to develop a driver for Windows or Linux hosts USB 1.1 Low Speed (1.5 Mbit/s) and Full Speed (12 Mbit/s)



© ARM 2016

USB Device Core ADC Audio Device Class

Middleware: File System



File System component available in MDK-Professional and MDK-Plus

 

24

Drive



File System Component Enable applications to work with locally stored data USB MSC SD/MMC Mass Storage Class Memory Card Storage devices: ROM, RAM, RAM NOR Flash NAND Flash Flash, and SD/MMC/SDHC FAT32 file system supported Simultaneous access to multiple storage devices



© ARM 2016

File System Core

Middleware: Graphic



25

© ARM 2016

Core

Graphics Component Widgets

Fonts

Dialogs

Bitmap Support

Window Manager

Antialiasing

LCD Configuration

GUI Configuration

Input



Add a graphical user interface (GUI) to an application quickly Compatible with hundreds of display controllers Touch-screen support for many TFT LCDs

Touchscreen

Joystick

Display



Interface Template

Preconfigured Interfaces

Demo

VNC Server

Middleware: Graphic    



26

Compatible with hundreds of display controllers Includes binary libraries and display drivers Includes rapid GUI design tools and utilities Sources available from Segger Graphic component available in MDK-Professional and MDK-Plus

© ARM 2016

mbed TLS and mbed Client mbed Client IoT connectivity

mbed TLS Cryptography library    

TLSv1.2, SSLv3 X.509 certificate and key handling Random number generation Helper tools for certificates



 

CoAP implementation Compatible with mbed Device Connector Service LWM2M compliance

Fully integrated and supported mbed components

27

© ARM 2016

HTTPS support

28



MDK Middleware HTTP server now supports encryption with mbed TLS



Documentation explains how to add mbed TLS to existing projects



More crypto protocols are work in progress (FTPS, SMTPS)

© ARM 2016

µVision IDE & Debugger

29

© ARM 2016

µVision IDE      

30

Project Management Source Code Editing Program Debugging Trace Viewing Well-known environment Optimized for MCU development

© ARM 2016

Device Support 

Support for more than 3200 devices using Device Family Packs   

 



31

System and startup code, device header files SVD files Flash algorithms

Development board information Example projects User code templates

© ARM 2016

µVision Ease of Use Software Configuration  Configuration Wizard configures software parameters

32

© ARM 2016

Examples and Templates  Fast out-of-box experience  Can be used in actual project  BSPs for numerous boards

Run-time Environment Configuration

33

© ARM 2016

µVision Source Code Editor

The Functions window gives fast access to functions for each C/C++ source code module.

Dynamic Syntax Checking shows syntax violations and reduces edit-compile-correction cycles.

While typing code, the editor shows Function Parameters and the Code Completion list.

The Error List window summarizes all potential syntax errors and warnings in the current module. 34

© ARM 2016

Kernel-Aware Debugging 

35

System and Thread Viewer together with Event Viewer helps to track the progress of the program

© ARM 2016

Component Viewer (Preview)

36



XML-based description of software components like networking library, USB stack



Provides human-readable information about static memory variables, structures and objects



Improves debugging of middleware components

© ARM 2016

Component Viewer Description Files

37



Component descriptions are either shipped in Packs or created locally



Application Note 283 explains how to create a description

© ARM 2016

Logic Analyzer 

Allows signals to be monitored graphically 



Accurate timing  



Easy, fast analysis of signal timing with access to source code View delta changes from cursor to current location

Code analysis 

39

Monitor variables in the application

View instruction that caused variable change

© ARM 2016

Code Coverage 

Complete software validation requires code coverage 



Product liability and industry standards (IEC61508) demand for testing according to “State of Science and Technology” methodologies

ETM provides complete instruction stream 





Non-intrusive - use final, optimized code at full speed

 



40

© ARM 2016

Feedback provided directly in the debugger Source & disassembly view Color-coded details for individual instructions Summary analysis by function or module

Log File Support

Performance Analyzer 

Instruction Trace provides timing information 



41

Identify where most time is spent in your application Isolate problems by finding which C statements take longer than expected to execute

© ARM 2016

Trace Data 

Execution history of all executed instructions 



Instruction Trace is useful to analyse sporadic problems  

42

Trace Data window displays: Timing and assembly code synchronized to the C source code

Data corruption by incorrect interrupt/thread protection Incorrect timing caused by interrupt/thread nesting

© ARM 2016

System Viewer   

Displays information about peripheral registers Allows on-the-fly debugging of Special Function Registers (SFRs) Use it to:  



43

View peripheral register property values View additional information about a property Change properties at runtime (click into the value field and enter a new value)

© ARM 2016

Advantages of Software Components in Keil MDK Enhanced Productivity • Convenient selection of software components • Easy access to documentation • Code templates and examples to kickstart development 44

© ARM 2016

Long-term Project Maintenance • Software Packs with update facility and version management • Simplifies the replacement of the target device

Improved Flexibility • Support for new devices is provided by Software Packs • Open standard allows adding third party components

Debug Adapters and Development Boards

45

© ARM 2016

CoreSight ETM Instruction Trace (optional)

Run Control Breakpoint Unit

Cortex-M CPU Core

ITM Instrumentation Trace DWT Data Watchpoint & Trace Unit

Memory Access Unit

Debug Interface JTAG Debug

Serial Wire Debug

Serial Wire Trace Output

4-Pin Trace Output

Trace Port Interface SWO SWJ

Cortex Debug 10-Pin Connector 46

© ARM 2016

JTAG or Serial Wire Debug

Cortex Debug + ETM 20-Pin Connector

ULINK Debug and Trace Adapters JTAG

SWO 1 Mpbs

SWD

ULINK2: Debug + Serial Wire Trace  Flash Programming + Run-Control  Memory + Breakpoint (access while running)  Serial Wire Trace Capturing up to 1 Mbit/sec (UART mode)

47

© ARM 2016

JTAG SWD

SWO 100 Mpbs

ETM Streaming

ULINKpro: adds ETM + Streaming Trace  For Cortex-M up to 200 MHz  50 MHz JTAG clock speed  Serial Wire Trace Capturing up to 100 Mbit/sec (Manchester Mode)  ETM Trace Capturing up to 800 Mbit/s  Virtually unlimited Trace Buffer  Streaming Trace

Streaming Trace     

Trace data transferred in real-time to host Capture size only limited by host resources Trace for minutes, hours, or longer Required for full code-coverage and timing analysis Trace data is available instantly

Host Computer running µ Vision

Code Coverage

Performance Analyzer

Trace Data Harddisk

48

© ARM 2016

ULINKpro – Fastest Data Trace 

100 x faster than most other MCU solutions   



49

Real-Time data trace analysis CPU operates at full speed No overflows or lost data

MDK gives clear visibility into application behaviour

© ARM 2016

ULINKpro Benefits 

Streaming Instruction Trace   



Performance Analysis  

50

Debug historical sequences Full details of execution history Application Soak testing over long periods of time Optimize and Profile Applications Identify hotspots quickly

© ARM 2016



Code Coverage  



Implement 100% accurate Code Coverage on silicon Essential for validation and verification

Fastest Data Trace  



100 times faster than any other solution CPU at full speed No overflows or lost data

Comparison of ULINK Debug and Trace Units ULINKpro

ULINKpro D

ULINK2

   

  

  

50 MHz 1 MByte/s 100 Mbit/s 800 Mbit/s

50 MHz 1 MByte/s 100 Mbit/s

10 MHz 25 KByte/s 1 Mbit/s

  





Features

Run Control Debug Memory + Breakpoint (while running) Data Trace (Cortex-M3/M4/M7) Instruction Trace (Cortex-M3/M4/M7) Performance JTAG Clock speed Memory read/write Data & Event Trace (SWO) Instruction Trace (ETM) Analysis Tools Logic Analyzer Performance Analyzer Execution Profiling Code Coverage 51

© ARM 2016



Keil Development Boards 

Wide range of development boards     



52

NXP Cortex-M0/M3/M4 STMicroelectronics Cortex-M3/M4 Nuvoton Cortex-M0 Toshiba Cortex-M3 Spansion Cortex-M3

Check www.keil.com/boards2 for a complete list

© ARM 2016

MDK5 Device List – www.keil.com/dd2

53

© ARM 2016

MDK Version 5 

Full development suite     



Industry standard compiler  

54

Easy project creation/configuration Full integration of CMSIS Advanced debug views Fully featured, royalty free commercial grade RTOS: CMSIS-RTOS RTX Complete middleware bundle ARMCC is the reference compiler for ARM MicroLib can be used to dramatically reduce ROM footprint

© ARM 2016



Advanced debug with ULINKpro     

Streaming Trace 100% accurate code coverage Performance and execution analysis for optimisation The possibility for extended testing (soak testing) with debug information 100 x faster data trace than any other solution

Get more Information

55



MDK Version 5 : www.keil.com/mdk5



Getting Started Guide : www.keil.com/gsg



µVision Debugger : www.keil.com/debug



CoreSight Details : www.keil.com/coresight



ULINK Family of Debug Adapters : www.keil.com/ulink

© ARM 2016

The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be trademarks of their respective owners. Copyright © 2016 ARM Limited © ARM 2016