Skip to content

Commit 5595c19

Browse files
author
dcz
committed
Readme: Build instructions without rustup
1 parent e8f4c4b commit 5595c19

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[target.riscv32imac-unknown-none-elf]
2+
linker='lld'
23
runner = 'riscv64-unknown-elf-gdb -x openocd.gdb'
34
rustflags = [
45
"-C", "link-arg=-Tmemory-c8.x",

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@ To build all the provided examples run
5656
cargo build --examples --release --all-features
5757
```
5858

59+
#### Building everything including core
60+
61+
An option for using only distribution packaging, no rustup, is to let the compiler pretend it's unstable and build the `core` crate.
62+
63+
Install rust and its sources, and the lld linker.
64+
65+
Fedora:
66+
67+
```
68+
sudo dnf install rust rust-src lld
69+
```
70+
71+
In `.cargo/config` add:
72+
73+
```
74+
[target.riscv32imac-unknown-none-elf]
75+
linker = 'lld'
76+
```
77+
78+
Use the following command to build:
79+
80+
```
81+
RUSTC_BOOTSTRAP=1 cargo build -Z build-std --examples --release --all-features
82+
```
83+
5984
### Using dfu-util for Flashing
6085

6186
The GD32VF103 contains a [DFU](https://www.usb.org/sites/default/files/DFU_1.1.pdf)

0 commit comments

Comments
 (0)