From b8f352d2eaf96bf6e1202879b366340eef2bea65 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 29 Aug 2024 07:38:09 -0700 Subject: [PATCH 1/5] Update package dependencies and bump version numbers --- esp-backtrace/Cargo.toml | 6 +++--- esp-hal-embassy/Cargo.toml | 12 ++++++------ esp-hal-procmacros/Cargo.toml | 10 +++++----- esp-hal-smartled/Cargo.toml | 4 ++-- esp-hal/Cargo.toml | 18 +++++++++--------- esp-ieee802154/Cargo.toml | 6 +++--- esp-lp-hal/Cargo.toml | 2 +- esp-metadata/Cargo.toml | 6 +++--- esp-println/Cargo.toml | 6 +++--- esp-wifi/Cargo.toml | 14 +++++++------- hil-test/Cargo.toml | 2 +- 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/esp-backtrace/Cargo.toml b/esp-backtrace/Cargo.toml index 77373a65417..a2030eea17e 100644 --- a/esp-backtrace/Cargo.toml +++ b/esp-backtrace/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-backtrace" -version = "0.13.0" +version = "0.14.0" edition = "2021" rust-version = "1.76.0" description = "Bare-metal backtrace support for Espressif devices" @@ -13,8 +13,8 @@ features = ["esp32c3", "panic-handler", "exception-handler", "println", "e [dependencies] defmt = { version = "0.3.8", optional = true } -esp-println = { version = "0.10.0", optional = true, default-features = false, path = "../esp-println" } -semihosting = { version = "0.1.12", optional = true } +esp-println = { version = "0.11.0", optional = true, default-features = false, path = "../esp-println" } +semihosting = { version = "0.1.14", optional = true } [build-dependencies] esp-build = { version = "0.1.0", path = "../esp-build" } diff --git a/esp-hal-embassy/Cargo.toml b/esp-hal-embassy/Cargo.toml index 0a937242660..c080278ca41 100644 --- a/esp-hal-embassy/Cargo.toml +++ b/esp-hal-embassy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-hal-embassy" -version = "0.2.0" +version = "0.3.0" edition = "2021" rust-version = "1.76.0" description = "Embassy support for esp-hal" @@ -12,21 +12,21 @@ default-target = "riscv32imac-unknown-none-elf" features = ["esp32c6"] [dependencies] -critical-section = "1.1.2" +critical-section = "1.1.3" defmt = { version = "0.3.8", optional = true } document-features = "0.2.10" embassy-executor = { version = "0.6.0", optional = true } embassy-time-driver = { version = "0.1.0", features = [ "tick-hz-1_000_000" ] } -esp-hal = { version = "0.19.0", path = "../esp-hal" } +esp-hal = { version = "0.20.0", path = "../esp-hal" } log = { version = "0.4.22", optional = true } -macros = { version = "0.12.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } -portable-atomic = "1.6.0" +macros = { version = "0.13.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } +portable-atomic = "1.7.0" static_cell = "2.1.0" [build-dependencies] cfg-if = "1.0.0" esp-build = { version = "0.1.0", path = "../esp-build" } -esp-metadata = { version = "0.2.0", path = "../esp-metadata" } +esp-metadata = { version = "0.3.0", path = "../esp-metadata" } [features] default = ["executors"] diff --git a/esp-hal-procmacros/Cargo.toml b/esp-hal-procmacros/Cargo.toml index d50f67ed39c..767e694953e 100644 --- a/esp-hal-procmacros/Cargo.toml +++ b/esp-hal-procmacros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-hal-procmacros" -version = "0.12.0" +version = "0.13.0" edition = "2021" rust-version = "1.76.0" description = "Procedural macros for esp-hal" @@ -17,12 +17,12 @@ proc-macro = true darling = "0.20.10" document-features = "0.2.10" litrs = "0.4.1" -object = { version = "0.36.1", optional = true } -proc-macro-crate = "3.1.0" +object = { version = "0.36.3", optional = true } +proc-macro-crate = "3.2.0" proc-macro-error = "1.0.4" proc-macro2 = "1.0.86" -quote = "1.0.36" -syn = { version = "2.0.71", features = ["extra-traits", "full"] } +quote = "1.0.37" +syn = { version = "2.0.76", features = ["extra-traits", "full"] } [features] ## Provide a `#[main]` procmacro to mark the entry point for Embassy applications. diff --git a/esp-hal-smartled/Cargo.toml b/esp-hal-smartled/Cargo.toml index 6d50b4b4fae..11593624700 100644 --- a/esp-hal-smartled/Cargo.toml +++ b/esp-hal-smartled/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-hal-smartled" -version = "0.12.0" +version = "0.13.0" edition = "2021" rust-version = "1.76.0" description = "RMT adapter for smartleds" @@ -14,7 +14,7 @@ targets = ["riscv32imc-unknown-none-elf"] [dependencies] defmt = { version = "0.3.8", optional = true } document-features = "0.2.10" -esp-hal = { version = "0.19.0", path = "../esp-hal" } +esp-hal = { version = "0.20.0", path = "../esp-hal" } fugit = "0.3.7" smart-leds-trait = "0.3.0" diff --git a/esp-hal/Cargo.toml b/esp-hal/Cargo.toml index 48a6803bb68..cb184c0953b 100644 --- a/esp-hal/Cargo.toml +++ b/esp-hal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-hal" -version = "0.19.0" +version = "0.20.0" edition = "2021" rust-version = "1.76.0" description = "Bare-metal HAL for Espressif devices" @@ -16,10 +16,10 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] bitflags = "2.6.0" -bytemuck = "1.16.1" -bitfield = "0.15.0" +bytemuck = "1.17.1" +bitfield = "0.16.1" cfg-if = "1.0.0" -critical-section = "1.1.2" +critical-section = "1.1.3" defmt = { version = "0.3.8", optional = true } delegate = "0.12.0" digest = { version = "0.10.7", default-features = false, optional = true } @@ -35,14 +35,14 @@ embedded-hal-async = { version = "1.0.0", optional = true } embedded-hal-nb = { version = "1.0.0", optional = true } embedded-io = { version = "0.6.1", optional = true } embedded-io-async = { version = "0.6.1", optional = true } -enumset = "1.1.3" +enumset = "1.1.5" esp-synopsys-usb-otg = { version = "0.4.2", optional = true, features = ["fs", "esp32sx"] } fugit = "0.3.7" log = { version = "0.4.22", optional = true } nb = "1.1.0" paste = "1.0.15" -portable-atomic = { version = "1.6.0", default-features = false } -procmacros = { version = "0.12.0", features = ["enum-dispatch", "interrupt", "ram"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } +portable-atomic = { version = "1.7.0", default-features = false } +procmacros = { version = "0.13.0", features = ["enum-dispatch", "interrupt", "ram"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } riscv = { version = "0.11.1", optional = true } strum = { version = "0.26.3", default-features = false, features = ["derive"] } void = { version = "1.0.2", default-features = false } @@ -72,8 +72,8 @@ xtensa-lx-rt = "0.16.0" basic-toml = "0.1.9" cfg-if = "1.0.0" esp-build = { version = "0.1.0", path = "../esp-build" } -esp-metadata = { version = "0.2.0", path = "../esp-metadata" } -serde = { version = "1.0.204", features = ["derive"] } +esp-metadata = { version = "0.3.0", path = "../esp-metadata" } +serde = { version = "1.0.209", features = ["derive"] } [features] default = ["embedded-hal"] diff --git a/esp-ieee802154/Cargo.toml b/esp-ieee802154/Cargo.toml index 8e5b8226dd9..e8f7f37abe3 100644 --- a/esp-ieee802154/Cargo.toml +++ b/esp-ieee802154/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-ieee802154" -version = "0.1.0" +version = "0.2.0" edition = "2021" rust-version = "1.76.0" description = "Low-level IEEE 802.15.4 driver for the ESP32-C6 and ESP32-H2" @@ -17,9 +17,9 @@ test = false [dependencies] byte = "0.2.7" -critical-section = "1.1.2" +critical-section = "1.1.3" document-features = "0.2.10" -esp-hal = { version = "0.19.0", path = "../esp-hal" } +esp-hal = { version = "0.20.0", path = "../esp-hal" } esp-wifi-sys = "0.4.0" heapless = "0.8.0" ieee802154 = "0.6.1" diff --git a/esp-lp-hal/Cargo.toml b/esp-lp-hal/Cargo.toml index 06ab164bdcc..f8e893dab6e 100644 --- a/esp-lp-hal/Cargo.toml +++ b/esp-lp-hal/Cargo.toml @@ -36,7 +36,7 @@ esp32s2-ulp = { version = "0.3.0", features = ["critical-section"], option esp32s3-ulp = { version = "0.3.0", features = ["critical-section"], optional = true } nb = { version = "1.1.0", optional = true } paste = { version = "1.0.15", optional = true } -procmacros = { version = "0.12.0", package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } +procmacros = { version = "0.13.0", package = "esp-hal-procmacros", path = "../esp-hal-procmacros" } riscv = { version = "0.11.1", features = ["critical-section-single-hart"] } [dev-dependencies] diff --git a/esp-metadata/Cargo.toml b/esp-metadata/Cargo.toml index a04eb6ffed1..754cf512711 100644 --- a/esp-metadata/Cargo.toml +++ b/esp-metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-metadata" -version = "0.2.0" +version = "0.3.0" edition = "2021" rust-version = "1.60.0" description = "Metadata for Espressif devices" @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" [dependencies] anyhow = "1.0.86" -clap = { version = "4.5.4", features = ["derive"] } +clap = { version = "4.5.16", features = ["derive"] } basic-toml = "0.1.9" lazy_static = "1.5.0" -serde = { version = "1.0.204", features = ["derive"] } +serde = { version = "1.0.209", features = ["derive"] } strum = { version = "0.26.3", features = ["derive"] } diff --git a/esp-println/Cargo.toml b/esp-println/Cargo.toml index e24d540ca1d..f476320ef40 100644 --- a/esp-println/Cargo.toml +++ b/esp-println/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-println" -version = "0.10.0" +version = "0.11.0" edition = "2021" rust-version = "1.76.0" description = "Provides `print!` and `println!` implementations various Espressif devices" @@ -14,10 +14,10 @@ default-target = "riscv32imc-unknown-none-elf" features = ["esp32c3"] [dependencies] -critical-section = { version = "1.1.2", optional = true } +critical-section = { version = "1.1.3", optional = true } defmt = { version = "0.3.8", optional = true } log = { version = "0.4.22", optional = true } -portable-atomic = { version = "1.6.0", optional = true, default-features = false } +portable-atomic = { version = "1.7.0", optional = true, default-features = false } [build-dependencies] esp-build = { version = "0.1.0", path = "../esp-build" } diff --git a/esp-wifi/Cargo.toml b/esp-wifi/Cargo.toml index dbcca81d42a..0db7eb5b3ec 100644 --- a/esp-wifi/Cargo.toml +++ b/esp-wifi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esp-wifi" -version = "0.7.1" +version = "0.8.0" edition = "2021" authors = ["The ESP-RS team"] description = "A WiFi, Bluetooth and ESP-NOW driver for use with Espressif chips and bare-metal Rust" @@ -12,17 +12,17 @@ categories = ["embedded", "hardware-support", "no-std"] [dependencies] defmt = { version = "0.3.8", optional = true } -esp-hal = { version = "0.19.0", path = "../esp-hal", default-features = false } -esp-hal-embassy = { version = "0.2.0", path = "../esp-hal-embassy", default-features = false, optional = true } +esp-hal = { version = "0.20.0", path = "../esp-hal", default-features = false } +esp-hal-embassy = { version = "0.3.0", path = "../esp-hal-embassy", default-features = false, optional = true } smoltcp = { version = "0.11.0", default-features = false, features = [ "medium-ethernet", "socket-raw", ], optional = true } -critical-section = "1.1.2" +critical-section = "1.1.3" log = { version = "0.4.22", optional = true } embedded-svc = { version = "0.27.1", default-features = false, features = [ ], optional = true } -enumset = { version = "1.1.3", default-features = false, optional = true } +enumset = { version = "1.1.5", default-features = false, optional = true } linked_list_allocator = { version = "0.10.5", default-features = false, features = [ "const_mut_refs", ] } @@ -42,7 +42,7 @@ embassy-net-driver = { version = "0.2.0", optional = true } toml-cfg = "0.2.0" libm = "0.2.8" cfg-if = "1.0.0" -portable-atomic = { version = "1.6.0", default-features = false } +portable-atomic = { version = "1.7.0", default-features = false } portable_atomic_enum = { version = "0.3.1", features = ["portable-atomic"] } futures-util = { version = "0.3.30", default-features = false, features = [ @@ -55,7 +55,7 @@ atomic-waker = { version = "1.1.2", default-features = false, features = [ [build-dependencies] toml-cfg = "0.2.0" esp-build = { version = "0.1.0", path = "../esp-build" } -esp-metadata = { version = "0.2.0", path = "../esp-metadata" } +esp-metadata = { version = "0.3.0", path = "../esp-metadata" } [features] default = ["log"] diff --git a/hil-test/Cargo.toml b/hil-test/Cargo.toml index f6e0287abd6..0251bf8fb26 100644 --- a/hil-test/Cargo.toml +++ b/hil-test/Cargo.toml @@ -185,7 +185,7 @@ sha2 = { version = "0.10.8", default-features = false } [build-dependencies] esp-build = { version = "0.1.0", path = "../esp-build" } -esp-metadata = { version = "0.2.0", path = "../esp-metadata" } +esp-metadata = { version = "0.3.0", path = "../esp-metadata" } [features] default = ["async", "embassy"] From 184593485a061480be57c7742265a70a535030b1 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 29 Aug 2024 07:42:46 -0700 Subject: [PATCH 2/5] Update `CHANGELOG.md` for each package to be published --- esp-backtrace/CHANGELOG.md | 9 +++------ esp-hal-embassy/CHANGELOG.md | 4 +--- esp-hal-smartled/CHANGELOG.md | 10 +--------- esp-hal/CHANGELOG.md | 4 ++-- esp-ieee802154/CHANGELOG.md | 12 +++--------- esp-println/CHANGELOG.md | 9 ++------- esp-wifi/CHANGELOG.md | 4 +--- 7 files changed, 13 insertions(+), 39 deletions(-) diff --git a/esp-backtrace/CHANGELOG.md b/esp-backtrace/CHANGELOG.md index 11a5c8f1848..095ce63f5e9 100644 --- a/esp-backtrace/CHANGELOG.md +++ b/esp-backtrace/CHANGELOG.md @@ -5,19 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 0.14.0 - 2024-08-29 ### Added -- add custom-pre-backtrace feature (#1822) + +- Add custom-pre-backtrace feature (#1822) ### Changed - Improve panic message printing (#1823) -### Fixed - -### Removed - ## 0.13.0 - 2024-07-16 No changes - published to avoid conflicts with `esp-println` diff --git a/esp-hal-embassy/CHANGELOG.md b/esp-hal-embassy/CHANGELOG.md index 6b2461048fd..720aa189df5 100644 --- a/esp-hal-embassy/CHANGELOG.md +++ b/esp-hal-embassy/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 0.3.0 - 2024-08-29 ### Added @@ -21,8 +21,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where the timeout was huge whenever the timestamp at the time of scheduling was already in the past (#1875) - Fixed interrupt executors looping endlessly when `integrated-timers` is used. (#1936) -### Removed - ## 0.2.0 - 2024-07-15 ### Changed diff --git a/esp-hal-smartled/CHANGELOG.md b/esp-hal-smartled/CHANGELOG.md index c0e35d7fe1f..2f2f58d4440 100644 --- a/esp-hal-smartled/CHANGELOG.md +++ b/esp-hal-smartled/CHANGELOG.md @@ -5,15 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased - -### Added - -### Changed - -### Fixed - -### Removed +## 0.13.0 - 2024-08-29 ## 0.12.0 - 2024-07-15 diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 6addb344224..5f3a1d07bb2 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.20.0] - 2024-08-29 ### Added @@ -688,7 +688,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.1.0] - 2022-08-05 -[Unreleased]: https://github.com/esp-rs/esp-hal/compare/v0.19.0...HEAD +[0.20.0]: https://github.com/esp-rs/esp-hal/compare/v0.19.0...v0.20.0 [0.19.0]: https://github.com/esp-rs/esp-hal/compare/v0.18.0...v0.19.0 [0.18.0]: https://github.com/esp-rs/esp-hal/compare/v0.17.0...v0.18.0 [0.17.0]: https://github.com/esp-rs/esp-hal/compare/v0.16.1...v0.17.0 diff --git a/esp-ieee802154/CHANGELOG.md b/esp-ieee802154/CHANGELOG.md index 48aa0fa47e5..1f38023f884 100644 --- a/esp-ieee802154/CHANGELOG.md +++ b/esp-ieee802154/CHANGELOG.md @@ -5,18 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 0.2.0 - 2024-08-29 ### Added -- Added additional checks to prevent various array access panics while processing frames -- Added range check to avoid panic when indexing into RX_BUFFER slice - -### Changed - -### Fixed - -### Removed +- Added additional checks to prevent various array access panics while processing frames (#1923) +- Added range check to avoid panic when indexing into RX_BUFFER slice (#1682) ## 0.1.0 - 2024-07-15 diff --git a/esp-println/CHANGELOG.md b/esp-println/CHANGELOG.md index b8768a8befe..4d3c0e5a4ff 100644 --- a/esp-println/CHANGELOG.md +++ b/esp-println/CHANGELOG.md @@ -5,16 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 0.11.0 - 2024-08-29 ### Added -- made `esp_println::Printer::write_bytes` public (#1812) -### Changed - -### Fixed - -### Removed +- Made `esp_println::Printer::write_bytes` public (#1812) ## 0.10.0 - 2024-07-15 diff --git a/esp-wifi/CHANGELOG.md b/esp-wifi/CHANGELOG.md index 354ce7ca1b4..dd2e38e132c 100644 --- a/esp-wifi/CHANGELOG.md +++ b/esp-wifi/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 0.8.0 - 2024-08-29 ### Added @@ -21,8 +21,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Increased NPL event queue size to prevent overflow (#1891) -### Removed - ## 0.7.1 - 2024-07-17 ### Changed From 6c6cc9b10b5dcbba77eed7569834a22d52172372 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 29 Aug 2024 07:53:24 -0700 Subject: [PATCH 3/5] Remember to update `xtensa-lx-rt` too :) --- esp-hal/Cargo.toml | 2 +- xtensa-lx-rt/Cargo.toml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/esp-hal/Cargo.toml b/esp-hal/Cargo.toml index cb184c0953b..921ffb63f04 100644 --- a/esp-hal/Cargo.toml +++ b/esp-hal/Cargo.toml @@ -66,7 +66,7 @@ esp32s3 = { version = "0.28.0", features = ["critical-section", "rt"], optional esp-riscv-rt = { version = "0.9.0", path = "../esp-riscv-rt" } [target.'cfg(target_arch = "xtensa")'.dependencies] -xtensa-lx-rt = "0.16.0" +xtensa-lx-rt = { version = "0.16.1", path = "../xtensa-lx-rt" } [build-dependencies] basic-toml = "0.1.9" diff --git a/xtensa-lx-rt/Cargo.toml b/xtensa-lx-rt/Cargo.toml index ea79107f5e5..8e138ed1573 100644 --- a/xtensa-lx-rt/Cargo.toml +++ b/xtensa-lx-rt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtensa-lx-rt" -version = "0.16.0" +version = "0.16.1" edition = "2021" rust-version = "1.65" description = "Minimal startup/runtime for Xtensa LX CPUs" @@ -14,18 +14,18 @@ features = ["esp32"] [dependencies] bare-metal = "1.0.0" -document-features = "0.2.8" -macros = { version = "0.2.1", package = "xtensa-lx-rt-proc-macros", path = "./procmacros" } +document-features = "0.2.10" +macros = { version = "0.2.2", package = "xtensa-lx-rt-proc-macros", path = "./procmacros" } r0 = "1.0.0" -xtensa-lx = { version = "0.9.0", path = "../xtensa-lx" } +xtensa-lx = "0.9.0" [build-dependencies] anyhow = "1.0.86" enum-as-inner = "0.6.0" -minijinja = "2.0.3" -serde = { version = "1.0.204", features = ["derive"] } +minijinja = "2.2.0" +serde = { version = "1.0.209", features = ["derive"] } strum = { version = "0.26.3", features = ["derive"] } -toml = "0.8.10" +toml = "0.8.19" [features] ## Save and restore float registers for exceptions From 6ea0e563284a8fa2b71b569c4836265d83e348ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 29 Aug 2024 17:52:27 +0200 Subject: [PATCH 4/5] Add and use TrapFrame::new() in esp-wifi --- esp-wifi/src/preempt/preempt_xtensa.rs | 57 +------------------------- xtensa-lx-rt/src/exception/context.rs | 13 ++++++ 2 files changed, 14 insertions(+), 56 deletions(-) diff --git a/esp-wifi/src/preempt/preempt_xtensa.rs b/esp-wifi/src/preempt/preempt_xtensa.rs index e6da2166287..770dfacf58a 100644 --- a/esp-wifi/src/preempt/preempt_xtensa.rs +++ b/esp-wifi/src/preempt/preempt_xtensa.rs @@ -9,62 +9,7 @@ pub struct TaskContext { } static mut CTX_TASKS: [TaskContext; MAX_TASK] = [TaskContext { - trap_frame: TrapFrame { - PC: 0, - PS: 0, - A0: 0, - A1: 0, - A2: 0, - A3: 0, - A4: 0, - A5: 0, - A6: 0, - A7: 0, - A8: 0, - A9: 0, - A10: 0, - A11: 0, - A12: 0, - A13: 0, - A14: 0, - A15: 0, - SAR: 0, - EXCCAUSE: 0, - EXCVADDR: 0, - LBEG: 0, - LEND: 0, - LCOUNT: 0, - THREADPTR: 0, - SCOMPARE1: 0, - BR: 0, - ACCLO: 0, - ACCHI: 0, - M0: 0, - M1: 0, - M2: 0, - M3: 0, - F64R_LO: 0, - F64R_HI: 0, - F64S: 0, - FCR: 0, - FSR: 0, - F0: 0, - F1: 0, - F2: 0, - F3: 0, - F4: 0, - F5: 0, - F6: 0, - F7: 0, - F8: 0, - F9: 0, - F10: 0, - F11: 0, - F12: 0, - F13: 0, - F14: 0, - F15: 0, - }, + trap_frame: TrapFrame::new(), }; MAX_TASK]; pub fn task_create(task: extern "C" fn()) { diff --git a/xtensa-lx-rt/src/exception/context.rs b/xtensa-lx-rt/src/exception/context.rs index 4c4099dcddb..08ba0cf4f43 100644 --- a/xtensa-lx-rt/src/exception/context.rs +++ b/xtensa-lx-rt/src/exception/context.rs @@ -87,6 +87,19 @@ pub struct Context { pub F15: u32, } +impl Default for Context { + fn default() -> Self { + Self::new() + } +} + +impl Context { + /// Creates a new, zeroed out context. + pub const fn new() -> Self { + unsafe { core::mem::zeroed() } + } +} + extern "Rust" { /// The exception assembly jumps here once registers have been spilled fn __exception(cause: ExceptionCause, save_frame: &mut Context); From 8263e5a98b4e3c776947a70e17330f3f5371f086 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 29 Aug 2024 09:02:29 -0700 Subject: [PATCH 5/5] Bump `xtensa-lx-rt` by minor instead of patch, as there are breaking changes --- esp-hal/Cargo.toml | 2 +- xtensa-lx-rt/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esp-hal/Cargo.toml b/esp-hal/Cargo.toml index 921ffb63f04..3694f0d39e2 100644 --- a/esp-hal/Cargo.toml +++ b/esp-hal/Cargo.toml @@ -66,7 +66,7 @@ esp32s3 = { version = "0.28.0", features = ["critical-section", "rt"], optional esp-riscv-rt = { version = "0.9.0", path = "../esp-riscv-rt" } [target.'cfg(target_arch = "xtensa")'.dependencies] -xtensa-lx-rt = { version = "0.16.1", path = "../xtensa-lx-rt" } +xtensa-lx-rt = { version = "0.17.0", path = "../xtensa-lx-rt" } [build-dependencies] basic-toml = "0.1.9" diff --git a/xtensa-lx-rt/Cargo.toml b/xtensa-lx-rt/Cargo.toml index 8e138ed1573..300ac01ad60 100644 --- a/xtensa-lx-rt/Cargo.toml +++ b/xtensa-lx-rt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtensa-lx-rt" -version = "0.16.1" +version = "0.17.0" edition = "2021" rust-version = "1.65" description = "Minimal startup/runtime for Xtensa LX CPUs"