Skip to content

Commit 2816089

Browse files
committed
docs(13): the board-support example uses the one table
The chapter taught [xlings] deps as the way a board package declares its emulator. The declaration is the same statement; only the table changed, and the older spelling still works and says so.
1 parent e790ea4 commit 2816089

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

docs/13-baremetal.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,12 @@ for hosted targets, the `--no-runner` escape and the not-run reporting of
560560
## Writing a board-support package
561561

562562
A board-support package is an ordinary mcpp package. It declares the emulator
563-
it needs under `[xlings] deps`, exports one C++ module for consumers, and emits
564-
its board facts from `build.mcpp`.
563+
it needs under `[xlings.workspace]`, exports one C++ module for consumers, and
564+
emits its board facts from `build.mcpp`.
565565

566-
**A declaration under `[xlings] deps` provisions the package on the first
567-
build** (since 2026.8.29). It is also what lets `mcpp::xpkg_dir` answer *"where
566+
**A declaration there provisions the package on the first build** (since
567+
2026.8.29; the table is `[xlings.workspace]` since 2026.9.3.1, and the older
568+
`[xlings] deps` still works and says so). It is also what lets `mcpp::xpkg_dir` answer *"where
568569
did that package land"*. Both halves matter: the same declaration installs the
569570
emulator and tells the build program where it went.
570571

@@ -669,8 +670,8 @@ int main() {
669670
The package's manifest declares the emulator and nothing else:
670671

671672
```toml
672-
[xlings]
673-
deps = ["xim:qemu-riscv@9.2.4-1"]
673+
[xlings.workspace]
674+
qemu-riscv = "xim:9.2.4-1"
674675
```
675676

676677
Linking `clang_rt.builtins` is not optional on this board. picolibc formats

docs/zh/13-baremetal.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,11 @@ error: no runner is configured for 'riscv64-none-elf' — a freestanding artifac
500500

501501
## 编写板级支持包
502502

503-
板级支持包是一个普通的 mcpp 包。它在 `[xlings] deps` 下声明所需的模拟器,为消费者
503+
板级支持包是一个普通的 mcpp 包。它在 `[xlings.workspace]` 下声明所需的模拟器,为消费者
504504
导出一个 C++ 模块,并从 `build.mcpp` 发出它的板级事实。
505505

506-
**`[xlings] deps` 里的声明会在首次构建时供给该包**(2026.8.29 起)。它同时让
506+
**那里的声明会在首次构建时供给该包**(2026.8.29 起;这张表自 2026.9.3.1 起是
507+
`[xlings.workspace]`,旧的 `[xlings] deps` 仍然生效并会说明这一点)。它同时让
507508
`mcpp::xpkg_dir` 能回答「那个包落在哪」。两半都要紧:同一条声明既装上模拟器,也告诉
508509
构建程序它装到了哪。
509510

@@ -601,8 +602,8 @@ int main() {
601602
该包的清单只声明模拟器,别无其他:
602603

603604
```toml
604-
[xlings]
605-
deps = ["xim:qemu-riscv@9.2.4-1"]
605+
[xlings.workspace]
606+
qemu-riscv = "xim:9.2.4-1"
606607
```
607608

608609
在这块板子上链接 `clang_rt.builtins` 不是可选项。picolibc 通过 ryu 格式化浮点值,

0 commit comments

Comments
 (0)