You_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml

The very first 4 rows of my target/rtic-expansion.rs

#[doc = r" The RTIC application module"]
pub mod app {
    #[doc = r" Always include the device crate which contains the vector table"]
    use pac as you_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml;

But I have the feature "rt" enabled in my cargo.toml:

rp2040-pac = { version = "0.6.0", features = ["rt"] }
rp2040-hal = { version = "0.11.0", features = [
    "rt",
    "rtic-monotonic",
    "rom-func-cache",
    "critical-section-impl",
    "chrono",
    "defmt",
    "i2c-write-iter",
    "binary-info",
] }
rp2040-boot2 = "0.3"
embedded-hal = { version = "1.0.0" }
rtic = { version = "2.1.2", features = ["thumbv6-backend"] }
rtic-time = { version = "2.0.0" }
rtic-monotonics = { version = "2.0.3", features = [
    "cortex-m-systick",
    "rp2040",
] }
rtic-sync = { version = "1.3.2" }

???

1 Like

Does this code not build? If it does not build, what is the error message? If it builds, what's the problem?

1 Like

It builds. But I didn't upload to the device yet. When I saw You_must_enable_the_rt_feature_for_the_pac_in_your_cargo_toml I interpreded it as an error somewhere and was wondering whether I should fix it.

It's not an error by itself. It would likely show in a cargo build output, if you actually remove the rt feature - probably the error would be unclear otherwise.

Ok cool, thank you. I was worried. Well ... build process's intermediate artifacts are always ugly to read. I'm not confident with rust ones.