File tree 1 file changed +45
-0
lines changed
1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 教程 07 - 时间戳
2
+
3
+ ## tl;dr
4
+
5
+ - 我们为计时器硬件添加了抽象,并在` _arch/aarch64 ` 中实现了ARM架构计时器。
6
+ - 新的计时器函数用于给UART打印添加时间戳,并且用于消除` GPIO ` 设备驱动中基于周期的延迟,从而提高准确性。
7
+ - 添加了` warn!() ` 宏。
8
+
9
+ ## 测试它
10
+
11
+ 请通过 chainboot 进行检查(在上一个教程中添加)。
12
+ ``` console
13
+ $ make chainboot
14
+ [...]
15
+ Minipush 1.0
16
+
17
+ [MP] ⏳ Waiting for /dev/ttyUSB0
18
+ [MP] ✅ Serial connected
19
+ [MP] 🔌 Please power the target now
20
+
21
+ __ __ _ _ _ _
22
+ | \/ (_)_ _ (_) | ___ __ _ __| |
23
+ | |\/| | | ' \| | |__/ _ \/ _` / _` |
24
+ |_| |_|_|_||_|_|____\___/\__,_\__,_|
25
+
26
+ Raspberry Pi 3
27
+
28
+ [ML] Requesting binary
29
+ [MP] ⏩ Pushing 12 KiB =========================================🦀 100% 0 KiB/s Time: 00:00:00
30
+ [ML] Loaded! Executing the payload now
31
+
32
+ [ 0.143123] mingo version 0.7.0
33
+ [ 0.143323] Booting on: Raspberry Pi 3
34
+ [ 0.143778] Architectural timer resolution: 52 ns
35
+ [ 0.144352] Drivers loaded:
36
+ [ 0.144688] 1. BCM PL011 UART
37
+ [ 0.145110] 2. BCM GPIO
38
+ [W 0.145469] Spin duration smaller than architecturally supported, skipping
39
+ [ 0.146313] Spinning for 1 second
40
+ [ 1.146715] Spinning for 1 second
41
+ [ 2.146938] Spinning for 1 second
42
+ ```
43
+
44
+ ## 相比之前的变化(diff)
45
+ 请检查[ 英文版本] ( README.md#diff-to-previous ) ,这是最新的。
You can’t perform that action at this time.
0 commit comments