Skip to content

Commit

Permalink
Warn users when attempting to build esp-hal using the dev profile (
Browse files Browse the repository at this point in the history
…#1420)

* Warn users when attempting to build `esp-hal` using the `dev` profile

* Update `CHANGELOG.md`
  • Loading branch information
jessebraham authored Apr 11, 2024
1 parent f692548 commit dfc6d86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add TWAI support for ESP32-C6 (#1323)
- `GpioPin::steal` unsafe API (#1363)
- Inherent implementions of GPIO pin `set_low`, `is_low`, etc.
- Warn users when attempting to build using the `dev` profile (#1420)

### Fixed

Expand Down
9 changes: 9 additions & 0 deletions esp-hal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ use std::{
use esp_build::assert_unique_used_features;
use esp_metadata::{Chip, Config};

#[cfg(debug_assertions)]
esp_build::warning! {"
WARNING: use --release
We *strongly* recommend using release profile when building esp-hal.
The dev profile can potentially be one or more orders of magnitude
slower than release, and may cause issues with timing-senstive
peripherals and/or devices.
"}

fn main() -> Result<(), Box<dyn Error>> {
// NOTE: update when adding new device support!
// Ensure that exactly one chip has been specified:
Expand Down

0 comments on commit dfc6d86

Please sign in to comment.