INSIDE THE SYNERGY SOFTWARE PLATFORM

INSIDE THE SYNERGY SOFTWARE PLATFORM Lake Garda 7-8 April 2016 © 2016 Renesas Electronics Corporation. All rights reserved. What You Will Learn in ...
Author: Merry Lang
49 downloads 0 Views 2MB Size
INSIDE THE SYNERGY SOFTWARE PLATFORM Lake Garda 7-8 April 2016

© 2016 Renesas Electronics Corporation. All rights reserved.

What You Will Learn in this Session In this presentation, we will look more deeply into the SSP and investigate the different levels provide:

A Complex Connected Embedded System: Deadlines

Productivity Budgets Complexity Risk Support Graphics TFT App1 App2 App3

■ ■ ■ ■

1. Synergy Software Package Overview

Touch

Main Task

BLE

2. The SSP OS and Middleware

WiFi

3. SSP Defined Layers

Wired

4. Synergy Software in action

Multi-functions Graphics requirements Connected devices Many middleware requirements

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 2

Synergy Software Package Overview

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 3

Synergy Software Package (SSP) – Software Platform RTOS Enables creation of multitasking real-time applications

Customer Applications

Stacks & Middle-ware Handles standardized TCP/IP, USB and GUI functions

© 2016 Renesas Electronics Corporation. All rights reserved.

Software API Stacks & Middleware

Application Framework

ThreadX® RTOS

HAL Peripheral Drivers

Cloud

Apps Manager

QSA Add-On

VSA Add-On

Renesas Synergy™ Software Package (SSP)

Tools BSP

Software API Makes application development easy and makes it portable

Application Framework Provides system level services used in most applications

Renesas Synergy™ MCU BSP & HAL Abstract application from hardware - portability

4

Page 4

Renesas Synergy™ Software Package – Block Diagram Synergy Software Package (SSP) ThreadX® RTOS Advanced Scheduler Inter-process and Inter-thread Communication Memory Management Message Queue

FileX®

USBX™

GUIX™

FAT12/16/32, exFAT, SD, microSD, CF, and MemoryStick

Host Classes (Storage, CDC, HID) Host Stack Host Controller

GUIX Studio Run Time Library Canvas Drawing Screen System Widget Window

Complete Flash Management with Wear Leveling Very Fast Performance and Low Footprint

Device Classes (Storage, CDC, Audio, HID, Printer, Hub) Device Stack Device Controller

NetX™ and NetX™ Duo FTP TFTP Telnet PPP SMTP POP3 HTTP DNS SNMP DHCP

SNTP NAT TCP IPv4/v6 UDP ICMP IGMP ARP RARP

Application Framework Audio Console JPEG

SPI I2C UART

Touch Panel

Thread Monitor

External IRQ

Power Profile

Functional Libraries Security & Encryption CMSIS DSP Captouch

Messaging

Hardware Abstraction Layer (HAL) Drivers Ethernet MAC Controller USBHS USBFS

CAN UART SDHI QSPI

SPI

ADC12

IIC SSI RTC

ADC14 DAC12

Data Transfer Controller

Clock Management

Graphics LCD Controller

Segment LCD Controller

DMA Controller

Safety

Timing & Control

Security & Encryption

2D Drawing Engine

Parallel Data Capture Unit

Board Support Package (BSP) © 2016 Renesas Electronics Corporation. All rights reserved.

Page 5

Renesas Synergy™ Software Package – Block Diagram Synergy Software Package (SSP) ThreadX®® ThreadX RTOS Advanced Scheduler Inter-process and Inter-thread Communication Memory Management Message Queue

FileX®

USBX™

GUIX™

FAT12/16/32, exFAT, SD, microSD, CF, and MemoryStick

Host Classes (Storage, CDC, HID) Host Stack Host Controller

GUIX Studio Run Time Library Canvas Drawing Screen System Widget Window

Complete Flash Management with Wear Leveling Very Fast Performance and Low Footprint

Device Classes (Storage, CDC, Audio, HID, Printer, Hub) Device Stack Device Controller

NetX™ and and NetX™ Duo Duo FTP TFTP Telnet PPP SMTP POP3 HTTP DNS SNMP DHCP

SNTP NAT TCP IPv4/v6 UDP ICMP IGMP ARP RARP

Application Framework Audio Console JPEG

SPI I2C UART

Touch Panel

Thread Monitor

External IRQ

Power Profile

Functional Libraries Security & Encryption CMSIS DSP Captouch

Messaging

Hardware Abstraction Layer (HAL) Drivers Ethernet MAC Controller USBHS USBFS

CAN UART SDHI QSPI

SPI

ADC12

IIC SSI RTC

ADC14 DAC12

Data Transfer Controller

Clock Management

Graphics LCD Controller

Segment LCD Controller

DMA Controller

Safety

Timing & Control

Security & Encryption

2D Drawing Engine

Parallel Data Capture Unit

Board Support Package (BSP) © 2016 Renesas Electronics Corporation. All rights reserved.

Page 6

Renesas Synergy™ Software Package – Block Diagram Synergy Software Package (SSP) ThreadX® RTOS Advanced Scheduler Inter-process and Inter-thread Communication Memory Management Message Queue

FileX®

USBX™

GUIX™

FAT12/16/32, exFAT, SD, microSD, CF, and MemoryStick

Host Classes (Storage, CDC, HID) Host Stack Host Controller

GUIX Studio Run Time Library Canvas Drawing Screen System Widget Window

Complete Flash Management with Wear Leveling Very Fast Performance and Low Footprint

Device Classes (Storage, CDC, Audio, HID, Printer, Hub) Device Stack Device Controller

NetX™ and NetX™ Duo FTP TFTP Telnet PPP SMTP POP3 HTTP DNS SNMP DHCP

SNTP NAT TCP IPv4/v6 UDP ICMP IGMP ARP RARP

Application Framework Audio Console JPEG

SPI I2C UART

Touch Panel

Thread Monitor

External IRQ

Power Profile

Functional Libraries Security & Encryption CMSIS DSP Captouch

Messaging

Hardware Abstraction Layer (HAL) Drivers Ethernet MAC Controller USBHS USBFS

CAN UART SDHI QSPI

SPI

ADC12

IIC SSI RTC

ADC14 DAC12

Data Transfer Controller

Clock Management

Graphics LCD Controller

Segment LCD Controller

DMA Controller

Safety

Timing & Control

Security & Encryption

2D Drawing Engine

Parallel Data Capture Unit

Board Support Package (BSP) © 2016 Renesas Electronics Corporation. All rights reserved.

Page 7

Renesas Synergy™ Software Package – Block Diagram Synergy Software Package (SSP) ThreadX® RTOS Advanced Scheduler Inter-process and Inter-thread Communication Memory Management Message Queue

FileX®

USBX™

GUIX™

FAT12/16/32, exFAT, SD, microSD, CF, and MemoryStick

Host Classes (Storage, CDC, HID) Host Stack Host Controller

GUIX Studio Run Time Library Canvas Drawing Screen System Widget Window

Complete Flash Management with Wear Leveling Very Fast Performance and Low Footprint

Device Classes (Storage, CDC, Audio, HID, Printer, Hub) Device Stack Device Controller

NetX™ and NetX™ Duo FTP TFTP Telnet PPP SMTP POP3 HTTP DNS SNMP DHCP

SNTP NAT TCP IPv4/v6 UDP ICMP IGMP ARP RARP

Application Framework Audio Console JPEG

SPI I2C UART

Touch Panel

Thread Monitor

External IRQ

Power Profile

Functional Libraries Security & Encryption CMSIS DSP Captouch

Messaging

Hardware Abstraction Layer (HAL) Drivers Ethernet MAC Controller USBHS USBFS

CAN UART SDHI QSPI

SPI

ADC12

IIC SSI RTC

ADC14 DAC12

Data Transfer Controller

Clock Management

Graphics LCD Controller

Segment LCD Controller

DMA Controller

Safety

Timing & Control

Security & Encryption

2D Drawing Engine

Parallel Data Capture Unit

Board Support Package (BSP) © 2016 Renesas Electronics Corporation. All rights reserved.

Page 8

Renesas Synergy™ Software Package – Block Diagram Synergy Software Package (SSP) ThreadX® RTOS Advanced Scheduler Inter-process and Inter-thread Communication Memory Management Message Queue

FileX®

USBX™

GUIX™

FAT12/16/32, exFAT, SD, microSD, CF, and MemoryStick

Host Classes (Storage, CDC, HID) Host Stack Host Controller

GUIX Studio Run Time Library Canvas Drawing Screen System Widget Window

Complete Flash Management with Wear Leveling Very Fast Performance and Low Footprint

Device Classes (Storage, CDC, Audio, HID, Printer, Hub) Device Stack Device Controller

NetX™ and NetX™ Duo FTP TFTP Telnet PPP SMTP POP3 HTTP DNS SNMP DHCP

SNTP NAT TCP IPv4/v6 UDP ICMP IGMP ARP RARP

Application Framework Audio Console JPEG

SPI I2C UART

Touch Panel

Thread Monitor

External IRQ

Power Profile

Functional Libraries Security & Encryption CMSIS DSP Captouch

Messaging

Hardware Abstraction Layer (HAL) Drivers Ethernet MAC Controller USBHS USBFS

CAN UART SDHI QSPI

SPI

ADC12

IIC SSI RTC

ADC14 DAC12

Data Transfer Controller

Clock Management

Graphics LCD Controller

Segment LCD Controller

DMA Controller

Safety

Timing & Control

Security & Encryption

2D Drawing Engine

Parallel Data Capture Unit

Board Support Package (BSP) © 2016 Renesas Electronics Corporation. All rights reserved.

Page 9

SSP OS and Middleware

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 10

®

ThreadX RTOS ■ Industry proven multitasking Realtime Operating System ■ Realtime scheduling algorithms and efficient Multitasking ● ● ● ●

Semaphores & Mutex

Round-robin scheduling + time-slicing Preemptive and Preemption-threshold™ scheduling Event-Chaining™ Technology 0 to 1024 priority levels for tasks

Message Queues/ Mailbox

Event Flags

Synchronization and Communication

■ Built-in resource management features ■ Built-in inter-task synchronization & communication features ■ Built-in event trace capability supported by PC based Visualizer ■ MISRA-C:2004 and MISRA-C:2012 Compliant ■ Pre-certified for: IEC 61508, IEC 62304, UL 60730-1 H, CSA E60730-1 H, IEC

Memory Management

Timer Support

Resource Management

60730-1 H, UL 60335-1 R, IEC 60335-1 R, UL 1998 ThreadX® Kernel Higher priority thread preempts

Priority 3 Priority 2

A

B

A

D

B

Priority 0

Interrupt preempts C

B C C completes B restarts

Priority 1

Interrupt preempts D D

Round Robin/Time Slicing scheduling for tasks at same priority levels

Realtime Preemptive Kernel

C

C ISR

D A

ISR

ThreadX® features

Preemptive Multitasking when tasks at different priority levels ned to be scheduled

Threads scheduling

© 2016 Renesas Electronics Corporation. All rights reserved.

CONFIDENTIAL

Page 11

NetX™ and NetX Duo™ SSP

■ NetX supports IPv4 NetX™ Application Bundle

■ NetX Duo supports both IPv4 and IPv6 NetX™/NetX™ Duo

■ Optimized TCP/IP stack for embedded systems

TCP

■ Based on Piconet™ architecture

ICMPv4/v 6

■ Small-footprint - as small as 5KB, automatic scaling

UDP

IPv4/v6

■ Fast execution - achieve wire speed, no packet copying

RARP

ARP

■ Phase-II IPv6 Ready Logo Certification for NetX Duo Network Driver

■ Integrates with TraceX™ system analysis support ■ BSD-compatible socket layer

Synergy MCU Ethernet MAC Controller

■ Advanced Features: ● UDP Fast-Path Technology™ ● Flexible packet management

© 2016 Renesas Electronics Corporation. All rights reserved.

CONFIDENTIAL

IPv4/6 TCP/IP stack

Page 12

IGMP

NetX™ and NetX Duo™ Application Bundle ■ Application layer protocols available with SSP ■ Network configuration protocols ● DHCP client/server (dynamic IP address allocation) ● DHCPv6 (client only) ● SNTP (network time Protocol)

■ Domain name services ● DNS, mDNS, DNS-SD ● DNSv6 ● NAT (private network extension)

■ Web server/network management ● HTTP (v6)

SNTP

HTTP

POP3

PPP

DNSv6

AutoIP

HTTP v6

SMTP

TFTP

DNSSD

DHCP v6

FTP

mDNS

DHCP

Telnet

DNS

NetX™ / NetX Duo™ Application

■ Email transfer ● POP3, SMTP

NetX™ / NetX Duo™

■ Connectivity protocols ● PPP, Telnet (v6), FTP (v6), TFTP

■ Security protocols ● TLS (partner provided) TCP/IP application bundle

© 2016 Renesas Electronics Corporation. All rights reserved.

CONFIDENTIAL

Page 13

TLS

GUIX Studio & GUIX Runtime Develop using GUIX Studio

Integrate with application executable

Execute on device using GUIX runtime

 GUIX includes a full-featured runtime UI library ● WYSIWYG screen design environment ● Automatically generates C code compatible with the GUIX runtime library. ● Font generation tool. ● Import graphics from PNG or JPG files with conversion to compressed GUIX Pixel maps. ● Customize the default colors and drawing styles used by the GUIX widgets. ● Multiple resource themes

