Code
On more recent Rust versions (after update to LLVM 23, I assume), I no longer can build some bare-metal projects.
There are errors such as
= note: rust-lld: error: undefined symbol: __aeabi_uread4
>>> referenced by mod.rs:1758 (src\ptr\mod.rs:1758)
Also mentioning __aeabi_uread8, __aeabi_uwrite4, __aeabi_uread8.
This only happens with option opt-level = "z" AND build-std enabled.
.cargo/cargo.toml:
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
# replace STM32G0B1RETx with your chip as listed in `probe-rs chip list`
runner = "probe-rs run --chip STM32G0B1RETx"
[build]
target = "thumbv6m-none-eabi"
[env]
DEFMT_LOG = "trace"
[unstable]
build-std = ["core"]
Problem can be easily reproduced on embassy project examples
e.g. (https://github.com/embassy-rs/embassy/blob/main/examples/stm32g0/src/bin/blinky.rs)
This example's target is thumbv6m-none-eabi.
Version it worked on
It most recently worked on: Rust 1.95
Version with regression
rustc --version --verbose:
rustc 1.100.0-nightly (2e2b193f8 2026-09-02)
Code
On more recent Rust versions (after update to LLVM 23, I assume), I no longer can build some bare-metal projects.
There are errors such as
Also mentioning
__aeabi_uread8,__aeabi_uwrite4,__aeabi_uread8.This only happens with option
opt-level = "z"ANDbuild-stdenabled..cargo/cargo.toml:
Problem can be easily reproduced on embassy project examples
e.g. (https://github.com/embassy-rs/embassy/blob/main/examples/stm32g0/src/bin/blinky.rs)
This example's target is
thumbv6m-none-eabi.Version it worked on
It most recently worked on: Rust 1.95
Version with regression
rustc --version --verbose: