Opening the IoT with FreeRTOS

46

Transcript of Opening the IoT with FreeRTOS

Page 1: Opening the IoT with FreeRTOS
Page 2: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Opening the IoT with FreeRTOS

Richard Barry

I O T 3 4 0

Principal Engineer

Amazon Web Services

Page 3: Opening the IoT with FreeRTOS

Agenda

The MIT licensed FreeRTOS kernel

Traditional use cases

Internet of things (IoT) use cases

Challenges of developing universal software

Developer support from our ecosystem

Open-source everything

Page 4: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 5: Opening the IoT with FreeRTOS

What is the FreeRTOS kernel?

The FreeRTOS kernel is a small C

code library that implements

multithreading

Page 6: Opening the IoT with FreeRTOS

RTO: kernel or scheduler?

RTOS

Executive

Scheduler

Page 7: Opening the IoT with FreeRTOS

Small footprint

No scheduler

Ap

pli

cab

ilit

y

Processor power

Tens of thousands of RAM, hundreds of thousands of flash

≈40 architectures, ≈20 compilers

FreeRTOS

μCLinux, eCOS

Linux

Page 8: Opening the IoT with FreeRTOS

Library that implements multithreading

Application design goals• Meet real-time requirements

• Maximize responsiveness

• Use as little CPU/power as possible

• Maximize maintainability

• Maximize portability (hardware change)

• Simplicity

• Fast to market

• Meet requirements with minimum expenditure

ISR

ISR

ISR

ISR

Page 9: Opening the IoT with FreeRTOS

FreeRTOS downloads per month over 15 years

0

2,000

4,000

6,000

8,000

10,000

12,000

14,000

Do

wn

loa

ds

Date

Page 10: Opening the IoT with FreeRTOS

Provide a free product that

surpasses the quality and service

of commercial alternatives

Enterprise-

friendly licensingUser obsession Rapid support

Robustness DocumentationWindows hosts

too

LeadershipKnowledgeable

supportControlled IP

Paid optionsDemonstrable

code qualityVibrant activity

Page 11: Opening the IoT with FreeRTOS

FreeRTOS: Open-source, real-time kernel

Page 12: Opening the IoT with FreeRTOS

Use cases

Page 13: Opening the IoT with FreeRTOS

FreeRTOS kernel

User (application) code

Vendor-supplied libraries

Hardware

FreeRTOS

kernel

Third-party libraries

Page 14: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 15: Opening the IoT with FreeRTOS

Recent trends: IoT

Fleet onboarding,

management, and SW updates

Fleet audit and protection

IoT data analytics and intelligence

Secure device connectivity

and messaging

Page 16: Opening the IoT with FreeRTOS

Internet connected

Functionality

Communications stack

Secure storage

Security stack

Bootloader

Over-the-air (OTA) update

Page 17: Opening the IoT with FreeRTOS

Application without connectivity

User (application) code

Vendor-supplied libraries

Hardware

Page 18: Opening the IoT with FreeRTOS

Application with secure connectivity

User (application) code

TLSKey

manage-

ment

MQTT

TCP/IP

Secure

storage

Vendor-supplied libraries

Hardware

Wi-fi

Provisioning OTA

Page 19: Opening the IoT with FreeRTOS

Application view with FreeRTOS library integrations

User (application) code

Vendor-supplied libraries

Hardware

FreeRTOS

kernel

MQTT agent OTA agentAWS IoT Greengrass discovery

Middleware libraries

Page 20: Opening the IoT with FreeRTOS

Simplified user experience

Page 21: Opening the IoT with FreeRTOS

Evolving use cases: Wider applicability

Amazon

Cognito

AWS IoT

MQTT/HTTP/Websocket

Android/iOS SDKs

MQTT over Bluetooth

Low Energy

Android/iOS SDKs

Wi-fi provisioning over

Bluetooth Low Energy

MCU

MCU

MCU

MCU

Page 22: Opening the IoT with FreeRTOS

Evolving software architecture

• Decoupled, standalone libraries

• Transport agnostic

• Multiple transports in a single application

• Working to making porting layers thinner