© 2016 Renesas Electronics Corporation. All rights reserved.

 Small-footprint (as small as 6 KB)  Built-in widgets and controls  Multiple screens with varying sizes and color formats(32b)  Alpha blending and anti-aliasing  Hardware assisted graphics acceleration e.g. 2DG accelerator in Renesas Synergy™  Touch screen and virtual keyboard  Customizable appearance and multilingual support Page 14

SSP PREDEFINED LAYERS

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 15

Synergy Multi-Layer API Access

Main()

Network Thread

1

End Application Code Audio Waveform Display Thread Thread Thread

Control Thread

Motor Thread

Software APIs

1 Top API

Application Functional 2 Framework Libraries Audio Security

ThreadX® RTOS

FileX® USBX™ GUIX™ NetX™ Messaging NetX Duo™ …more HAL Drivers

EMACC Driver

Application Framework

DSP …more

Timing & Control Drivers

2

3 4

GLCDC Driver …more

HAL Driver

Custom Drivers

Custom Drivers

3 4

5

Board Support Package (BSP)

5 Synergy Microcontrollers © 2016 Renesas Electronics Corporation. All rights reserved.

MCU Registers Page 16

Predefined Layers

Framework HAL Drivers BSP MCU © 2016 Renesas Electronics Corporation. All rights reserved.

Page 17

Board Support Package (BSP)  BSP is the board hardware-specific support software with system level startup and setup code Application Program

 Will setup the stacks, heap, clocks, interrupts, and C run-time environment.

SSP CMSIS 

Standard names for intrinsic functions like NOP, WFI, etc.



Global interrupt control



Configuration of Systick timer



ITM debug primitives



ThreadX

SSP

GUIXTM Application Framework NetXTM 

Reporting and control of MCU clock chain 

Default ISRs for fixed interrupts Basic startup code, including:  Setup of stack pointers  Clock setup  C run-time initialization  STDIO initialization  Configuration of non-existent port pins  Heap initialization  Initial CPU mode



USBXTM

Shared I/F

FileX® 

HAL



BSP

Programming of ID code and flash-based option registers



Global control of parameter checking for SSP code



Atomic locking



Register protection



Synergy MCU

SYSTICK initialization



CPU context save/restore/switch for tasking



Services in BSP

© 2016 Renesas Electronics Corporation. All rights reserved.

ThreadX ®

Service Access structures and definitions for peripheral register access

X-WareTM

Page 18

Board Support Package

HAL Drivers Application Program

■ RTOS-independent device driver for peripherals ■ Each HAL driver is composed of two components:

Application Framework Shared Interface HAL X-WareTM

● Low-level driver (LLD) – Manipulates the peripheral registers directly – Uses versions of the same peripheral seamlessly ● High-level driver (HLD) – The code is specific to a Renesas hardware peripheral, but does not directly access hardware registers – Exposes one or more APIs to the framework code or user code ● Benefits include: – Portability across SSP platforms – Low level allows for very fast code – However, more difficult to use than the SSP Frameworks

SSP

ETHERC USBHS USBFS

Serial ADC14 and Comm. I/f ADC12 IrDA DAC8 Interface Clock QSPI Mgmt

GLCDC SLCDC DRW

CAN

SPI

RTC

PDC

SDHI

SSI

Timing & Control

Security & Encryption

BSP

■ Module names begin with r_ ■ Examples are:

Synergy MCU

● SPI ● RTC ● ADC

© 2016 Renesas Electronics Corporation. All rights reserved.

Hardware Abstraction Layer

Page 19

HAL Interfaces/Drivers  Application or Application Framework accesses HAL through Interface  Consistent interface to abstract hardware  Extensible configuration for designated hardware Some peripherals support multiple interfaces Some interfaces are supported by multiple peripherals And in some cases there is a one-toone mapping

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 20

Frameworks ■ Gives developers the kind of abstraction, re-use, ease of programming,

Application Program

and consistency that results in faster time to working code.

■ Provides standardized APIs

SSP Application Framework

■ Implements commonly used system services and frameworks ■ Abstracts the use of hardware peripherals from application programs ● Provides unified interface ● Provides mutual exclusion & synchronization services – Manages access conflicts

ThreadX® X-Ware™

■ Examples of application frameworks ● ● ● ● ● ● ● ● ● ●

Messaging Audio playback Thread monitor Console application UART External IRQ IIC JPEG decode SPI Touch Panel

SPI

Console

IIC

JPEG

UART

Touch Panel

Thread Monitor

External IRQ

Power Profiles

Messaging

Block Media

Cap. Touch Sensing

ADC

HAL BSP

Synergy MCU

Application framework

■ Module names begin with sf_ © 2016 Renesas Electronics Corporation. All rights reserved.

Audio

Page 21

Audio Application Framework Application Program

© 2016 Renesas Electronics Corporation. All rights reserved.

decode

convert

SSP Audio Framework

FileX®

ThreadX® USBXTM Timer

SRC

HAL

X-ware™

BSP

How it works ● Use APIs such as data get, decode, convert ● Supported output peripherals – DAC / PWM / SSI (I2S) ● SSP components work together and abstract MCU hardware features used

data get

Application Framework

What you can do ● Playback audio files ● Playback control features – Start – Stop – Pause – Resume – Volume Control

Synergy USB MS MCU Peripherals Page 22

Timers

SRC

DAC

SSI PWM

ADC Framework Application Program Data Sampling and Capture

■ ADC Framework provides generic and thread safe APIs for applications to sample data over available ADC channels X-WareTM ThreadX®

■ Configurable sampling rate and iterations

S/IF

■ Samples and buffers data from ADC channels

Periodic Sampling ADC

Application Framework

SSP

■ Notifies applications when the configured number of R_ADC

■ Uses callback mechanism to notify availability of data

R_GPT

■ Framework uses GPT timer interface for timing

R_DTC

R_DMAC

BSP

functions Synergy MCU

■ Framework uses DMA or DTC for efficient transfer of data from framework to application

ADC

GPT

DTC

ADC Framework

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 23

DMAC

HAL

samples are ready

What is Possible?

Framework Driver(s) BSP MCU © 2016 Renesas Electronics Corporation. All rights reserved.

Page 24

RENESAS SYNERGY SOFTWARE IN ACTION SSP AND ISDE TOUR David Noverraz, Engineering Manager Clairefontaine-en-Yvelines 17-18th March 2016

© 2016 Renesas Electronics Corporation. All rights reserved.

Introduction

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 26

The Renesas Synergy TM Platform for Embedded Designers Synergy Software Software APIs

A complete and qualified platform that accelerates embedded development, inspiring innovation and enabling differentiation.

Synergy Software Package (SSP)

ThreadX® RTOS

FileX® GUIX™ USBX™ NetX™ NetX Duo™

Application Framework

Qualified Software Add-ons (QSA)

Verified Software Add-ons (VSA)

Stacks

Stacks

Algorithms

Algorithms

Functions

Functions

Functional Libraries

A Solid PlatformSpecialties

Specialties

…and more

…and more

HAL Drivers

Three Core Values

Accelerate Development

Reduce Cost of Ownership

BSP

Lower Barriers to Entry

Synergy Microcontrollers Synergy Tools & Kits

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 27

Synergy Solutions

Synergy Gallery

IDE vs ISDE

+ IDE

© 2016 Renesas Electronics Corporation. All rights reserved.

= Solution-oriented components

Page 28

ISDE

ISDE components

e2 studio

New Build Phase PlugIns New Preparation Phase PlugIns

© 2016 Renesas Electronics Corporation. All rights reserved.

SSP Pack (CMSIS Pack format)

New Debug Phase PlugIns

Page 29

Quick ISDE tour

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 30

Synergy Project Generator Initial project configuration and selection of toolchain

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 31

Synergy Project Generator Device and development board selection

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 32

Synergy Project Generator Renesas or user defined project templates

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 33

Synergy Project Editor – BSP Configurator Customisation of selected Board Support Package (BSP)

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 34

Synergy Project Editor – Clock Configurator Simplified clock tree and configuration

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 35

Synergy Project Editor – Pin Configurator Peripheral pin configuration with conflict detection

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 36

Synergy Project Editor – RTOS / HAL / SSP Module Configurator Module selection and configuration

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 37

Seeing is believing

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 38

Synergy S7 USB CDC demo  Synergy S7G2 Development kit DK-S7G2  Synergy GCC (GNU) compiler  SSP Comms Framework  Express Logic ThreadX Operating System  Express Logic USBX  Segger J-Link debugger  ISDE

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 39

THANK YOU FOR YOUR ATTENTION PLEASE REMEMBER TO COMPLETE THE FEEDBACK SURVEY IN YOUR SMARTPHONE APP

© 2016 Renesas Electronics Corporation. All rights reserved.

Page 40