component-based software development for microcontrollers

15
1 Component-based Software Development for Microcontrollers Zhang Zheng FAE, ARM China 1

Upload: others

Post on 04-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Component-based Software Development for Microcontrollers

1

Component-based Software Development

for Microcontrollers

Zhang Zheng

FAE, ARM China

1

Page 2: Component-based Software Development for Microcontrollers

2

Agenda

The Challenge in embedded software creation

The Software Pack concept

Implementation in MDK Version 5

Consistent driver interface

Workflow and Summary

Page 3: Component-based Software Development for Microcontrollers

3

Software Complexity – The Challenge

1970 1980 1990 2000 2010

Development Costs

(Industrial Application)

Software development costs rise with increasing performance and higher requirements

Page 4: Component-based Software Development for Microcontrollers

4

Hardware uses standardized interfaces

RAM

Flash

Serial

Driver

Serial

Connector

PHY Ethernet

Connector

SD

Connector

SD

Card

Bus MCU

Page 5: Component-based Software Development for Microcontrollers

5

3rd party software reuse is limited today

14%

79%

25%

15%

No, all new software, no

code reuse

Yes, reused code developed

in-house

Yes, reused open-source,

shareware code

Yes, reused purchased code

Does your current project reuse code from a previous embedded

project?

Source: UBM Embedded Market Study 2013

Page 6: Component-based Software Development for Microcontrollers

6

Questions when using 3rd party software

Usage of files (source code, header, library)?

Project Maintenance after files are integrated?

Where is the documentation?

What are the License conditions?

Page 7: Component-based Software Development for Microcontrollers

7

The Keil MDK Version 5 Solution: Software Packs

Software components are delivered in one

easy to install Software Pack

A package description file (PDSC) contains:

Supplier information

Download URL

License

Release version

Dependencies on processors, devices, tool chains

or other components

Software Pack

Component

Libraries

Configuration Files

Header File (API)

Documentation

Device Parameters

Flash Algorithm

Component

Component

Page 8: Component-based Software Development for Microcontrollers

8

Software Packs in Keil MDK Version 5

Keil MDK (Microcontroller Development Kit)

So

ftw

are

Packs

System/Startup

Driver 1: SPI

Driver 2: Ethernet

Device

Driver n: USB

CMSIS-CORE

CMSIS-DSP

CMSIS-RTOS

CMSIS

File System

MDK Professional Middleware

Graphic

TCP/IP

Networking

USB Device

USB Host

MD

K C

ore

Pack Installer

µVision IDE with Editor ARM C/C++ Compiler

µVision Debugger with Trace

Page 9: Component-based Software Development for Microcontrollers

9

Web Portal for Software Packs

Page 10: Component-based Software Development for Microcontrollers

10

Component View and templates in Keil MDK Version 5

Page 11: Component-based Software Development for Microcontrollers

11

Consistent Driver Interface for Peripherals

Drivers provide standardized interfaces to peripherals

Drivers are configured using a central file

Functions are accessed by a control structure

struct _DRIVER_SPI {

DRV_VERSION (*GetVersion) (void);

SPI_STATUS (*Initialize) (SPI_SignalEvent_t

SPI_STATUS (*Uninitialize) (void);

SPI_STATUS (*PowerControl) (POWER_STATE

SPI_STATUS (*Configure) (SPI_FRAME_FORMAT

SPI_STATUS (*SendData) (const uint8_t *buf,

SPI_STATUS (*ReceiveData) (uint8_t *buf,} const

DRIVER_SPI;

Startup / System

UART Driver

Device Pack

SPI Driver

MCI Driver

NAND Flash Driver

NOR Flash Driver

USB Device Driver

USB Host Driver

Ethernet Driver

RTE_Device.h

Configuration File

Page 12: Component-based Software Development for Microcontrollers

12

Device and Driver Configuration

Startup / System

UART Driver

Device Pack

SPI Driver

MCI Driver

NAND Flash Driver

NOR Flash Driver

USB Device Driver

USB Host Driver

Ethernet Driver

RTE_Device.h

Configuration File

UART1

SPI2 SPI3

NAND

USBD2

USBH1

RMII

Page 13: Component-based Software Development for Microcontrollers

13

Device and Driver Configuration

Startup / System

UART Driver

Device Pack

SPI Driver

MCI Driver

NAND Flash Driver

NOR Flash Driver

USB Device Driver

USB Host Driver

Ethernet Driver

RTE_Device.h

Configuration File

UART1

SPI2 SPI3

NAND

USBD2

USBH1

RMII

Middleware

File System

Graphical User

Interface

TCP/IP Networking

USB Device Stack

USB Host Stack

Page 14: Component-based Software Development for Microcontrollers

14

Keil MDK Workflow using Software Packs

Install

• Download relevant Software Packs from Web Portal

Select

• Choose device and select required middleware

Configure

• Setup parameters of the Run-Time Environment

Implement

• Use code templates for faster software development

Page 15: Component-based Software Development for Microcontrollers

15

Advantages of Software Components in Keil MDK

Enhanced Productivity

• Convenient selection of software components

• Easy access to documentation

• Code templates and examples to kick-start development

Simplified 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