Authors | |
Publisher | Springer, Berlin |
Year | |
Pages | 533 |
Version | paperback |
Language | English |
ISBN | 9781484277881 |
Categories |
Build secure and reliable IoT applications for micro:bit and Raspberry Pi Pico by using Rust and Tock.
One of the first Operating Systems written in Rust, Tock is designed to safely run multiple applications on low power devices, enabling you to build a secure foundation for IoT systems. It is an open-source OS that has recently gained popularity as companies such as Google[1] explore and integrate it into their products.
This book guides you through the steps necessary to customize and integrate Tock into your devices. First, you'll explore the characteristics of Tock and how to run it on two of the most popular IoT platforms: micro:bit and Raspberry Pi Pico. You'll also take a look at Rust and how to use it for building secure applications with Tock.
The book focuses on the Tock kernel internals and presents the steps necessary to integrate new features. From simple drivers to the more complex asynchronous ones, you are provided with a detailed description of the Tock kernel API.
Next, you'll review the Tock applications framework for C. Starting from simple Tock APIs to the more complex Inter-Process Communication system, this book provides a complete overview of the Tock application ecosystem.
By taking a practical approach, Getting Started with Secure Embedded Systems provides a starting point for building a secure IoT foundation using the Tock Operating System.
You will:
Who This Book Is For
IoT system designers, developers, and integrators who are familiar with operating systems concepts. The book can also be suitable for people with less experience, who want to gain an overview of the latest hardware and software technologies related to building secure IoT systems.
Getting Started with Secure Embedded Systems: Developing IoT Systems for micro:bit and Raspberry Pi Pico Using Rust and Tock
Chapter 1: Introduction to Embedded Operating Systems
FreeRTOS
RIOT OS
Zephyr
Mbed OS
Why is TockOS new and different?
Chapter 2: Modern Low Power Microcontrollers
Main functional components of modern microcontrollersProcessing unit
o ARM Cortex-M
o RISC-V IMC and IMAC
General memory layout
Persistent storage
Communications busses
Debug
Chapter 3: The TockOS System Architecture
Architecture
Memory Layout
KernelHardware Abstraction Layer
Capsules
Applications
Flashing the system
Examples
Chapter 4: Running TockOS
Preparing the toolsUnderstanding the kernel's source code
Compiling the kernel
Understanding the user land application source code
Compiling an application
Running using an emulator (RISC-V)
Running using a real device (STM32F412)
Chapter 5: Writing Applications
TockOS System calls
The TockOS API library
Adding a third-party library
Building for several architectures
TockOS Application Distribution
Chapter 6: Rust for TockOS
Introduction to Rust
Lifetimes
Mutable references
Chapter 7: Writing a capsule
Capsule architectureAsynchronous API
The Hardware Interface Layer
Using a timer (for delays)
System calls implementation
Writing a component
Using the capsule from an application
Chapter 8: Writing a Sensor Capsule
Sensor HILs
Virtual Device Interfaces
Using the ADC deviceImplementing the system calls
Using the capsule from an application
Chapter 9: Using Communication Busses
UART
SPI
i2C
BLE
Basic Networking
Chapter 10: Building for a Custom System
Creating a new boardMemory layout
Adding capsules
Enabling and setting up hardware
Starting the kernel
Chapter 11: Designing a Hardware Interface Layer
The HIL trait
Designing the HIL
Chapter 12: Porting TockOS
The microcontroller architecture
o MPU setup
o interrupts
o bootstrappingThe chip
o The interrupt vectoro Enabling peripherals
o Implementing basic HILs
Chapter 13: Contributing to TockOS
Creating a Pull Request
Automatic testing
Review process