The Insider’s Guide to Arm Cortex-M Development: Leverage embedded software development tools and examples to become an efficient Cortex-M developer

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn and implement the latest Arm Cortex-M microcontroller development concepts such as performance optimization, security, software reuse, machine learning, continuous integration, and cloud-based development from industry experts

Key Features

  • Learn how to select the best Cortex-M hardware, software, and tools for your project
  • Understand the use of key software components and how to optimize and test modern applications
  • Get hands-on experience implementing quality software using example code provided in the book
  • Purchase of the print or Kindle book includes a free eBook in the PDF format

Book Description

As Cortex-M continues to expand with the introduction of new microcontrollers based on the Cortex-M55 and Cortex-M85, there’s a vast sea of software concepts, such as standardized software reuse, that have emerged alongside new topics like security and machine learning. Additionally, with significant advancement in development methodologies, more embedded development taking place in the cloud, and increased levels of automation, an engineer can no longer be expected to understand an entire project or possess all the necessary skills. With insider insight, this book covers the latest concepts in microcontroller development and helps you navigate easily.

In the first part of this guide, you’ll learn how to select the ideal set of hardware, software, and tools for your specific project. In the next part, you’ll explore how to implement essential topics for modern embedded developers. Throughout the book, you’ll work through examples covering real Cortex-M devices with all software available on GitHub, effectively helping you gain experience with the small Cortex-M0+, the powerful Cortex-M55, and more Cortex-M processors.

After reading this book, you’ll be ready to apply modern Cortex-M software development concepts practically.

What you will learn

  • Select the right Arm Cortex-M microcontroller for your project
  • Discover how to leverage existing software to save time
  • Explore software tools to create, build, and execute software
  • Understand machine learning from an embedded developer’s perspective
  • Benchmark and optimize microcontroller software applications
  • Implement continuous integration frameworks for embedded software testing
  • Analyze and implement security using TrustZone and Trusted Firmware-M
  • Leverage cloud-based tools to automate and increase efficiency

Who This Book Is For

This book is for practicing engineers and students working with embedded and IoT systems who want to quickly learn how to develop quality software for Arm Cortex-M processors without reading long technical manuals. If you’re looking for a book that explains C or assembly language programming for the purpose of creating a single application or mastering a type of programming such as digital signal processing algorithms, then this book is NOT for you. A basic understanding of embedded hardware and software, along with general C programming skills will assist with understanding the concepts covered in this book.

Table of Contents

  1. Selecting the Right Hardware
  2. Selecting the Right Software
  3. Selecting the Right Tools
  4. Booting to Main
  5. Optimizing Performance
  6. Leveraging Machine Learning
  7. Enforcing Security
  8. Streamlining with the Cloud
  9. Implementing Continuous Integraion
  10. Looking Ahead

Author(s): Zachary Lasiuk, Pareena Verma, Jason Andrews
Edition: 1
Publisher: Packt Publishing
Year: 2022

Language: English
Commentary: Publisher PDF
Pages: 261
City: Birmingham, UK
Tags: Arm Cortex-M; Embedded Software Development; Microcontroller Development; TrustZone; TF-M

