File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ edition = '2018'
8
8
ruduino = { git = " https://github.com/avr-rust/ruduino" , branch = " master" }
9
9
10
10
[profile .release ]
11
+ opt-level = ' z'
11
12
lto = true
13
+ strip = true
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Designed for the ATmega328p.
12
12
13
13
* A recent version of the nightly Rust compiler. Anything including or
14
14
greater than ` rustc 1.63.0-nightly (fee3a459d 2022-06-05) ` can be used.
15
+ * A recent version of Cargo. At least 1.52.0 or greater.
15
16
* The rust-src rustup component - ` $ rustup component add rust-src `
16
17
* AVR-GCC on the system for linking
17
18
* AVR-Libc on the system for support libraries
@@ -22,18 +23,11 @@ Designed for the ATmega328p.
22
23
Now to build, run:
23
24
24
25
``` bash
25
- rustup override set nightly
26
-
27
26
# Ensure time delays are consistent with a 16MHz microcontroller.
28
27
export AVR_CPU_FREQUENCY_HZ=16000000
29
28
30
29
# Compile the crate to an ELF executable.
31
- cargo build -Z build-std=core --target avr-atmega328p.json --release
32
-
33
- # Note: there is work in progress to make that easier
34
- # peeking in .cargo/config.tom will show that
35
- # cargo build --release
36
- # is the short version
30
+ cargo build --release
37
31
```
38
32
There should now be an ELF file at ` target/avr-atmega328p/release/blink.elf ` . It
39
33
can be flashed directly to an AVR microcontroller or ran inside a simulator.
Original file line number Diff line number Diff line change
1
+ [toolchain ]
2
+ channel = " nightly"
You can’t perform that action at this time.
0 commit comments