Skip to content

Commit

Permalink
Remove the mcu-boot feature from esp32c3-hal (#938)
Browse files Browse the repository at this point in the history
* Remove the `mcu-boot` feature from `esp32c3-hal`

* Update `CHANGELOG.md`
  • Loading branch information
jessebraham authored Nov 14, 2023
1 parent 52da170 commit f729f89
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 511 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,8 @@ jobs:

# Perform a full build initially to verify that the examples not only
# build, but also link successfully.
# We also use this as an opportunity to verify that the examples link
# for each supported image format.
- name: build esp32c3-hal (no features)
run: cd esp32c3-hal/ && cargo +nightly build --examples
- name: build esp32c3-hal (mcu-boot)
run: cd esp32c3-hal/ && cargo +nightly build --examples --features=mcu-boot
# Subsequent steps can just check the examples instead, as we're already
# confident that they link.
- name: check esp32c3-hal (common features)
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed the `mcu-boot` feature from `esp32c3-hal` (#938)

### Breaking
- Direct boot support has been removed (#903).
- `Spi::new`/`Spi::new_half_duplex` takes no gpio pin now, instead you need to call `with_pins` to setup those (#901).
Expand Down
1 change: 0 additions & 1 deletion esp32c3-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ direct-vectoring = ["esp-hal-common/direct-vectoring"]
eh1 = ["esp-hal-common/eh1"]
interrupt-preemption = ["esp-hal-common/interrupt-preemption"]
log = ["esp-hal-common/log", "esp-println/log"]
mcu-boot = []
rt = []
ufmt = ["esp-hal-common/ufmt"]
vectored = ["esp-hal-common/vectored"]
Expand Down
24 changes: 0 additions & 24 deletions esp32c3-hal/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{env, error::Error, fs, path::PathBuf};

#[cfg(not(feature = "mcu-boot"))]
fn main() -> Result<(), Box<dyn Error>> {
// Put the linker script somewhere the linker can find it
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
Expand All @@ -21,26 +20,3 @@ fn main() -> Result<(), Box<dyn Error>> {

Ok(())
}

#[cfg(feature = "mcu-boot")]
fn main() -> Result<(), Box<dyn Error>> {
// Put the linker script somewhere the linker can find it
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
println!("cargo:rustc-link-search={}", out.display());

fs::copy("ld/mb-esp32c3-memory.x", out.join("memory.x"))?;
fs::copy("ld/mb-esp32c3-link.x", out.join("esp32c3-link.x"))?;
fs::copy("ld/mb-riscv-link.x", out.join("riscv-link.x"))?;
fs::copy("ld/mb-linkall.x", out.join("linkall.x"))?;

fs::copy("ld/rom-functions.x", out.join("rom-functions.x"))?;

// Only re-run the build script when memory.x is changed,
// instead of when any part of the source code changes.
println!("cargo:rerun-if-changed=ld/memory.x");

#[cfg(feature = "defmt")]
println!("cargo:rustc-link-arg=-Tdefmt.x");

Ok(())
}
45 changes: 0 additions & 45 deletions esp32c3-hal/ld/mb-esp32c3-link.x

This file was deleted.

65 changes: 0 additions & 65 deletions esp32c3-hal/ld/mb-esp32c3-memory.x

This file was deleted.

3 changes: 0 additions & 3 deletions esp32c3-hal/ld/mb-linkall.x

This file was deleted.

Loading

0 comments on commit f729f89

Please sign in to comment.