• Add to preexisting projects

• Add to autogenerated projects

Page 23: Opening the IoT with FreeRTOS

Use cases: Common starting point

User (application) code

TCP/IP

Vendor-supplied libraries

Hardware

FreeRTOS

kernel

Page 24: Opening the IoT with FreeRTOS

Use cases: Basic (often TCP/IP is offloaded)

User (application) code

TCP/IP

MQTT

Vendor-supplied libraries

Hardware

FreeRTOS

kernel

Page 25: Opening the IoT with FreeRTOS

Use cases: All in Wi-fi

User (application) code

TLS

Key

manage-

ment

TCP/IP

MQTT

Secure

storage

Vendor-supplied libraries

Hardware

Wi-fi

Provisioning OTA

FreeRTOS

kernel

Page 26: Opening the IoT with FreeRTOS

Use cases: All in Bluetooth Low Energy

User (application) code

TLS

Key

manage-

ment

TCP/IP

MQTT

Secure

storage

Vendor-supplied libraries

Hardware

Bluetooth Low

Energy

Provisioning OTA

FreeRTOS

kernel

Page 27: Opening the IoT with FreeRTOS

Flexible user experience

Page 28: Opening the IoT with FreeRTOS

Abstracted flexible user experience

Page 29: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 30: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 31: Opening the IoT with FreeRTOS

FreeRTOS+Trace/Tracealyzer

• Shows real-time behavior of FreeRTOS systems

• Task scheduling

• FreeRTOS kernel calls

• Application events and data

• Interrupt handlers

• Commercially licensed

• Provided by Percepio AB

Page 32: Opening the IoT with FreeRTOS

FreeRTOS+Trace/Tracealyzer

Page 33: Opening the IoT with FreeRTOS

SEGGER SystemView

Page 34: Opening the IoT with FreeRTOS

Threadspy

Page 35: Opening the IoT with FreeRTOS

IAR thread aware and StateViewer plugins

Page 36: Opening the IoT with FreeRTOS

OpenRTOS and SafeRTOS

• Provided by our strategic partner WITTENSTEIN high integrity systems, a global engineering company with more than 1,500 employees

• OPENRTOS is FreeRTOS but is distributed under standard commercial license terms

• The TÜV SÜD–certified SAFERTOS is derived from FreeRTOS but has been reengineered with safety as its primary objective

• Dedicated and private ticketed support

• Legal indemnification

• Commercial middleware

Page 37: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 38: Opening the IoT with FreeRTOS

Open-source kernel

• FreeRTOS

• Security & connectivity

Preconfigured

examples for

approximately 40

architectures and

20 tool chains,

not all of which

are open source

Page 39: Opening the IoT with FreeRTOS

Open-source kernel, tools

• FreeRTOS

• Security & connectivity

• Eclipse based

• GCC

• LLVM

Page 40: Opening the IoT with FreeRTOS

Open-source kernel, tools, emulators

• FreeRTOS

• Security & connectivity

• Eclipse based

• GCC

• LLVM

• Renode

• QEMU

Page 41: Opening the IoT with FreeRTOS

Open-source kernel, tools, emulators, ISA, & hardware

• FreeRTOS

• Security & connectivity

• Eclipse based

• GCC

• LLVM

• Renode

• QEMU

• RISC-V

• PULP RI5KY

Page 42: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 43: Opening the IoT with FreeRTOS

2018

2017

2016

Open source at Amazon

Page 44: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

25+ additional free digital courses cover topics related to IoT, including:

Take the free digital curriculum, Internet of Things (IoT) Foundation Series, to build IoT skills and work through common scenarios

Learn IoT with AWS Training and Certification

• AWS IoT Core

• AWS IoT Greengrass

• AWS IoT Analytics

• AWS IoT Device Management

• AWS IoT Events

Visit the Learning Library at https://aws.training

Resources created by the experts at AWS to help you build IoT skills

Page 45: Opening the IoT with FreeRTOS

Thank you!

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Richard Barry

[email protected] [email protected]

Page 46: Opening the IoT with FreeRTOS

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.