Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorElecia White

Interested in developing embedded systems? Since they don't tolerate inefficiency, these systems require a disciplined approach to programming. This easy-to-read guide helps you cultivate good development practices based on classic software design patterns and new patterns unique to embedded programming. You'll learn how to build system architecture for processors, not for operating systems, and you'll discover techniques for dealing with hardware difficulties, changing designs, and manufacturing requirements. Written by an expert who has created systems ranging from DNA scanners to children's toys, this book is ideal for intermediate and experienced programmers, no matter what platform you use. This expanded second edition includes new chapters on IoT and networked sensors, motors and movement, debugging, data handling strategies, and more. • Optimize your system to reduce cost and increase performance • Develop an architecture that makes your software robust in resource-constrained environments • Explore sensors, displays, motors, and other I/O devices • Reduce RAM and power consumption, code space, and processor cycles • Learn how to interpret schematics, datasheets, and power requirements • Discover how to implement complex mathematics and machine learning on small processors • Design effective embedded systems for IoT and networked sensors

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, pattern-driven guide to building reliable embedded software on resource-constrained processors, written for intermediate and experienced programmers who want to move beyond "it compiles" toward disciplined, maintainable design. If you write firmware for devices where RAM, power, and cycles are scarce, this book gives you the architecture vocabulary and hardware instincts to do it well. 【Book Arc】 - **Opening (~0%–10%)**: Sets the mindset — embedded systems tolerate no inefficiency, so good design patterns and disciplined practices matter. Introduces the book's story-like, cover-to-cover approach and previews the expanded second-edition topics (IoT, motors, debugging, data handling). - **Early (~10%–30%)**: Builds the foundation of embedded development — cross-compilation and cross-debugging (JTAG), what happens before `main`, and how to sketch a **system architecture** using block diagrams, module boundaries, and patterns like the singleton for shared resources such as logging. - **Middle (~30%–55%)**: Gets hands-on with hardware — reading datasheets as "API manuals for peripherals," interpreting schematics (junctions, pull-ups, LEDs, switches), and using an oscilloscope to observe real signals. Emphasizes writing hardware verification tests that later evolve into manufacturing tests. - **Late (~55%–80%)**: Moves into managing activity and communication — time-based events, a very small scheduler, polling vs. interrupts, active objects, and peripheral protocols (TTL/RS-232 serial, SPI, I2C/TWI, 1-Wire, parallel, USB), with worked examples like an external ADC over SPI. - **Ending (~80%–100%)**: Consolidates practice — debugging techniques, data-handling strategies, and applying complex math or machine learning on small processors, plus designing IoT and networked-sensor systems. (Excerpts do not cover the final chapters in detail.) 【Key Takeaways】 - **Architecture is drawn before it is coded** (Early): block diagrams, module interfaces, and object layering (e.g., SPI → flash → display assets) expose dependencies early and prevent tangled firmware. - **Model drivers on Unix conventions** (Early): `open`/`close`/`read`/`write`/`ioctl`-style interfaces make device code reusable and predictable to other engineers, even without an OS. - **Encapsulate globals in structures** (Early): wrapping loose variables into a struct (and optionally malloc'ing it at init) gives C code object-like behavior and cleaner module boundaries. - **Treat each chip as a software library** (Middle): datasheets are the API manuals; learning a processor takes as long as learning a framework, so know which subset of the documentation matters before diving in. - **Read schematics selectively** (Middle): focus on boxes, processor-connected LEDs/switches, and pull-ups; ignore analog details until you actually need them, and ask your EE when unsure. - **Hardware tests pay dividends** (Middle): verification code written for bring-up tends to persist and evolve into manufacturing tests, so invest in it early. - **Interrupts and scheduling are core flow-control tools** (Late): understanding polling vs. timer interrupts, event-driven design, and a minimal scheduler is what makes responsive embedded systems possible. - **Peripheral protocols are a design choice, not a default** (Late): SPI, I2C/TWI, 1-Wire, serial, and USB each carry trade-offs in speed, wiring, and complexity — pick deliberately. 【Reading Tips】 - **Read in order the first time.** The author explicitly designed the book as a story; skipping to a chapter loses context and the reasoning behind patterns. - **Deep-read the architecture and datasheet/schematic chapters (Early–Middle).** These are the highest-leverage skills and the hardest to pick up on the job. - **Skim the protocol catalog (Late) on first pass**, then return to the specific protocol you're implementing — it's reference-friendly by design. - **Engage with the code even if you don't program along.** The examples are C/C++, but the design principles transcend language; read for structure, not syntax. - **Keep it near your bench.** The author intends it as a wizard's reference for when you're "hip-deep in alligators" and need a command table or fixed-point implementation fast. 【Coverage Limits】 This guide is synthesized from stratified excerpts covering roughly the first half of the book in detail; later chapters (debugging, data handling, math/ML on small processors, IoT) are referenced but not deeply represented, so their specifics are not summarized here.
Page 5
148 6. Managing the Flow of Activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Scheduling and Operatin...
View in text
Excerpt 2
n change the timing of the Embedded Systems Development | 3 I am a decent typist on my own, but if someone watches over my shoulder, I end up with every othe...
View in text
Excerpt 3
use another design pattern, this one called the singleton. When it is important that a class have exactly one instance, the singleton pattern is commonly see...
View in text
Excerpt 4
cialized probes. On the other hand, many hardware engineers put test points on their board, knowing that the software team is likely to need access to partic...
View in text
Excerpt 5
ut that defeats the goal of modifying that code less. If we have the main file always include a generic ioMapping.h, we can switch the versions in the main f...
View in text
Excerpt 6
r linker variable is located where the user manual says the vector table should be (0x00000000). Inside the array of void * elements, there is the location f...
View in text
Excerpt 7
inexplicably press it. So tables like these not only aided implementation and documentation, they were critical to designing the game play. Defining the syst...
View in text
Excerpt 8
ough you won’t usually do that). Serial Communication | 191 The system can go faster if the hardware supports a FIFO (first in, first out) queue. This provid...
View in text
Tags
AI categories
ProgrammingSoftwareIoT
嵌入式系统
ISBN: 1098151542
Publisher: O'Reilly Media
Publish Year: 2024
Language: English
Pages: 428
File Format: PDF
File Size: 10.3 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…