𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Embedded Systems Architecture: Design and write software for embedded devices to build safe and connected systems

✍ Scribed by Daniele Lacamera


Publisher
Packt Publishing
Year
2023
Tongue
English
Leaves
342
Edition
2
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Design safe and reliable software for embedded systems and explore the internals of device drivers, RTOS, and TEE

Key Features

  • Identify and overcome challenges in embedded environments
  • Understand and implement the steps required to increase the security of IoT solutions
  • Build safety-critical and memory-safe parallel and distributed embedded systems

Book Description

Embedded Systems Architecture begins with a bird's-eye view of embedded development and how it differs from the other systems that you may be familiar with. This book will help you get the hang of the internal working of various components in real-world systems.

You'll start by setting up a development environment and then move on to the core system architectural concepts, exploring system designs, boot-up mechanisms, and memory management. As you progress through the topics, you'll explore the programming interface and device drivers to establish communication via TCP/IP and take measures to increase the security of IoT solutions. Finally, you'll be introduced to multithreaded operating systems through the development of a scheduler and the use of hardware-assisted trusted execution mechanisms.

With the help of this book, you will gain the confidence to work with embedded systems at an architectural level and become familiar with various aspects of embedded software development on microcontrollersβ€”such as memory management, multithreading, and RTOSβ€”an approach oriented to memory isolation.

What you will learn

  • Participate in the design and definition phase of an embedded product
  • Get to grips with writing code for ARM Cortex-M microcontrollers
  • Build an embedded development lab and optimize the workflow
  • Secure embedded systems with TLS
  • Demystify the architecture behind the communication interfaces
  • Understand the design and development patterns for connected and distributed devices in the IoT
  • Master multitasking parallel execution patterns and real-time operating systems
  • Become familiar with Trusted Execution Environment (TEE)

Who this book is for

If you're a software developer or designer looking to learn about embedded programming, this is the book for you. You'll also find this book useful if you're a beginner or a less experienced embedded programmer on a quest to expand your knowledge on embedded systems.

Table of Contents

  1. Embedded Systems – A Pragmatic Approach
  2. Work Environment and Workflow Optimization
  3. Architectural Patterns
  4. The Boot-Up Procedure
  5. Memory Management
  6. General-Purpose Peripherals
  7. Local Bus Interfaces
  8. Power Management and Energy Saving
  9. Distributed Systems and IoT Architecture
  10. Parallel Tasks and Scheduling
  11. Trusted Execution Environment

✦ Table of Contents


Cover
Title Page
Copyright
Contributors
Table of Contents
Preface
Part 1 – Introduction to Embedded Systems Development
Chapter 1: Embedded Systems – A Pragmatic Approach
Domain definition
Embedded Linux systems
Low-end 8-bit microcontrollers
Hardware architecture
Understanding the challenges
Multithreading
RAM
Flash memory
General-purpose input/output (GPIO)
ADC and DAC
Timers and PWM
Interfaces and peripherals
Asynchronous UART-based serial communication
SPI
I2C
USB
Connected systems
Challenges of distributed systems
Introduction to isolation mechanisms
The reference platform
ARM reference design
The Cortex-M microprocessor
Summary
Chapter 2: Work Environment and Workflow Optimization
Workflow overview
The C compiler
Linker
Make: a build automation tool
Debugger
Embedded workflow
Text editors versus integrated environments
The GCC toolchain
The cross compiler
Compiling the compiler
Linking the executable
Binary format conversion
Interacting with the target
The GDB session
Validation
Functional tests
Hardware tools
Testing off-target
Emulators
Summary
Part 2 – Core System Architecture
Chapter 3: Architectural Patterns
Configuration management
Revision control
Tracking activities
Code reviews
Continuous integration
Source code organization
Hardware abstraction
Middleware
Application code
Security considerations
Vulnerability management
Software cryptography
Hardware cryptography
Running untrusted code
The life cycle of an embedded project
Defining project steps
Prototyping
Refactoring
API and documentation
Summary
Chapter 4: The Boot-Up Procedure
Technical requirements
The interrupt vector table
Startup code
Reset handler
Allocating the stack
Fault handlers
Memory layout
Building and running the boot code
The makefile
Running the application
Multiple boot stages
Bootloader
Building the image
Debugging a multi-stage system
Shared libraries
Remote firmware updates
Secure boot
Summary
Chapter 5: Memory Management
Technical requirements
Memory mapping
Memory model and address space
The code region
The RAM regions
Peripheral-access regions
The system region
Order of memory transactions
The execution stack
Stack placement
Stack overflows
Stack painting
Heap management
Custom implementation
Using newlib
Limiting the heap
Multiple memory pools
Common heap usage errors
The memory protection unit
MPU configuration registers
Programming the MPU
Summary
Part 3 – Device Drivers and Communication Interfaces
Chapter 6: General-Purpose Peripherals
Technical requirements
Bitwise operations
The interrupt controller
Peripherals’ interrupt configuration
System time
Adjusting the flash wait states
Clock configuration
Clock distribution
Enabling the SysTick
Generic timers
GPIO
Pin configuration
Digital output
PWM
Digital input
Interrupt-based input
Analog input
The watchdog
Summary
Chapter 7: Local Bus Interfaces
Technical requirements
Introducing serial communication
Clock and symbol synchronization
Bus wiring
Programming the peripherals
UART-based asynchronous serial bus
Protocol description
Programming the controller
Hello world!
newlib printf
Receiving data
Interrupt-based input/output
SPI bus
Protocol description
Programming the transceiver
SPI transactions
Interrupt-based SPI transfers
I2C bus
Protocol description
Clock stretching
Multiple masters
Programming the controller
Interrupt handling
Summary
Chapter 8: Power Management and Energy Saving
Technical requirements
System configuration
Hardware design
Clock management
Voltage control
Low-power operating modes
Deep-sleep configuration
Stop mode
Standby mode
Wake-up intervals
Measuring power
Development boards
Designing low-power embedded applications
Replacing busy loops with sleep mode
Deep sleep during longer inactivity periods
Choosing the clock speed
Power state transitions
Summary
Chapter 9: Distributed Systems and IoT Architecture
Technical requirements
Network interfaces
MAC
Selecting the appropriate network interfaces
The IPs
Standard protocols, custom implementations
The TCP/IP stack
Network device drivers
Running the TCP/IP stack
Socket communication
Connectionless protocols
Mesh networks and dynamic routing
TLS
Securing socket communication
Application protocols
Message protocols
The REST architectural pattern
Distributed systems – single points of failure
Summary
Part 4 – Multithreading
Chapter 10: Parallel Tasks and Scheduling
Technical requirements
Task management
The task block
Context switch
Creating tasks
Scheduler implementation
Supervisor calls
Cooperative scheduler
Concurrency and timeslices
Blocking tasks
Waiting for resources
Real-time scheduling
Synchronization
Semaphores
Mutexes
Priority inversion
System resource separation
Privilege levels
Memory segmentation
System calls
Embedded operating systems
OS selection
FreeRTOS
RIOT OS
Summary
Chapter 11: Trusted Execution Environment
Technical requirements
Sandboxing
TrustZone-M
Reference platform
Secure and non-secure execution domains
System resources separation
Security attributes and memory regions
Flash memory and secure watermarks
GTZC configuration and block-based SRAM protection
Configuring secure access to peripherals
Building and running the example
Enabling TrustZone-M
Secure application entry point
Compiling and linking secure-world applications
Compiling and linking non-secure applications
Inter-domain transitions
Summary
Index
About Packt
Other Books You May Enjoy

✦ Subjects


Embedded; Embedded Systems Architecture; IoT; RTOS; Microcontrollers; ARM Cortex-M; TLS; Trusted Execution Environment; TEE; Real-Time Operating Systems; Boot-Up Procedure; Memory Management; Local Bus Interfaces; Power Management; Distributed Systems; IoT Architecture; Parallel Tasks; Process Scheduling


πŸ“œ SIMILAR VOLUMES


Embedded Systems Architecture: Design an
✍ Daniele Lacamera πŸ“‚ Library πŸ› Packt Publishing 🌐 English

<p><span>Design safe and reliable software for embedded systems and explore the internals of device drivers, RTOS, and TEE</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Identify and overcome challenges in embedded environments</span></span></li><li><span><span>Understand and implem

Embedded and Networking Systems Design,
✍ Gul N. Khan (Author, Editor), Krzysztof Iniewski (Editor) πŸ“‚ Library πŸ“… 2013 πŸ› Chapman and HallCRC 🌐 English

Embedded and Networking Systems: Design, Software, and Implementation explores issues related to the design and synthesis of high-performance embedded computer systems and networks. The emphasis is on the fundamental concepts and analytical techniques that are applicable to a range of embedded and n

Embedded Systems: Architecture, Programm
✍ Raj Kamal πŸ“‚ Library πŸ“… 2009 πŸ› McGraw Hill Education 🌐 English

OVERVIEWS : This book, equally applicable for a CSE or ECE course, gives an extensive account of Embedded Systems, keeping a balanced coverage of hardware and software concepts. Adhering to syllabus needs, this title is 'microprocessor' and 'software des.

Fast and Effective Embedded Systems Desi
✍ Rob Toulson, Tim Wilmshurst πŸ“‚ Library πŸ“… 2012 πŸ› Newnes 🌐 English

This book is an introduction to embedded systems design, using the ARM mbed and C programming language as development tools.<br>The mbed provides a compact, self-contained and low-cost hardware core, and the on-line compiler requires no download or installation, being accessible wherever an internet

Fast and Effective Embedded Systems Desi
✍ Toulson, Rob;Wilmshurst, Tim πŸ“‚ Library πŸ“… 2016 πŸ› Newnes 🌐 English

<i>Fast and Effective Embedded Systems Design</i>is a fast-moving introduction to embedded systems design, applying the innovative ARM mbed and its web-based development environment. Each chapter introduces a major topic in embedded systems, and proceeds as a series of practical experiments, adoptin

Fast and Effective Embedded Systems Desi
✍ Rob Toulson, Tim Wilmshurst πŸ“‚ Library πŸ“… 2012 πŸ› Newnes 🌐 English

<p><i>Fast and Effective Embedded Systems Design</i> is a fast-moving introduction to embedded systems design, applying the innovative ARM mbed and its web-based development environment. Each chapter introduces a major topic in embedded systems, and proceeds as a series of practical experiments, ado