Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New merge #371

Closed
wants to merge 147 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
b529295
minor
XxChang Apr 9, 2022
a441afa
minor
XxChang Apr 10, 2022
eb96dd3
minor
XxChang Apr 10, 2022
9ad6fdf
minor
XxChang May 16, 2022
200f81b
Update install.md
XxChang May 16, 2022
e8a50ab
Update install.md
XxChang May 16, 2022
0a4efb0
minor
XxChang May 17, 2022
b081df8
minor
XxChang May 17, 2022
026fd46
Set theme jekyll-theme-cayman
XxChang May 17, 2022
d21f2be
minor
XxChang May 17, 2022
7c0f50e
Merge branch 'master' of /~https://github.com/XxChang/book
XxChang May 17, 2022
c4e7f64
minor
XxChang May 18, 2022
ca0b514
minor
XxChang May 18, 2022
5c2bad6
minor
XxChang May 21, 2022
3c632a7
minor
XxChang May 21, 2022
94364ff
minor
XxChang May 21, 2022
662bdc7
minor
XxChang May 21, 2022
c562f85
minor
XxChang May 21, 2022
6282ee3
minor
XxChang May 22, 2022
e699e79
minor
XxChang May 22, 2022
dee773b
minor
XxChang May 22, 2022
b2d23ae
minor
XxChang May 22, 2022
76366e9
minor
XxChang May 22, 2022
1a25493
minor
XxChang May 26, 2022
25969a1
minor
XxChang May 26, 2022
ad2c7de
minor
XxChang May 26, 2022
7585700
minor
XxChang May 26, 2022
9e80172
minor
XxChang May 26, 2022
f86445b
minor
XxChang May 26, 2022
3e4a24d
minor
XxChang May 27, 2022
697e2fc
minor
XxChang May 28, 2022
2c571db
minor
XxChang May 28, 2022
68fe3b5
minor
XxChang May 28, 2022
3905f7a
minor
XxChang May 28, 2022
f614105
minor
XxChang May 28, 2022
3f96b86
minor
XxChang May 30, 2022
357f175
minor
XxChang May 31, 2022
fe33b7e
minor
XxChang May 31, 2022
ff9eb3e
minor
XxChang Jun 1, 2022
6fc0afc
minor
XxChang Jun 1, 2022
af5f256
minor
XxChang Jun 1, 2022
2a59529
minor
XxChang Jun 2, 2022
dc11a04
minor
XxChang Jun 3, 2022
f50fe24
minor
XxChang Jun 3, 2022
5b76e73
minor
XxChang Jun 3, 2022
a10f6fa
minor
XxChang Jun 6, 2022
bc39bf9
minor
XxChang Jun 6, 2022
df7a0c0
minor
XxChang Jun 8, 2022
1e22ff4
minor
XxChang Jun 9, 2022
eede76c
minor
XxChang Jun 10, 2022
1763f15
minor
XxChang Jun 10, 2022
ca23085
minor
XxChang Jun 10, 2022
695627f
minor
XxChang Jun 11, 2022
48f1b53
minor
XxChang Jun 12, 2022
ce31b63
minor
XxChang Jun 12, 2022
6a6f32c
minor
XxChang Jun 12, 2022
03fc46c
minor
XxChang Jun 12, 2022
693b28e
minor
XxChang Jun 12, 2022
fe1beb9
minor
XxChang Jun 13, 2022
0ffc12c
minor
XxChang Jun 14, 2022
bcf969f
minor
XxChang Jun 16, 2022
29679b9
minor
XxChang Jun 16, 2022
d2afb21
minor
XxChang Jun 16, 2022
9a9439b
minor
XxChang Jun 16, 2022
bfc2824
minor
XxChang Jun 16, 2022
d4d5dd0
minor
XxChang Jun 16, 2022
e8c8097
minor
XxChang Jun 16, 2022
975a9e2
minor
XxChang Jun 16, 2022
9dd9f83
minor
XxChang Jun 16, 2022
7c44739
minor
XxChang Jun 18, 2022
11c3e9d
minor
XxChang Jun 18, 2022
b386b49
minor
XxChang Jun 18, 2022
2a5bc86
minor
XxChang Jun 18, 2022
ac1e9a7
minor
XxChang Jun 19, 2022
e90cc88
minor
XxChang Jun 19, 2022
13ef608
minor
XxChang Jun 20, 2022
c1e6565
minor
XxChang Jun 20, 2022
ba5e6a6
minor
XxChang Jun 20, 2022
825a1bd
minor
XxChang Jun 20, 2022
af86459
minor
XxChang Jun 20, 2022
467dbc5
minor
XxChang Jun 20, 2022
72a67ca
minor
XxChang Jun 20, 2022
48d7467
minor
XxChang Jun 20, 2022
e42f769
minor
XxChang Jun 20, 2022
9cfb9a0
minor
XxChang Jun 21, 2022
dace7b6
minor
XxChang Jun 21, 2022
b3e6d16
minor
XxChang Jun 21, 2022
f3850e1
minor
XxChang Jun 21, 2022
c82dd3c
minor
XxChang Jun 21, 2022
f80c40f
minor
XxChang Jun 21, 2022
baea491
minor
XxChang Jun 21, 2022
1d3f80d
minor
XxChang Jun 22, 2022
b1c9ccd
minor
XxChang Jun 22, 2022
e345ef5
minor
XxChang Jun 22, 2022
2cf4ac1
minor
XxChang Jun 22, 2022
0a7d73f
minor
XxChang Jun 22, 2022
9f5855c
minor
XxChang Jun 22, 2022
c1cf8fa
minor
XxChang Jun 22, 2022
6359737
minor
XxChang Jun 22, 2022
05eb63c
minor
XxChang Jun 22, 2022
4868bfe
minor
XxChang Jun 22, 2022
84799ad
minor
XxChang Jun 22, 2022
b99a8f3
minor
XxChang Aug 9, 2022
1090139
minor
XxChang Aug 16, 2022
b16f3f4
提交修改
XxChang Sep 26, 2022
4145316
修改
XxChang Sep 26, 2022
51f22f8
minor
XxChang Sep 28, 2022
f03d045
minor
XxChang Sep 28, 2022
4af032d
minor
XxChang Oct 13, 2022
e08766e
minor
XxChang Oct 13, 2022
a372235
minor
XxChang Oct 13, 2022
f27f2c0
minor
XxChang Oct 14, 2022
27d3705
minor
XxChang Oct 14, 2022
1f1e222
Merge branch 'master' of /~https://github.com/XxChang/book
XxChang Oct 14, 2022
0bf60da
minor
XxChang Oct 14, 2022
2e99bc8
minor
XxChang Oct 14, 2022
e44135e
minor
XxChang Oct 14, 2022
a9c13cf
minor
XxChang Oct 15, 2022
af9b018
minor
XxChang Oct 27, 2022
44643af
minor
XxChang Nov 19, 2022
1ea1d3a
minor
XxChang Nov 19, 2022
99eecc2
minor
XxChang Nov 19, 2022
a780133
minor
XxChang Nov 19, 2022
9607223
minor
XxChang Nov 21, 2022
c8a3b26
minor
XxChang Nov 25, 2022
67a9002
minor
XxChang Nov 25, 2022
bf8d03f
minor
XxChang Nov 29, 2022
cb1a02d
minor
XxChang Dec 12, 2022
3e17124
minor
XxChang Dec 13, 2022
8eb9ff4
minor
XxChang Jan 6, 2023
7cdec74
update intro
Narukara Jan 13, 2023
0c2d76b
modified start
Narukara Jan 14, 2023
58d1d03
modified concurrency & design-contracts
Narukara Jan 17, 2023
1cd5be8
Windows 安装部分汉化
AgainstWar Jan 18, 2023
16792ae
MacOS 安装部分汉化
AgainstWar Jan 19, 2023
8dfa242
Merge pull request #2 from AgainstWar/master
XxChang Jan 26, 2023
60991bd
Merge branch 'master' into patch-1
XxChang Jan 26, 2023
f070c11
Merge pull request #1 from Narukara/patch-1
XxChang Jan 26, 2023
6e7b145
fix typo
XxChang Jan 26, 2023
db49bdb
Merge branch 'master' of /~https://github.com/XxChang/book
XxChang Jan 26, 2023
0d8c55c
add language = "zh-CN"
Narukara Feb 10, 2023
cd92088
Merge pull request #3 from Narukara/patch-2
XxChang Feb 15, 2023
28b868d
minor
XxChang Aug 31, 2023
accb72b
Merge branch 'master' of /~https://github.com/XxChang/book
XxChang Aug 31, 2023
8dc5568
minor
XxChang Aug 31, 2023
d7ec793
minor
XxChang Sep 9, 2023
d4eb895
add new content
XxChang May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# The Embedded Rust Book
> 一本关于如何使用Rust编程语言在裸板上开发固件的中文文档

