Skip to content

Commit bc7e471

Browse files
committed
Add cargo build profiles to optimize for size
Fixes issue where some examples will not build using memory-c8.x due to flash size constraints
1 parent ce7631e commit bc7e471

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.cargo/config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ rustflags = [
77

88
[build]
99
target = "riscv32imac-unknown-none-elf"
10+
11+
[profile.release]
12+
opt-level = "z" # Optimize for size.
13+
codegen-units = 1
14+
lto = true
15+
16+
[profile.dev]
17+
opt-level = "z" # Optimize for size.

0 commit comments

Comments
 (0)