وبلاگ بلیان

Getting started with secure embedded systems : developing IoT systems for Micro:bit and Raspberry Pi Pico using Rust and TockOS

جلد کتاب Getting started with secure embedded systems : developing IoT systems for Micro:bit and Raspberry Pi Pico using Rust and TockOS

معرفی کتاب «Getting started with secure embedded systems : developing IoT systems for Micro:bit and Raspberry Pi Pico using Rust and TockOS» نوشتهٔ Alexandru Radovici و Ioana Culic، منتشرشده توسط نشر Apress L. P. در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Getting started with secure embedded systems : developing IoT systems for Micro:bit and Raspberry Pi Pico using Rust and TockOS» در دستهٔ ریاضیات قرار دارد.

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: Use Rust for embedded systems development Write applications and drivers for Tock Customize the Tock kernel for specific hardware platforms Set a solid base for building secure and reliable IoT applications Use Tock to ensure the security of your microcontrollers and integrate them into your projects Manage products that rely on Tock 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. Table of Contents About the Authors About the Technical Reviewer Acknowledgments Chapter 1: Embedded Systems and Architectures The Eagle Has Landed The Architecture of a Generic Embedded System Central Processing Unit AVR PIC ARM MIPS x86/x64 RISC-V The System Bus The Memory Input/Output Devices The Storage Space The Interrupt Controller The Debug Interface Microcontrollers, Computers, and Hybrid Systems Microcontrollers Computers Hybrids Embedded Systems Platforms Summary Chapter 2: Embedded Systems Software Development What About the Software? Development Languages Assembly Language Structured Programming Python C/C++ and Arduino Assembly Language C# Rust A Few Words About Security C Programming and Safety Beware of Rust Bare Metal Embedded The Arduino Library CMSIS OpenCM3 The Rust Embedded Devices Working Group Real-Time Interrupt-Driven Concurrency Embedded Operating Systems and Frameworks FreeRTOS The Zephyr Project Mbed OS RIOT Tock Summary Chapter 3: The Tock System Architecture Why Tock? A Few Words About Operating Systems The Kernel The Drivers The Applications Services The Tock System Architecture User Space The Tock Kernel Hardware Drivers Capsules Security Facts The Tock User Space Architecture Process States System Calls Synchronous System Calls Asynchronous System Calls Shared Buffers The Process Memory The Grant Region Dynamic Grants Tock Application Package Tock Binary Format Tock Application Bundle Flashing the System The Debug Chip Flashing Programming The Safe Way Summary Chapter 4: Rust for Tock Introduction to Rust Rust Primary Data Types Mutability Who Owns A Value? Strings The Heap-Allocated String String Slices Borrowing Slices Lifetimes Who Is Responsible for Deallocation? Function Parameters and Return Values Lifetime Elision Rules Generics and Trait Objects A Kind of Inheritance Traits Generics-Based Implementation Implementation Using Trait Objects Rust Standard Traits Generic Structures Associated Types Null Values and Error Reporting Rust Concepts Used in Tock Interior Mutability Simple Values Optional Values Buffers Global Variables Buffer Lifetimes Unwrapping Values Transforming Values Summary Chapter 5: Getting Started with Tock Hardware Requirements About the Tock Repository The Tock Project Structure The libtock-c and libtock-rs Repositories Environment Setup Environment Setup for Programming the micro:bit Device Setup for Linux and macOS Systems Linux Systems MacOS Systems Windows Systems Linux Virtual Machine Install the Necessary Tools for the Raspberry Pi Pico Use the Raspberry Pi Directly to Compile and Deploy to the Pico Use The Raspberry Pi As a Gateway for the Pico The Setup for Linux and macOS Systems Linux Systems MacOS Systems The Setup for the Raspberry Pi Clone the Tock Kernel Source Code Clone Tock Additional Libraries Compile and Deploy the Tock Kernel and Applications Deploy the Tock Kernel on the micro:bit Use Gdb to Deploy Tock Use OpenOCD to Deploy Tock Hello World from micro:bit! Deploy the Tock Kernel on the Raspberry Pi Pico Compile and Deploy the Tock Kernel Using the Raspberry Pi Use Only OpenOCD to Deploy Tock Use Gdb to Deploy Tock Compile and Deploy the Tock Kernel from the Computer Hello World from Raspberry Pi Pico! Deploy the Application from the Raspberry Pi Deploy the Application from Your Computer Summary Chapter 6: The Structure of a Custom Tock System Initialize the Kernel Component Link the Tock Kernel Repository Add the Board-Specific Folder Build Information Create the Drivers Folder The Cargo.toml File Drivers Source Files Initialize the Userspace Component Link the libtock-c Repository Create the Applications Folder The Driver Userspace Component The Structure of a Sample Application The Rust Toolchain Build the Project Build the Kernel Build an Application Summary Chapter 7: Userspace Applications Development Hardware Requirements Userspace Capsule APIs The Timer Library The GPIO Library Application Example The LED Library Application Example The ADC Library Application Example The Sensor Libraries Reading The Temperature Reading The Motion Application Example Human Interaction Libraries The Console Library Application Example The Text Screen Library The Screen Library Application Example With the Pico Explorer Device The Button Library Application Example Persistent Data Storage Library Summary Chapter 8: Synchronous Syscall Capsules Hardware Requirements The Tock Capsule Why Write A Capsule? A Closer Look at The System Call Interface The Command System Call The CommandReturn Structure A Capsule’s Architecture The API Definition Writing the Capsule Defining the Driver Defining the Font Connecting the LEDs Slice vs Array Reference Usage Controlling the LEDs Display Digits and Letters The Syscall API Implementation Registering the Capsule The Board Implementation The KernelResources Trait System Calls Filters Drivers Registration Starting The Kernel Capabilities The DigitLetterDisplay Capsule Registration Writing the Userspace Library The Header File The Library Using the Library Inside the Process Run the Project on the Raspberry Pi Pico The Hardware Setup Setting Up the Driver Using the Driver Summary Chapter 9: Asynchronous Syscall Capsules Requirements Extending the API The command System Call The subscribe System Call The allow System Call Capsule Architecture Asynchronous Tock Drivers Writing the Capsule Defining the Capsule’s Data Structures The leds Field The alarm Field The grant Field How subscribe Works The Capsule’s State The Data Stored for Each Process Storing the Buffer Executing the Commands The Text Display Implementing the Delay Signaling the Application The Capsule Registration The Userspace Library Implementation The Userspace API The API Implementation Definitions Asynchronous API Synchronous API Writing an Example Application The Synchronous Application The Asynchronous Application Using the Raspberry Pi Pico Summary Chapter 10: Service Capsules Requirements The Separation Between Syscall and Service Capsules The TextScreen Driver The Architecture of the Capsule The Text Screen API The Driver Implementation Driver Initialization Buffers and Parameters Deferred Calls The TextScreen HIL Implementation Asynchronous Functions Printing the Text The Text Displaying Process The Setup Syscall API Implementation Capsule Registration Capsule Usage The Text Screen API The Setup API Use the Raspberry Pi Pico Summary Chapter 11: Tock Userspace Drivers Requirements The Tock Inter-Process Communication Library Use IPC to Implement a Userspace Driver The TextDisplay Service The Service API The Client Process Summary Chapter 12: Tock Systems Management Running Tockloader Use tockloader with the micro:bit Troubleshooting Use tockloader with the Raspberry Pi Pico Flash the Kernel Device Console Install/Remove Applications Tockloader Install Tockloader Uninstall Update an Application Inspect the Applications List Applications Inspect TAB Files Application Configurations Enable/Disable an Application Sticky Applications Fault Policies Write a Custom FaultPolicy Override the Fault Handler System Information Inspecting Processes System Status List Processes Control the System Processes Kernel Memory Summary Index
دانلود کتاب Getting started with secure embedded systems : developing IoT systems for Micro:bit and Raspberry Pi Pico using Rust and TockOS