You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ad78adb
Browse filesBrowse the repository at this point in the historyBrowse files
-**CH32 example binaries** — nightly, for `-Zbuild-std` on `riscv32ec-unknown-none-elf` (V003 / V00x) or the stable `riscv32imc-unknown-none-elf` target (V103).
40
+
Everything builds and is tested on nightly, edition 2024: the library crates (`lib/`, `cli/`, `ch32/`) and the CH32 examples. The V003 / V00x examples need it for `-Zbuild-std` on `riscv32ec-unknown-none-elf`; the V103 examples use the built-in `riscv32imc-unknown-none-elf` target with linker relaxation (`+relax`), which stable rustc warns about as an unstable target feature.
42
41
43
-
Each example workspace pins its toolchain via `rust-toolchain.toml`.
42
+
The repository root and each example workspace pin nightly via `rust-toolchain.toml`.
Copy file name to clipboardExpand all lines: docs/design.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ To build your bootloader, you create a small crate with a `main.rs` that wires u
23
23
24
24
Beyond the usual Cargo profile tricks (`opt-level = "z"`, LTO, `codegen-units = 1`, `panic = "abort"`), fitting a real bootloader in 1920 bytes required more deliberate choices:
25
25
26
+
-**Linker relaxation and WCH compressed opcodes** - the examples enable `+relax`, so the linker shrinks every `auipc`+`jalr` call pair to `jal` or `c.jal`, and on QingKe V2 cores (V003, V00x) `+xwchc`, WCH's 16-bit byte and halfword loads and stores. Together they take the V003 bootloader from 1898 to 1710 bytes. QingKe V3A (V103) has no XW extension, so its example enables only `+relax`.
26
27
-**No HAL crates** — bare metal register access via PAC crates only; HAL abstractions are too expensive for this budget.
27
28
-**Custom runtime** — `tinyboot-ch32-rt` replaces `qingke-rt` in the bootloader; its startup is just GP/SP init and a jump to main (20 bytes of assembly instead of ~1.4KB of full runtime).
28
29
-**Symmetric frame format** — the same `Frame` struct is used for both requests and responses with one shared parse and format path, eliminating code duplication.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ cargo install wlink
24
24
cargo install tinyboot
25
25
```
26
26
27
-
The CH32V003 examples use `riscv32ec-unknown-none-elf`, which is a Tier 3 target that `-Zbuild-std` builds on the fly — nightly is required. CH32V103 examples use the stable`riscv32imc-unknown-none-elf` target.
27
+
The CH32V003 examples use `riscv32ec-unknown-none-elf`, which is a Tier 3 target that `-Zbuild-std` builds on the fly — nightly is required. CH32V103 examples use the built-in`riscv32imc-unknown-none-elf` target, also on nightly like every tinyboot build.
Copy file name to clipboardExpand all lines: docs/porting-series.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,7 @@ Then flash to hardware using `wlink` and walk through the [standard test sequenc
188
188
189
189
Add the new series to `.github/workflows/ci.yml`. Each series has its own job with a matrix of variants. The CI runs `cargo fmt`, `cargo clippy`, and `cargo build --release` for both `system-flash` and `user-flash` modes on every variant. This ensures formatting, lint, compilation, and that the bootloader fits within the system flash region.
190
190
191
-
Add a new job following the pattern of the existing series jobs. Use the V003 job as a template for custom-target chips (nightly + `-Zbuild-std`) or the V103 job for standard-target chips (stable + `rustup target add`).
191
+
Add a new job following the pattern of the existing series jobs. Use the V003 job as a template for custom-target chips (nightly + `-Zbuild-std`) or the V103 job for standard-target chips (nightly with the target added).
0 commit comments