About the Authors |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Acknowledgments |
|
xvii | |
|
Chapter 1 Embedded Systems and Architectures |
|
|
1 | (26) |
|
|
1 | (3) |
|
The Architecture of a Generic Embedded System |
|
|
4 | (3) |
|
|
7 | (7) |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (2) |
|
|
20 | (1) |
|
Microcontrollers, Computers, and Hybrid Systems |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
22 | (3) |
|
|
25 | (1) |
|
Embedded Systems Platforms |
|
|
25 | (1) |
|
|
26 | (1) |
|
Chapter 2 Embedded Systems Software Development |
|
|
27 | (22) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
28 | (2) |
|
|
30 | (5) |
|
A Few Words About Security |
|
|
35 | (1) |
|
|
36 | (2) |
|
|
38 | (2) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
The Rust Embedded Devices Working Group |
|
|
41 | (2) |
|
Embedded Operating Systems and Frameworks |
|
|
43 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (2) |
|
Chapter 3 The Tock System Architecture |
|
|
49 | (42) |
|
|
49 | (1) |
|
A Few Words About Operating Systems |
|
|
50 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
52 | (1) |
|
The Tock System Architecture |
|
|
52 | (3) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (2) |
|
|
60 | (1) |
|
The Tock User Space Architecture |
|
|
61 | (1) |
|
|
62 | (3) |
|
|
65 | (10) |
|
|
75 | (5) |
|
|
80 | (4) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (2) |
|
|
91 | (70) |
|
|
91 | (1) |
|
|
92 | (2) |
|
|
94 | (1) |
|
|
95 | (3) |
|
|
98 | (4) |
|
|
102 | (4) |
|
|
106 | (2) |
|
|
108 | (1) |
|
Who Is Responsible for Deallocation? |
|
|
108 | (5) |
|
|
113 | (1) |
|
Generics and Trait Objects |
|
|
114 | (1) |
|
|
114 | (6) |
|
|
120 | (11) |
|
|
131 | (3) |
|
|
134 | (1) |
|
Null Values and Error Reporting |
|
|
135 | (6) |
|
Rust Concepts Used in Tock |
|
|
141 | (1) |
|
|
141 | (8) |
|
|
149 | (1) |
|
|
150 | (2) |
|
|
152 | (3) |
|
|
155 | (4) |
|
|
159 | (2) |
|
Chapter 5 Getting Started with Tock |
|
|
161 | (54) |
|
|
161 | (1) |
|
About the Tock Repository |
|
|
162 | (1) |
|
The Tock Project Structure |
|
|
163 | (3) |
|
The libtock-c and libtock-rs Repositories |
|
|
166 | (1) |
|
|
166 | (2) |
|
Environment Setup for Programming the micro:bit Device |
|
|
168 | (7) |
|
Install the Necessary Tools for the Raspberry Pi Pico |
|
|
175 | (7) |
|
Clone the Tock Kernel Source Code |
|
|
182 | (2) |
|
Clone Tock Additional Libraries |
|
|
184 | (2) |
|
Compile and Deploy the Tock Kernel and Applications |
|
|
186 | (2) |
|
Deploy the Tock Kernel on the micro:bit |
|
|
188 | (8) |
|
Hello World from micro:bit! |
|
|
196 | (4) |
|
Deploy the Tock Kernel on the Raspberry Pi Pico |
|
|
200 | (9) |
|
Hello World from Raspberry Pi Pico! |
|
|
209 | (4) |
|
|
213 | (2) |
|
Chapter 6 The Structure of a Custom Tock System |
|
|
215 | (16) |
|
Initialize the Kernel Component |
|
|
216 | (1) |
|
Link the Tock Kernel Repository |
|
|
216 | (1) |
|
Add the Board-Specific Folder |
|
|
217 | (3) |
|
Create the Drivers Folder |
|
|
220 | (2) |
|
Initialize the Userspace Component |
|
|
222 | (1) |
|
Link the libtock-c Repository |
|
|
223 | (1) |
|
Create the Applications Folder |
|
|
223 | (4) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
228 | (3) |
|
Chapter 7 Userspace Applications Development |
|
|
231 | (30) |
|
|
232 | (1) |
|
|
232 | (3) |
|
|
235 | (2) |
|
|
237 | (1) |
|
|
238 | (2) |
|
|
240 | (1) |
|
|
241 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
246 | (2) |
|
Human Interaction Libraries |
|
|
248 | (1) |
|
|
248 | (2) |
|
|
250 | (2) |
|
|
252 | (2) |
|
|
254 | (3) |
|
Persistent Data Storage Library |
|
|
257 | (3) |
|
|
260 | (1) |
|
Chapter 8 Synchronous Syscall Capsules |
|
|
261 | (72) |
|
|
261 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
A Closer Look at The System Call Interface |
|
|
264 | (1) |
|
|
265 | (4) |
|
The Command Return Structure |
|
|
269 | (1) |
|
|
269 | (1) |
|
|
270 | (2) |
|
|
272 | (3) |
|
|
275 | (2) |
|
|
277 | (2) |
|
|
279 | (5) |
|
Display Digits and Letters |
|
|
284 | (4) |
|
The Syscall API Implementation |
|
|
288 | (3) |
|
|
291 | (1) |
|
|
291 | (1) |
|
The Kernel Resources Trait |
|
|
291 | (8) |
|
|
299 | (5) |
|
The Digit Letter Display Capsule Registration |
|
|
304 | (9) |
|
Writing the Userspace Library |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
315 | (5) |
|
Using the Library Inside the Process |
|
|
320 | (2) |
|
Run the Project on the Raspberry Pi Pico |
|
|
322 | (1) |
|
|
322 | (3) |
|
|
325 | (6) |
|
|
331 | (1) |
|
|
332 | (1) |
|
Chapter 9 Asynchronous Syscall Capsules |
|
|
333 | (84) |
|
|
333 | (1) |
|
|
334 | (2) |
|
|
336 | (1) |
|
The subscribe System Call |
|
|
336 | (1) |
|
|
337 | (4) |
|
|
341 | (2) |
|
Asynchronous Tock Drivers |
|
|
343 | (2) |
|
|
345 | (1) |
|
Defining the Capsule's Data Structures |
|
|
346 | (16) |
|
|
362 | (4) |
|
|
366 | (5) |
|
|
371 | (10) |
|
|
381 | (8) |
|
The Userspace Library Implementation |
|
|
389 | (1) |
|
|
389 | (2) |
|
|
391 | (13) |
|
Writing an Example Application |
|
|
404 | (1) |
|
The Synchronous Application |
|
|
404 | (1) |
|
The Asynchronous Application |
|
|
405 | (3) |
|
Using the Raspberry Pi Pico |
|
|
408 | (6) |
|
|
414 | (3) |
|
Chapter 10 Service Capsules |
|
|
417 | (56) |
|
|
417 | (1) |
|
The Separation Between Syscall and Service Capsules |
|
|
418 | (3) |
|
|
421 | (2) |
|
The Architecture of the Capsule |
|
|
423 | (2) |
|
|
425 | (4) |
|
The Driver Implementation |
|
|
429 | (1) |
|
|
429 | (7) |
|
The TextScreen HIL Implementation |
|
|
436 | (13) |
|
The Text Displaying Process |
|
|
449 | (3) |
|
The Setup Syscall API Implementation |
|
|
452 | (2) |
|
|
454 | (6) |
|
|
460 | (1) |
|
|
461 | (1) |
|
|
462 | (3) |
|
Use the Raspberry Pi Pico |
|
|
465 | (5) |
|
|
470 | (3) |
|
Chapter 11 Tock Userspace Drivers |
|
|
473 | (18) |
|
|
473 | (1) |
|
The Tock Inter-Process Communication Library |
|
|
474 | (2) |
|
Use IPC to Implement a Userspace Driver |
|
|
476 | (1) |
|
|
476 | (8) |
|
|
484 | (4) |
|
|
488 | (1) |
|
|
489 | (2) |
|
Chapter 12 Tock Systems Management |
|
|
491 | (32) |
|
|
491 | (1) |
|
Use tockloader with the micro:bit |
|
|
492 | (3) |
|
|
495 | (1) |
|
Use tockloader with the Raspberry Pi Pico |
|
|
496 | (1) |
|
|
496 | (2) |
|
|
498 | (1) |
|
Install/Remove Applications |
|
|
499 | (1) |
|
|
500 | (1) |
|
|
501 | (1) |
|
|
501 | (1) |
|
|
502 | (1) |
|
|
502 | (1) |
|
|
503 | (1) |
|
Application Configurations |
|
|
504 | (1) |
|
Enable/Disable an Application |
|
|
505 | (1) |
|
|
506 | (1) |
|
|
506 | (3) |
|
Write a Custom FaultPolicy |
|
|
509 | (3) |
|
Override the Fault Handler |
|
|
512 | (2) |
|
|
514 | (1) |
|
|
515 | (1) |
|
|
516 | (1) |
|
|
517 | (1) |
|
Control the System Processes |
|
|
518 | (2) |
|
|
520 | (1) |
|
|
520 | (3) |
Index |
|
523 | |