Cover
Title Page
Copyright and credits
Contributors
Table of Contents
Preface
Part 1: Get Set Up
Chapter 1: Selecting the Right Hardware
Processor selection through use cases
Medical wearable
Industrial flow sensor
IoT sensor
ML
Processor selection based on performance and power
Power
DSP performance
ML performance
Security
Safety
Cost
Microcontroller development boards
Suppliers
Selecting development boards
Performance
Power
Peripherals
Summary
Further reading
Chapter 2: Selecting the Right Software
Overview of bare-metal software
Overview of RTOSs
Exploring middleware and libraries
CMSIS
DSP libraries
ML frameworks and libraries
Understanding secure software
PSA
Trusted Firmware for Cortex-M
Implementing safe software
Example software stacks for common use cases
Medical wearable
Industrial flow sensor
IoT sensor
ML
Introducing SDKs for Cortex-M
Purpose of an SDK
Language bindings
Middleware
Cloud connectors
Security and encryption
Development tools
Build systems
Lower-level considerations
Looking at some available SDKs
Raspberry Pi
NXP
ST
Summary
Further reading
Chapter 3: Selecting the Right Tools
Examining development platforms
Software-centric development platforms
Hardware-centric development platforms
Metrics for evaluating development platforms
Exploring compilers
Arm Compiler for Embedded
Arm Compiler for Embedded FuSa
GNU Arm Embedded Toolchain
Navigating IDEs
Keil MDK
Arm Development Studio
IAR Embedded Workbench for Arm
Arduino IDE
Visual Studio Code
Understanding development environments
Interactive versus automated development
Local environments
Virtual environments
Cloud environments
Summary
Further reading
Part 2: Sharpen Your Skills
Chapter 4: Booting to Main
The basics of hello world
Arm Virtual Hardware using the Cortex-M55
Running hello world
Startup code
Memory mapping
I/O mechanisms
NXP LPC55S69-EVK using the Cortex-M33
Running Blinky
Startup code
Memory mapping
I/O mechanisms
The Raspberry Pi Pico using the Cortex-M0+
Running hello world and Blinky
Starting from scratch
I/O mechanisms
Startup code
I/O mechanisms (using the UARTs this time)
Debugging tips
Summary
Further reading
Chapter 5: Optimizing Performance
Our algorithm – the dot product
Measuring cycle count
System Tick Timer
Data Watchpoint and Trace
Measuring dot product performance
Using the Raspberry Pi Pico
Using NXP LPC55S69-EVK
Using Arm Virtual Hardware
Optimization takeaways
Processor performance
Compilers
Compiler flags
Source code / algorithm implementation
Summary
Further reading
Chapter 6: Leveraging Machine Learning
Understanding the ML application life cycle
Investigating ML frameworks and libraries
TensorFlow Lite for Microcontrollers
CMSIS-NN
TinyML
Exploring ML use cases
Anomaly detection – vibration
Image classification – vision
Micro speech – voice
Summary
Further reading
Chapter 7: Enforcing Security
Breaking down PSA
Analyze – threat modeling and the 10 security goals
Architect – References, suggestions, and APIs
Implement – Creating a secure system
Certify – PSA certification levels
Example 1 – Secure versus non-secure hello world
Obtaining and building the application
Switching security states
Calling a secure function from a non-secure state
Example 2 – TF-M
Obtaining and building the application
Running the test suite
Analyzing a RoT service connection test
Summary
Further reading
Chapter 8: Streamlining with the Cloud
The fundamentals of cloud development
Coding and containers in the cloud
Using VS Code via github.dev
Dev containers
Dev container services
Initializing Gitpod
Workspace images
A crash course on containers
Creating a Dockerfile
Building and storing the containers
Building arguments and multi-architecture support
Running the dev containers
Integrating dev containers with VS Code
Executing software and debugging in the cloud
Creating a custom Gitpod image
Running and debugging
Getting to know Keil Studio Cloud
Other cloud development possibilities
Cloud virtual machines
Virtual desktop in VM
Summary
Further reading
Chapter 9: Implementing Continuous Integration
Understanding the value of CI
Why embedded software CI can be challenging
Replacing board farms with virtual farms
Examples of CI flows
1 – Simple test scripts
2 – In-house board farm setup
3 – A virtual farm with AVH
Summary
Further reading
Chapter 10: Looking Ahead
The now – tips to being a great developer
The cloud
Testing, CI, and safety
Exploring useful examples and code
Official Arm projects under development
The future – how trends will affect Cortex-M developers
Trend 1 – 5G and the Internet of Everything
Trend 2 – environmental sustainability
Trend 3 – decentralization of information
The end
Index
Other Books You May Enjoy