Skip to content

rustBoot Book's commands for compiling rpi4 fail with "critical-section" selection error because versions have been yanked from crates.io #83

Description

@jwmurray

I am hitting an error because the several releases of the critical-section crate have been pulled from crates.io (versions 0.2.5 - 0.2.8).

When I attempt to compile the rpi4 rustBoot as shown below with cargo rpi4 build rustBoot-only per the rustBoot book, the system cannot resolve the critical-section crate.

Steps to reproduce on macos 15.3.1 and Ubuntu 24.10

git clone git@github.com:nihalpasham/rustBoot.git && cd rustBoot

echo "    arm_64bit=1
      enable_uart=1
      init_uart_clock=4000000
      kernel=rustBoot.bin
  " > config.txt

rustup default nightly
rustup target add aarch64-unknown-none-softfloat

cargo install cargo-binutils
rustup component add llvm-tools-preview
rustup show

Default host: aarch64-apple-darwin
rustup home:  /Users/jmurray/.rustup

installed toolchains
--------------------
stable-aarch64-apple-darwin
nightly-aarch64-apple-darwin (active, default)
1.81-aarch64-apple-darwin

active toolchain
----------------
name: nightly-aarch64-apple-darwin
active because: it's the default toolchain
installed targets:
  aarch64-apple-darwin
  aarch64-apple-ios-sim
  aarch64-unknown-linux-gnu
  aarch64-unknown-none-softfloat
  thumbv6m-none-eabi
  wasm32-unknown-unknown
  x86_64-unknown-linux-gnu

The failing output is from this command cargo rpi4 build rustBoot-only. I have removed 60 warning messages from the output.

I have not been able to resolve the critical-section crate failures.

~ cargo rpi4 build rustBoot-only
   Compiling typenum v1.18.0
   Compiling generic-array v0.14.7
   Compiling subtle v2.4.1
   Compiling rand_core v0.6.4
   Compiling const-oid v0.7.1
   Compiling zeroize v1.4.3
   Compiling libc v0.2.170
...

warning: `xtask` (bin "xtask") generated 60 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.63s
     Running `target/debug/xtask rpi4 build rustBoot-only`
$ cargo build --release
    Updating crates.io index
error: failed to select a version for the requirement `critical-section = "^0.2.5"`
  version 0.2.5 is yanked
  version 0.2.6 is yanked
  version 0.2.7 is yanked
  version 0.2.8 is yanked
location searched: crates.io index
required by package `defmt-rtt v0.3.2`
    ... which satisfies dependency `defmt-rtt = "^0.3.2"` of package `stm32f746_bootfw v0.1.0 (/home/jmurray/code/rust/rustBoot/boards/firmware/stm32f746/boot_fw_blinky_green)`
Error: command `cargo build --release` failed, exit status: 101

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions