embassy-rs/embassy · error
Double precision operations require V2 bootrom
Error message
Double precision operations require V2 bootrom (found: V{}) What it means
The RP2040 boot ROM contains a double-precision float table ("SD") only in V2+ bootroms. `soft_double_table()` panics if `rom_version_number()` is less than 2, because calling the double-precision ROM functions on a V1 bootrom would look up garbage addresses. This is a deliberate fail-fast guard, not a runtime fault.
Solutions
- Check the bootrom version at startup with `rom_data::rom_version_number()` before using any f64 ROM functions and fall back to a software double implementation if it is < 2
- Use a board/chip with the V2 bootrom (virtually all RP2040s manufactured after 2021)
- Perform software floating point instead of the ROM table (e.g. disable the rom-func usage and rely on compiler-rt soft-float, or cast through fixed-point)
- Read the actual ROM table version once and cache the decision instead of hitting the panic path
Example fix
// before
let sum = embassy_rp::rom_data::f64::f64_add(a, b); // panics on V1 bootrom
// after
if embassy_rp::rom_data::rom_version_number() >= 2 {
let sum = embassy_rp::rom_data::f64::f64_add(a, b);
} else {
let sum = a + b; // compiler soft-float fallback
} Defensive patterns
Strategy: validation
Validate before calling
fn rom_supports_f64() -> bool {
embassy_rp::rom_data::rom_version_number() >= 2
} Try / catch
// panics are not catchable in no_std; gate calls at compile/runtime before invoking
if !rom_supports_f64() { return Err(NotSupported); } Prevention
- Probe rom_version_number() once at startup and record capability flags
- Avoid ROM f64 wrappers unless targeting known V2-bootrom hardware
- Prefer plain Rust float arithmetic unless ROM speed is measured as necessary
When it happens
Trigger: Calling any `rom_data::f64::*` ROM function wrapper (e.g. f64_add, f64_mul) via `soft_double_table()` on an RP2040 chip whose bootrom is version 1 — typical of very early RP2040 boards manufactured before the V2 bootrom.
Common situations: Using early-production RP2040 boards or old boards with never-updated OTP/bootrom; running double-precision math (f64) via ROM lookups on hardware that only supports the single-precision V1 table; code copied from RP2350 or newer RP2040 examples.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Floating point function requires V2 bootrom
- Boot prepare error
- DMA: error on DMA_0 channel
- Failed to configure PLL_SYS
- Failed to configure PLL_USB
AI-assisted analysis of embassy-rs/embassy@463a07b963 (2026-09-10).
Data as JSON: /api/errors/183d7add5d24aaf8.
Report an issue: GitHub.
Appendix: source
Thrown at embassy-rp/src/rom_data/rp2040.rs:407
rom_table_lookup(DATA_TABLE, *b"FS")
}
/// See Table 180 in the RP2040 datasheet for the contents of this table.
#[cfg_attr(feature = "rom-func-cache", inline(never))]
pub fn soft_float_table() -> *const usize {
rom_table_lookup(DATA_TABLE, *b"SF")
}
/// The end address of the floating point library code and data.
pub fn fplib_end() -> *const u8 {
rom_table_lookup(DATA_TABLE, *b"FE")
}
/// This entry is only present in the V2 bootrom. See Table 182 in the RP2040 datasheet for the contents of this table.
#[cfg_attr(feature = "rom-func-cache", inline(never))]
pub fn soft_double_table() -> *const usize {
if rom_version_number() < 2 {
panic!(
"Double precision operations require V2 bootrom (found: V{})",
rom_version_number()
);
}
rom_table_lookup(DATA_TABLE, *b"SD")
}
/// ROM functions using single-precision arithmetic (i.e. 'f32' in Rust terms)
pub mod float_funcs {
macro_rules! make_functions {
(
$(
$(#[$outer:meta])*
$offset:literal $name:ident (
$( $aname:ident : $aty:ty ),*
) -> $ret:ty;
)*View on GitHub (pinned to 463a07b963)