esp-hal/esp32c2-hal/Cargo.toml
onsdagens fe84e74151
Adding priority based interrupt preemption (#448)
* Software interrupt support added, not sure if the code is good

* Added support for remaining SW interrupts

* Added support for remaining SW interrupts

* Added support for remaining SW interrupts

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Software interrupt example for esp32c3

* Added support for esp32c2, esp32s2, esp32s3

* Software interrupt example for esp32c3

* prio based preemption only, vector table reverted

* prio based preemption only, vector table reverted

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* fixed rare bug causing misaligned memory access when emulating atomics

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* broke something

* broke something

* fixed alignment bug

* Tentative: added support for interrupt preemption without involving the rt

* Added feature enabling priority based interrupt preemption

* Fixed failed merge

* Tagged preemption helpers with inline always

* Disable interrupts before restoring context to avoid ruining it

* Fix max priority edge case

* Fix broken merge

* Added examples for the remaining RISC-V ESPs

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Update esp32c2-hal/examples/interrupt_preemption.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Example comments courtesy of @sethp

* Reverted irrelevant changes, raised high prio interrupt to max prio

* Rolling back an irrelevant change

* Rolling back an irrelevant change

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: Scott Mabin <scott@mabez.dev>

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: Scott Mabin <scott@mabez.dev>

* Moved imports to avoid warnings, moved functions to ram, moved interrupt disable to before prio threshold is restored

* Added preemption for the ESP32C6

* Moved helper functions into the relevant modules, changed threshold for ESP32C6 to machine mode one

* ESP32C6 Threshold register changed to machine mode one, corrected threshold set.

---------

Co-authored-by: sethp <seth.pellegrino@gmail.com>
Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-05-05 11:40:54 +01:00

83 lines
2.8 KiB
TOML

[package]
name = "esp32c2-hal"
version = "0.7.0"
authors = [
"Jesse Braham <jesse@beta7.io>",
"Björn Quentin <bjoern.quentin@mobile-j.de>",
]
edition = "2021"
rust-version = "1.65.0"
description = "HAL for ESP32-C2 microcontrollers"
repository = "https://github.com/esp-rs/esp-hal"
license = "MIT OR Apache-2.0"
keywords = [
"embedded",
"embedded-hal",
"esp",
"esp32c2",
"no-std",
]
categories = [
"embedded",
"hardware-support",
"no-std",
]
[dependencies]
embassy-time = { version = "0.1.1", features = ["nightly"], optional = true }
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal-1 = { version = "=1.0.0-alpha.10", optional = true, package = "embedded-hal" }
embedded-hal-async = { version = "0.2.0-alpha.1", optional = true }
embedded-hal-nb = { version = "=1.0.0-alpha.2", optional = true }
esp-hal-common = { version = "0.9.0", features = ["esp32c2"], path = "../esp-hal-common" }
[dev-dependencies]
critical-section = "1.1.1"
embassy-executor = { version = "0.2.0", features = ["nightly", "integrated-timers", "arch-riscv32", "executor-thread"] }
embedded-graphics = "0.7.1"
esp-backtrace = { version = "0.7.0", features = ["esp32c2", "panic-handler", "exception-handler", "print-uart"] }
esp-println = { version = "0.5.0", features = ["esp32c2"] }
sha2 = { version = "0.10.6", default-features = false}
ssd1306 = "0.7.1"
static_cell = "1.0.0"
[features]
default = ["rt", "vectored", "xtal40mhz"]
direct-boot = ["esp-hal-common/rv-init-data"]
eh1 = ["esp-hal-common/eh1", "dep:embedded-hal-1", "dep:embedded-hal-nb"]
rt = []
ufmt = ["esp-hal-common/ufmt"]
vectored = ["esp-hal-common/vectored"]
async = ["esp-hal-common/async", "embedded-hal-async"]
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
xtal26mhz = ["esp-hal-common/esp32c2_26mhz"]
xtal40mhz = ["esp-hal-common/esp32c2_40mhz"]
interrupt-preemption = ["esp-hal-common/interrupt-preemption"]
[[example]]
name = "spi_eh1_loopback"
required-features = ["eh1"]
[[example]]
name = "spi_eh1_device_loopback"
required-features = ["eh1"]
[[example]]
name = "embassy_hello_world"
required-features = ["embassy"]
[[example]]
name = "embassy_wait"
required-features = ["embassy", "async"]
[[example]]
name = "embassy_spi"
required-features = ["embassy", "async"]
[[example]]
name = "interrupt_preemption"
required-features = ["interrupt-preemption"]