
RP2040 Assembly Language Programming: ARM Cortex-M0+ on the Raspberry Pi Pico
Stephen Smith
Résumé
There are eight new Programmable I/O (PIO) coprocessors that have their own specialized Assembly Language supporting a wide variety of interface protocols. You'll explore these protocols and write programs or functions in Assembly Language and interface to all the various bundled hardware interfaces. Then go beyond working on your own board and projects to contribute to the official RP2040 SDK. Finally, you'll take your DIY hardware projects to the next level of performance and functionality with more advanced programming skills.
What You'll Learn
- Read and understand the Assembly Language code that is part of the Pico's SDK
- Integrate Assembly Language and C code together into one program
- Interface to available options for DIY electronics and IoT projects
Who This Book Is For
Makers who have already worked with microcontrollers, such as the Arduino or Pico, programming in C or Python. Those interested in going deeper and learning how these devices work at a lower level, by learning Assembly Language.
About the Raspberry Pi Pico
About the Host Computer
How to Solder and Wire
How to Install Software
A Simple Program to Ensure Things are Working
Chapter 2: Our First Assembly Language Program
About the ARM Processor
Computers and Numbers
CPU Registers
ARM Instruction Format
RP2040 Memory
About the GCC Assembler
Flashing LEDs in Assembly Language
Chapter 3: How to Build and Debug Programs
CMake
GNU Make
Print Statements
GDB
Chapter 4: Loading and Adding
Negative Numbers
Little Endian Format
How to Shift and Rotate
MOV/MVN
ADD/ADC
SUB/SBC
Chapter 5: How to Controll Program Flow
Unconditional Branch
About the CPSR
Branch on Condition
About the CMP Instruction
Loops
If/Then/Else
Logical Operators
Design Patterns
Chapter 6: Thanks for the Memories
How to Define Memory Contents
How to Load a Register
PC Relative Addressing
How to Load from Memory
How to Index Through Memory
How to Store a Register
Hardware as Memory
Introduction to DMA
Chapter 7: How to Call Functions and Use the Stack
The Stack
Branch with Link
How to Nest Function Calls
Function Parameters and Return Values
How to Manage the Registers
Summary of the Function Call Algorithm
Stack Frames
Chapter 8: Interacting with C and the SDK
How to Call C Routines
How to Call Assembly Routines from C
How to Deal with Inline C Routines
How to Use SDK Header Files
Chapter 9: How to Program the Built-in Hardware
The GPIO Pins
Analog to Digital
PWM
Chapter 10: How to Set and Catch Interrupts
Overview
How to Create an Interrupt Handler
Timers Example
Chapter 11: How to Initialize and Interact with Programmable I/O
Overview
SDK Support
PIO Instructions
How to Control Timing
Examples
Chapter 12: How to Connect Pico to IoT
Connectivity Options
Using a UART or I2C
Internet Basics
Security
Chapter 13: Multiplication, Division and Floating Point
Multiplication Coprocessor
Division Coprocessor
Interpolation
Floating Point Library
Chapter 14: Multiprocessing
Using Both CPU Cores
How to Synchronize and Share Resources
Audience: Intermediate
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Apress |
Auteur(s) | Stephen Smith |
Parution | 27/10/2021 |
Nb. de pages | 320 |
EAN13 | 9781484277522 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse