Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 75 additions & 53 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed

- Add XDG path support (https://github.com/esp-rs/espup/issues/476)
- Fix the `esp_app_desc!` macro so the reserv3 field is correct for ESP IDF v5.4
- Fix the `esp_app_desc!` macro so that it properly embeds `CONFIG_ESP_EFUSE_BLOCK_REV_MIN_FULL`/`CONFIG_ESP_EFUSE_BLOCK_REV_MAX_FULL` with recent ESP-IDF versions (5.4+, 5.2.3+, 5.3.2+)
- Make sure that the `esp_app_desc!` macro fails at build-time if some of the fields cannot fit inside the structure
Expand All @@ -16,19 +18,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.36.1] - 2025-01-10

### Added

- Add raw bindings for `esp_netif_net_stack.h` and `lwip/esp_netif_net_stack.h`. (#360)

### Fixed

- Fix the `esp_app_desc!` macro so that it works with recent ESP-IDF versions (5.4+, 5.2.3+, 5.3.2+)

## [0.36.0] - 2025-01-02

### Deprecated

### Breaking

- Updated the `embuild` dependency

### Added

- Compatibility with ESP-IDF v5.3.X
- Add raw bindings for `sdio_slave.h` for all targets that support it and add `onewire_bus.h` (#322)
- Add raw bindings for `onewire_device.h`
Expand All @@ -44,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add raw bindings to the `TinyUSB` API

### Fixed

- Fix rust-analyzer by not using rust libtest harness
- Fix a typo in `BUILD-OPTIONS.md`
- Bugfix: date and time were swapped in the generated esp_app_desc_t
Expand All @@ -55,88 +62,103 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.35.0] - 2024-06-23

### Deprecated

**ESP-IDF v4.4** Please start upgrading to ESP-IDF v5.

### Breaking
* removed: ESP-IDF v4.3 support - including code and patches. (#305)
* removed: Unused esp8266 rtos sdk (#305)
* EspError now implements `Debug` and provides a human readable error code. (#294)
* `bindgen` dependancy updated to the latest release version. (#304)

- removed: ESP-IDF v4.3 support - including code and patches. (#305)
- removed: Unused esp8266 rtos sdk (#305)
- EspError now implements `Debug` and provides a human readable error code. (#294)
- `bindgen` dependancy updated to the latest release version. (#304)

### Added
* Include new dac_oneshot and dac_continous headers in default bindings.h. (#289)
* Include new i2c headers in default bindings.h. (#290)
* Include new rmt headers in default bindings.h.
* Include usb-serial-jtag header. (#317)

- Include new dac_oneshot and dac_continous headers in default bindings.h. (#289)
- Include new i2c headers in default bindings.h. (#290)
- Include new rmt headers in default bindings.h.
- Include usb-serial-jtag header. (#317)

### Fixed
* Building against esp-idf >= v5.3 by adding additional conditions on the esp_lcd headers. Note that "esp_lcd_panel_rgb.h" was removed upstream since idf 5.3. (#303)

- Building against esp-idf >= v5.3 by adding additional conditions on the esp_lcd headers. Note that "esp_lcd_panel_rgb.h" was removed upstream since idf 5.3. (#303)

## [0.34.1] - 2024-02-21
* Fix clippy duplicate imports warnings with latest 1.78 nightly

- Fix clippy duplicate imports warnings with latest 1.78 nightly

## [0.34.0] - 2024-01-26
* First `esp-idf-sys` examples:
* `std_basics`: "Hello world" with `println!` and other types available in the Rust Standard Library like threads, atomics, local storage, collections, etc.
* `unsafe_call`: Calling an ESP IDF custom API using the unsafe bindings generated by `esp-idf-sys`
* All FreeRTOS headers are now included, so user should get unsafe bindings for all FreeRTOS APIs which are not macros
* Changes to how native vs PlatformIO build is selected, that are supposed to increase the ergonomics of using the crate:
* Perform PlatformIO build **only** when the `pio` feature IS specified, and the `native` feature is NOT specified
* In case neither the `native` nor the `pio` feature is specified, perform a native build (this setup used to fail the build)
* In case both the `native` and `pio` features are specified, perform a native build as well (this setup used to perform a PlatformIO build)
* When both `binstart` and `libstart` features are selected, `binstart` takes precedence over `libstart`
* #264 - Copy the bootloader and partition table binaries to the target folder
* #262 - Bindings for the `esp_lcd` driver component
* #259 - Bindings for the temperature sensor driver
* #261 - Build time optimization - do not download Rust crates not needed for the host platform
* #257 - Make builds utilizing the `esp_app_desc` component reproducible
* (Bugfix) Re-expose raw bindings for the `esp_flash` component on ESP IDF 5+

- First `esp-idf-sys` examples:
- `std_basics`: "Hello world" with `println!` and other types available in the Rust Standard Library like threads, atomics, local storage, collections, etc.
- `unsafe_call`: Calling an ESP IDF custom API using the unsafe bindings generated by `esp-idf-sys`
- All FreeRTOS headers are now included, so user should get unsafe bindings for all FreeRTOS APIs which are not macros
- Changes to how native vs PlatformIO build is selected, that are supposed to increase the ergonomics of using the crate:
- Perform PlatformIO build **only** when the `pio` feature IS specified, and the `native` feature is NOT specified
- In case neither the `native` nor the `pio` feature is specified, perform a native build (this setup used to fail the build)
- In case both the `native` and `pio` features are specified, perform a native build as well (this setup used to perform a PlatformIO build)
- When both `binstart` and `libstart` features are selected, `binstart` takes precedence over `libstart`
- #264 - Copy the bootloader and partition table binaries to the target folder
- #262 - Bindings for the `esp_lcd` driver component
- #259 - Bindings for the temperature sensor driver
- #261 - Build time optimization - do not download Rust crates not needed for the host platform
- #257 - Make builds utilizing the `esp_app_desc` component reproducible
- (Bugfix) Re-expose raw bindings for the `esp_flash` component on ESP IDF 5+

## [0.33.7] - 2023-11-08
* Workaround for https://github.com/esp-rs/esp-idf-svc/issues/312
* Include gptimer headers (#255)

- Workaround for https://github.com/esp-rs/esp-idf-svc/issues/312
- Include gptimer headers (#255)

## [0.33.6] - 2023-11-07
* Export esp_netif_sntp APIs from esp-idf 5.1
* Fix compile error for esp32c6 with NimBLE
* Support for the [symlink to xtensa Clang library](https://github.com/esp-rs/espup/releases/tag/v0.8.0) installed by latest `espup` ([esp-idf-svc issue 319](https://github.com/esp-rs/esp-idf-hal/issues/319))

- Export esp_netif_sntp APIs from esp-idf 5.1
- Fix compile error for esp32c6 with NimBLE
- Support for the [symlink to xtensa Clang library](https://github.com/esp-rs/espup/releases/tag/v0.8.0) installed by latest `espup` ([esp-idf-svc issue 319](https://github.com/esp-rs/esp-idf-hal/issues/319))

## [0.33.5] - 2023-10-28
* Support for latest ESP IDF 5.2 dev (master)

- Support for latest ESP IDF 5.2 dev (master)

## [0.33.4] - 2023-10-27
* The `MCU` environment variable was failing the `pio` build if the MCU was not uppercased
* Better error message for the `native` build in case the MCU was not recognized

- The `MCU` environment variable was failing the `pio` build if the MCU was not uppercased
- Better error message for the `native` build in case the MCU was not recognized

## [0.33.3] - 2023-10-17
* Support for ESP IDF Component Manager - check the documentation in BUILD-OPTIONS.md
* ESP32H2 and ESP32C5 now properly assigned to the `riscv32imac-esp-espidf`
* All ESP IDF WPA supplicant APIs exposed
* Build is now checking for the presence of certain environment variables (e.g. CXXFLAGS) that might fail the ESP IDF C build and removing those
* Build is now checking if the project path might fail the ESP IDF C build (i.e. too long on Windows or containing spaces on Unix) and failing if so

- Support for ESP IDF Component Manager - check the documentation in BUILD-OPTIONS.md
- ESP32H2 and ESP32C5 now properly assigned to the `riscv32imac-esp-espidf`
- All ESP IDF WPA supplicant APIs exposed
- Build is now checking for the presence of certain environment variables (e.g. CXXFLAGS) that might fail the ESP IDF C build and removing those
- Build is now checking if the project path might fail the ESP IDF C build (i.e. too long on Windows or containing spaces on Unix) and failing if so

## [0.33.2] - 2023-08-18
* Band-aid solution that fixes the build with recent Rust nightlies and ESP IDF < 5.1 (https://github.com/esp-rs/esp-idf-template/issues/149)
* Raw bindings for the continuous ADC driver (ESP IDF >= 5.0)
* Raw bindings for bootloader random functions
* Raw bindings for all available classic BT APIs
* Raw bindings for esp_freertos_hooks.h

- Band-aid solution that fixes the build with recent Rust nightlies and ESP IDF < 5.1 (https://github.com/esp-rs/esp-idf-template/issues/149)
- Raw bindings for the continuous ADC driver (ESP IDF >= 5.0)
- Raw bindings for bootloader random functions
- Raw bindings for all available classic BT APIs
- Raw bindings for esp_freertos_hooks.h

## [0.33.1] - 2023-06-11

* Raw bindings for the I2S driver
* Raw bindings for CRC ROM functions
- Raw bindings for the I2S driver
- Raw bindings for CRC ROM functions

## [0.33.0] - 2023-05-13

* (In theory) no API breakage, yet the minor version is raised just in case
* Support for new chips: esp32c2, esp32h2, esp32c6 and future proofed for esp32c5 and esp32p4
* Support for ESP IDF 5.0, 5.1 and 5.2 (master)
* New raw bindings: esp-transport, himem, psram, esp-dpp, i2s, a2dp, wpa2
- (In theory) no API breakage, yet the minor version is raised just in case
- Support for new chips: esp32c2, esp32h2, esp32c6 and future proofed for esp32c5 and esp32p4
- Support for ESP IDF 5.0, 5.1 and 5.2 (master)
- New raw bindings: esp-transport, himem, psram, esp-dpp, i2s, a2dp, wpa2

## [0.32.1] - 2022-12-13

* Fix an erroneous cast to `u32` in `Esp32Alloc`, causing `no_std` builds using the allocator to fail (#158)
* Apply Niche optimization to `EspError` (`NonZeroI32`), add `from_infallible` associated function, (#159)
- Fix an erroneous cast to `u32` in `Esp32Alloc`, causing `no_std` builds using the allocator to fail (#158)
- Apply Niche optimization to `EspError` (`NonZeroI32`), add `from_infallible` associated function, (#159)

## [0.32] - 2022-12-09

* Remove the custom `c_types` module in favor of `core::ffi`
* Switch to `embuild` 0.31 and `bindgen` 0.63. Since 0.61, `bindgen` has the `--size_t-is-usize` flag is enabled by default. This removes a lot of unnecessary casting from `usize` to `u32` and makes the `esp-idf-sys` bindings more ergonomic
- Remove the custom `c_types` module in favor of `core::ffi`
- Switch to `embuild` 0.31 and `bindgen` 0.63. Since 0.61, `bindgen` has the `--size_t-is-usize` flag is enabled by default. This removes a lot of unnecessary casting from `usize` to `u32` and makes the `esp-idf-sys` bindings more ergonomic
11 changes: 9 additions & 2 deletions build/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,15 @@ pub fn setup_clang_env(path: Option<&Path>) -> Result<()> {

if policy != "ignore" {
#[allow(deprecated)]
let espup_clang_path =
std::env::home_dir().map(|home| home.join(".espup").join("esp-clang"));
let espup_clang_path = std::env::home_dir().map(|home| {
const ESPUP_CLANG_SUFFIX: &str = "espup/esp-clang";
let local_share_path = home.join(".local").join("share").join(ESPUP_CLANG_SUFFIX);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While local share is the "default xdg data home" its not really a "xdg support" per se, For that we would have to respect the respective xdg env var itself.

I would not be opposed to use it if its set by the user. But crucially the change should work not only for linux people, but should not change the default for windows and mac users.

Site note: keep in mind that this particular case where we are "using the espup" provided esp-clang version we are in a separate file path looking. There is a certain risk to merge the espclang path into a directory where users might have other clang versions installed and may then provide wrong versions. E.g the user provided install overrides the espup install. By having the default in a separate folder its less risk.

if local_share_path.exists() {
local_share_path
} else {
home.join(format!(".{ESPUP_CLANG_SUFFIX}"))
}
});

let err_msg = if let Some(espup_clang_path) = espup_clang_path {
if let Ok(real_path) = std::fs::read_link(&espup_clang_path) {
Expand Down