> Documentation on how to use the Rust Programming Language to develop firmware for bare metal (microcontroller) devices

This project is developed and maintained by the [Resources team][team].
这个项目由 [Resources team][team] 开发和维护。

See [the issue tracker] for more details. This book is a living document, and is updated continuously.

[the issue tracker]: /~https://github.com/rust-embedded/book/issues

## Online Copies of this Book

This book is located at https://docs.rust-embedded.org/book/
This book is located at https://xxchang.github.io/book/

## License

Expand Down
4 changes: 3 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[book]
authors = ["James Munns"]
language = "zh-CN"
multilingual = false
src = "src"
title = "The Embedded Rust Book"

[output.html]
git-repository-url = "/~https://github.com/rust-embedded/book"
# git-repository-url = "/~https://github.com/rust-embedded/book"
git-repository-url = "/~https://github.com/xxchang/book"
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
37 changes: 37 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Welcome to GitHub Pages

You can use the [editor on GitHub](/~https://github.com/XxChang/book/edit/master/docs/index.md) to maintain and preview the content for your website in Markdown files.

Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.

### Markdown

Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for

```markdown
Syntax highlighted code block

# Header 1
## Header 2
### Header 3

- Bulleted
- List

1. Numbered
2. List

**Bold** and _Italic_ and `Code` text

[Link](url) and ![Image](src)
```

For more details see [Basic writing and formatting syntax](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax).

### Jekyll Themes

Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](/~https://github.com/XxChang/book/settings/pages). The name of this theme is saved in the Jekyll `_config.yml` configuration file.

### Support or Contact

Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://support.github.com/contact) and we’ll help you sort it out.
74 changes: 37 additions & 37 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,52 @@ more information and coordination

-->

- [Introduction](./intro/index.md)
- [Hardware](./intro/hardware.md)
- [引言](./intro/index.md)
- [硬件](./intro/hardware.md)
- [`no_std`](./intro/no-std.md)
- [Tooling](./intro/tooling.md)
- [Installation](./intro/install.md)
- [工具](./intro/tooling.md)
- [安装](./intro/install.md)
- [Linux](./intro/install/linux.md)
- [MacOS](./intro/install/macos.md)
- [Windows](./intro/install/windows.md)
- [Verify Installation](./intro/install/verify.md)
- [Getting started](./start/index.md)
- [验证工具链的安装](./intro/install/verify.md)
- [开始](./start/index.md)
- [QEMU](./start/qemu.md)
- [Hardware](./start/hardware.md)
- [Memory-mapped Registers](./start/registers.md)
- [Semihosting](./start/semihosting.md)
- [Panicking](./start/panicking.md)
- [Exceptions](./start/exceptions.md)
- [Interrupts](./start/interrupts.md)
- [硬件](./start/hardware.md)
- [存储映射的寄存器](./start/registers.md)
- [半主机模式](./start/semihosting.md)
- [运行时恐慌(Panicking)](./start/panicking.md)
- [异常](./start/exceptions.md)
- [中断](./start/interrupts.md)
- [IO](./start/io.md)
- [Peripherals](./peripherals/index.md)
- [A first attempt in Rust](./peripherals/a-first-attempt.md)
- [The Borrow Checker](./peripherals/borrowck.md)
- [Singletons](./peripherals/singletons.md)
- [Static Guarantees](./static-guarantees/index.md)
- [Typestate Programming](./static-guarantees/typestate-programming.md)
- [Peripherals as State Machines](./static-guarantees/state-machines.md)
- [Design Contracts](./static-guarantees/design-contracts.md)
- [Zero Cost Abstractions](./static-guarantees/zero-cost-abstractions.md)
- [Portability](./portability/index.md)
- [Concurrency](./concurrency/index.md)
- [Collections](./collections/index.md)
- [Design Patterns](./design-patterns/index.md)
- [外设](./peripherals/index.md)
- [Rust尝鲜](./peripherals/a-first-attempt.md)
- [借用检查器](./peripherals/borrowck.md)
- [单例](./peripherals/singletons.md)
- [静态保障(static guarantees)](./static-guarantees/index.md)
- [类型状态编程](./static-guarantees/typestate-programming.md)
- [把外设当作状态机](./static-guarantees/state-machines.md)
- [设计约定](./static-guarantees/design-contracts.md)
- [零成本抽象](./static-guarantees/zero-cost-abstractions.md)
- [可移植性](./portability/index.md)
- [并发](./concurrency/index.md)
- [容器](./collections/index.md)
- [设计模式](./design-patterns/index.md)
- [HALs](./design-patterns/hal/index.md)
- [Checklist](./design-patterns/hal/checklist.md)
- [Naming](./design-patterns/hal/naming.md)
- [Interoperability](./design-patterns/hal/interoperability.md)
- [Predictability](./design-patterns/hal/predictability.md)
- [列表](./design-patterns/hal/checklist.md)
- [命名](./design-patterns/hal/naming.md)
- [互操性](./design-patterns/hal/interoperability.md)
- [可预见性](./design-patterns/hal/predictability.md)
- [GPIO](./design-patterns/hal/gpio.md)
- [Tips for embedded C developers](./c-tips/index.md)
- [给嵌入式C开发者的贴士](./c-tips/index.md)
<!-- TODO: Define Sections -->
- [Interoperability](./interoperability/index.md)
- [A little C with your Rust](./interoperability/c-with-rust.md)
- [A little Rust with your C](./interoperability/rust-with-c.md)
- [Unsorted topics](./unsorted/index.md)
- [Optimizations: The speed size tradeoff](./unsorted/speed-vs-size.md)
- [Performing Math Functionality](./unsorted/math.md)
- [互操性](./interoperability/index.md)
- [使用C的Rust](./interoperability/c-with-rust.md)
- [使用Rust的C](./interoperability/rust-with-c.md)
- [没有排序的主题](./unsorted/index.md)
- [优化: 速度与大小间的博弈](./unsorted/speed-vs-size.md)
- [执行数学运算](./unsorted/math.md)

---

[Appendix A: Glossary](./appendix/glossary.md)
[附录A: 词汇表](./appendix/glossary.md)
39 changes: 11 additions & 28 deletions src/appendix/glossary.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,47 @@
# Appendix A: Glossary
# 附录A: 词汇表

The embedded ecosystem is full of different protocols, hardware components and
vendor-specific things that use their own terms and abbreviations. This Glossary
attempts to list them with pointers for understanding them better.
嵌入式生态系统中充满了不同的协议,硬件组件,还有许多与生产商相关的东西,它们都使用自己的缩写和项目名。这个词汇表尝试列出它们以便更好理解它们。

### BSP

A Board Support Crate provides a high level interface configured for a specific
board. It usually depends on a [HAL](#hal) crate.
There is a more detailed description on the [memory-mapped registers page](../start/registers.md)
or for a broader overview see [this video](https://youtu.be/vLYit_HHPaY).
板级支持的Crate(Board Support Crate)提供为某个特定板子配置的高级接口。它通常依赖一个[HAL](#hal) crate 。在[存储映射的寄存器那页](../start/registers.md)有更多细节的描述或者看[这个视频](https://youtu.be/vLYit_HHPaY)来获取一个更广泛的概述。

### FPU

Floating-point Unit. A 'math processor' running only operations on floating-point numbers.
浮点单元(Floating-Point Unit)。一个只运行在浮点数上的'数学处理器'。

### HAL

A Hardware Abstraction Layer crate provides a developer friendly interface to a microcontroller's
features and peripherals. It is usually implemented on top of a [Peripheral Access Crate (PAC)](#pac).
It may also implement traits from the [`embedded-hal`](https://crates.io/crates/embedded-hal) crate.
There is a more detailed description on the [memory-mapped registers page](../start/registers.md)
or for a broader overview see [this video](https://youtu.be/vLYit_HHPaY).
硬件抽象层(Hardware Abstraction Layer) crate为微控制器的功能和外设提供一个开发者友好的接口。它通常在[Peripheral Access Crate (PAC)](#pac)之上被实现。它可能也会实现来自[`embedded-hal`](https://crates.io/crates/embedded-hal) crate的traits 。在[存储映射的寄存器那页](../start/registers.md)上有更多的细节或者看[这个视频](https://youtu.be/vLYit_HHPaY)获取一个更广泛的概述。

### I2C

Sometimes referred to as `I²C` or Inter-IC. It is a protocol meant for hardware communication
within a single integrated circuit. See [here][i2c] for more details
有时又被称为 `I²C` 或者 Intere-IC 。它是一种用于在单个集成电路中进行硬件通信的协议。看[这里][i2c]来获取更多细节。

[i2c]: https://en.wikipedia.org/wiki/I2c

### PAC

A Peripheral Access Crate provides access to a microcontroller's peripherals. It is one of
the lower level crates and is usually generated directly from the provided [SVD](#svd), often
using [svd2rust](/~https://github.com/rust-embedded/svd2rust/). The [Hardware Abstraction Layer](#hal)
would usually depend on this crate.
There is a more detailed description on the [memory-mapped registers page](../start/registers.md)
or for a broader overview see [this video](https://youtu.be/vLYit_HHPaY).
一个外设访问 Crate (Peripheral Access Crate)提供了对一个微控制器的外设的访问。它是一个底层的crates且通常从提供的[SVD](#svd)被直接生成,经常使用[svd2rust](/~https://github.com/rust-embedded/svd2rust/)。[硬件抽象层](#hal)应该依赖这个crate。在[存储映射的寄存器那页](../start/registers.md)有更细节的描述或者看[这个视频](https://youtu.be/vLYit_HHPaY)获取一个更广泛的概述。

### SPI

Serial Peripheral Interface. See [here][spi] for more information.
串行外设接口。看[这里][spi]获取更多信息。

[spi]: https://en.wikipedia.org/wiki/Serial_peripheral_interface

### SVD

System View Description is an XML file format used to describe the programmers view of a
microcontroller device. You can read more about it on
[the ARM CMSIS documentation site](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html).
系统视图描述文件(System View Description)是一个XML文件格式,以程序员视角来描述一个微控制器设备。你能在[the ARM CMSIS documentation site](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html)上获取更多信息。

### UART

Universal asynchronous receiver-transmitter. See [here][uart] for more information.
通用异步收发器。看[这里][uart]获取更多信息。

[uart]: https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter

### USART

Universal synchronous and asynchronous receiver-transmitter. See [here][usart] for more information.
通用同步异步收发器。看[这里][usart]获取更多信息。

[usart]: https://en.wikipedia.org/wiki/Universal_synchronous_and_asynchronous_receiver-transmitter
Loading
Loading