2550 Commits

Author SHA1 Message Date
Dániel Buga
646495eb16
Runtime wifi config options (#4121)
* Turn country code and default power mode into runtime configs

* Move G_CONFIG setup to wifi::new

* Turn most configs into runtime options

* Set core ID to current one

* Mark most options unstable
2025-09-17 08:13:18 +00:00
Dániel Buga
321ae5ef1b
Rewrite Xtensa startup code in assembly (#4117)
* Initialize rtc RAM in xtensa-lx-rt

* Rewrite CPU reset handler in ASM
2025-09-17 07:57:23 +00:00
Dániel Buga
3a4b7c6ded
Fix AES touching memory at inappropriate places (#4124)
* Add failing test

* Avoid copying the writeback buffer

* Fix AES cache operations
2025-09-17 07:23:59 +00:00
Björn Quentin
89b81a2f8e
update radio blobs (#4113)
* update radio blobs

use esp-wifi-sys 0.8.2

* CHANGELOG.md

* fmt

* Address review

* Address review comments

* Address review comments
2025-09-17 06:59:00 +00:00
Dániel Buga
54d0da12af
Add defmt+esp-println example (#4122)
* Add defmt+esp-println example

* Fix warning

* Un-nit the pick
2025-09-16 15:09:06 +00:00
Dániel Buga
177e99fcef
Add TimerHandle::is_active (#4119) 2025-09-16 13:52:59 +00:00
Scott Mabin
3f024529e2
upgrade to 1.89.0.0 for CI (#4102)
* upgrade to 1.89.0.0 for CI

* regenerate baseline

* Resolve clippy errors

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2025-09-16 11:53:59 +00:00
Dániel Buga
b3a17079e8
Ping i2c sensor after cancellation (#4120) 2025-09-16 11:32:30 +00:00
Benedikt
d7d4e79aef
RMT: don't require physical pin connections for loopback HIL tests (#4118)
by using Flex::split instead
2025-09-16 11:32:15 +00:00
Jesse Braham
92bf58f6ec
Miscellaneous cleanup in rtc_cntl module (#4112)
* Define a metadata symbol for SWD

* Use `cfg_if` rather than multiple `cfg`s

* Eliminate some pointless variable declarations

* Make derives match for both versions of `RtcCalSel`

* Disallow instantiation of `Rtwdt` or `Swd` outside of `Rtc`
2025-09-16 10:56:35 +00:00
Dániel Buga
9c35cf9b16
Test and fix critical-section feature in esp-println (#4116) 2025-09-16 06:40:17 +00:00
Dániel Buga
9d596ca752
esp-radio: remove scheduler lifecycle management, remove idle task (#4093)
* Start scheduler on preempt init, remove deinit

* Static-allocate the main task context

* taskless idle

* Remove the need for an idle task
2025-09-15 12:47:39 +00:00
Juraj Sadel
c1c226a20d
esp-radio: Add BuilderLite for EapClientConfig (#4115)
* esp-radio: Add BuilderLite for EapClientConfig

* changelog
2025-09-15 10:58:15 +00:00
Sergei Varibrus
31a0b1c60f
fix: I2S RX half-sample bits configuration and add regression test (#4109)
* fix: I2S RX half-sample bits configuration and add regression test

* add record in CHANGELOG.md

* turn off test for esp32s2
2025-09-15 10:48:53 +00:00
Dániel Buga
63009c8163
Fix warning without unstable (#4107) 2025-09-12 19:12:01 +00:00
Juraj Sadel
a5a0833318
Add a CI workflow for checking links in .rs, .md, and .toml files acc… (#4098)
* Add a CI workflow for checking links in .rs, .md, and .toml files accross esp-hal workspace

fix dead links

* exclude unpublished crate documentation's links

* Add .lycheeignore with excluded links

* play with patterns

* don't forget to remove
2025-09-12 10:48:04 +00:00
Dániel Buga
f41c86a902
Create timer task on demand (#4091) 2025-09-12 07:06:03 +00:00
Dániel Buga
56aac5e179
Reduce likelyhood of very short scl pulses (#4099) 2025-09-11 18:18:39 +00:00
Dániel Buga
b346074de0
Release RTC_I2C resources when dropped (#4101) 2025-09-11 15:35:57 +00:00
Benedikt
97e3d00c90
RMT: Misc refactoring (#4100)
* RMT: move configure_*x_channel to Channel impl

These methods are essentially (unsafe) constructors for Channel, so it
makes sense for them to be part of the Channel rather than free-standing
functions.

Importantly, this refactoring also reorders channel configuration and
creation of GenericPeripheralGuard. Note that it's still not guranteed
that the peripheral is clocked when configuring it, since code like the
following compiles:

```
let ch0_creator = {
	let rmt = Rmt::new(peripherals.RMT, freq).unwrap();
	rmt.channel0;
	// Other fields of `rmt` are dropped, including the
	// `Rmt.peripheral: RMT` field.
	// Since not GenericPeripheralGuard has been created at this
	// point, this will disable the peripheral's clock.
};

// This re-enables RMT clocks. With this commit, it does so before
// actually accessing RMT registers. However, the clock configuration that
// happens in Rmt::new() will have been lost!
// -> will be fixed in a later PR
let ch0 = ch0_creator.configure_tx(pin, config).unwrap();
```

There's no change to the API here.

* RMT: merge transmit_continuously{,with_loopcount}

...by introducing an extra loopcount argument.

Add the LoopCount enum such that the resulting code remains readable.

This is in preparation for adding more variants of rx/tx methods in
order to avoid combinatoric explosion.

* RMT: use stop_tx if available, only for esp32 fill buffer with end markers

note that stop_tx requires an update() call (according to TRMs and to IDF code)

for consistency, this also removes all update() calls from the low-level
methods in favor of explicit calls
this de-duplicates some update calls for start_tx()

* RMT: deduplicate ContinuousTxTransaction::{stop, stop_next}

* RMT: remove spurious ch_tx_thr_event access on Rx channel

for esp32 + esp32s2, which don't support the ch_rx_thr_event (this was
partially cleaned up in #3701 already, but this instance was overseen)

* RMT: assert!(...is_ok()) -> unwrap in HIL tests
2025-09-11 14:15:38 +00:00
Dániel Buga
ba2d541624
Some mild scheduler cleanup (#4096)
* Clean up arch-specific task code

* Avoid a few redundant unwraps in run_scheduler

* Pass TaskPtr to alarm callback

* Ensure the radio runs on the scheduler's core

* clippy

* Add warnings
2025-09-11 12:11:23 +00:00
Kirill Mikhailov
b01f444822
Implement Error trait more (#4097)
* Implement `Error` trait more

fmt

* oi

* fix
2025-09-11 11:17:29 +00:00
Dániel Buga
d16b68396c
Try to explain preempt needs (#4092) 2025-09-11 08:37:21 +00:00
Dániel Buga
627a25e7dc
Disable wdt after test (#4095) 2025-09-11 10:36:35 +02:00
Dániel Buga
cf80e6a8f1
Implement priority levels (#4090)
* Add priority to tasks

* Separate Mutex out of counting Semaphore

* Add priority inheritance to mutexes

* Test priority inheritance, fix issues

* Compare against the owner's current priority
2025-09-11 08:03:44 +00:00
Björn Quentin
9e190f112d
Use riscv-rt's startup and trap-handling code (#3857)
* Use riscv-rt's startup code

* CHANGELOG.md

* Enable v-trap - get rid of one unused function

* Re-use riscv-rt's TrapFrame instead of keeping a copy of it

* fmt

* Update riscv-rt rev

* Enable defmt

* use riscv-rt's trap handling

* Compile on stable

* (Re)add the SP fixing code

* Move comment

* Update `riscv*` deps

* esp-riscv-rt: Remove the (unused) CI feature
2025-09-11 07:48:44 +00:00
Jesse Braham
6f033666c8
Move RTC clock enums/structs to clock module (#4089)
* Move RTC clock enums to `clock` module and fix naming violations

* Move `RtcClock` to `clock` module

* Update migration guide

* Update `CHANGELOG.md`

* Remove invalid attribute from enum variant
2025-09-10 09:47:07 +00:00
Dániel Buga
35e208236a
Add wait queues to semaphore/queue (#4086)
* Add wait queue to semaphores

* Spawn idle task, prevent re-waking a ready task

* Add wait queues to queues

* Clean up wait queues

* Remove task from wait queue on timeout/resume

* Do not re-schedule deleted task

* Implement simple stack overflow detection

* Task deletion: remove task from queues in one place

* Fix storing context into freed memory

* Restore idle task stack size

* Undo alloc changes

* Don't let task sleep if wakeup time is in the past

* Improve codegen of esp_preempt_now
2025-09-10 07:24:25 +00:00
Kirill Mikhailov
1597443bf1
Add new host-test xtask subcommand (#4085)
* Add new `host-test` xtask subcommand

+ smaller consistency and fmt fixes

* reviews

* reviews
2025-09-09 14:44:36 +00:00
Juraj Sadel
36634a4f92
Add Protocols to ClientConfig and EapClientConfig and apply them (#4080) 2025-09-09 10:06:26 +00:00
Dániel Buga
779f7a874f
esp-preempt: don't switch to sleeping tasks (#4081)
* Separate the alloc and run lists

* Replace circular task list with ready queue

* Remove separate SCHEDULER_STATE static

* Move scheduler to new file

* Reorganize, allow restarting scheduler

* Fix InternalMemory polyfill

* Use SingleShotTimer internally

* Implement a simple timer queue

* Extract run queue, wake tasks, store reason of scheduler event

* Add inherent function to get current task ptr

* Reimplement usleep with the timer queue

* Store current task in timer queue

* Sleep in timer queue task

* Remove ability to sleep arbitrary tasks

* More logging

* Clear timer interrupt in timer handler

* Even more logging

* Merge mutexes into semaphores
2025-09-09 09:57:35 +00:00
Juraj Sadel
e888f574fb
Update embassy-futures (#4079) 2025-09-08 14:39:42 +00:00
Dániel Buga
29ded39fe2
Add more implementation docs (#4078) 2025-09-08 13:46:57 +00:00
millibyte-products
e15e837246
Move adc channel from associated constant to function (#3942) (#3943)
* Move adc channel from associated constant to function

* Move adc channel from associated constant to function

* Syntax cleanup

* RISCV and Format fixes

* FIx xtensa

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-09-08 13:11:44 +00:00
Dániel Buga
779228ef28
Tweak driver to better model FreeRTOS APIs (#4076) 2025-09-08 12:44:29 +00:00
Dániel Buga
2b906e5b47
preempt - Abstract away blob ticks (#4063)
* Fix sleep

* Remove unused timeout from mutex_lock

* Abstract away blob ticks

* Update esp-radio/src/time.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Don't sleep for 10s

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-08 11:36:04 +00:00
Juraj Sadel
044e042eda
Try to run extras and host-tests on self-hosted(mac-mini) and GH-ubuntu-latest runners (#4052) 2025-09-08 10:08:47 +00:00
Björn Quentin
27c89c3adc
Fix wifi event names (#4065)
* Fix wifi event names

* CHANGELOG.md

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2025-09-08 07:09:04 +00:00
Fun Maker
bea71a1884
Bump embassy-embedded-hal version to 0.5.0 in esp-hal deps (#4075) 2025-09-07 14:50:27 +00:00
Juraj Sadel
15096b2d89
fix nightly ci (#4074) 2025-09-07 12:56:56 +00:00
Alexei Pastuchov
6aaf12a08d
examples/README.md: clarify xtask subcommand usage and arguments (#4067)
- Update example commands to use the new `--chip` argument format for `build examples` and `run example` subcommands.
- Improve clarity by showing explicit argument order and usage.
- Reflect recent changes in xtask interface for building and running examples.

Signed-off-by: Alexei Pastuchov <info@maximka.de>
2025-09-06 10:01:15 +00:00
Björn Quentin
7248d3d7d2
Make BLE work on ESP32-C2 with 26 MHz Xtal (#4062)
* Make BLE work on ESP32-C2 with 26 MHz Xtal

* CHANGELOG.md
2025-09-05 17:04:39 +00:00
Dániel Buga
445f6fc1ad
Add task priority to the preempt driver (#4064) 2025-09-05 16:30:16 +00:00
Dániel Buga
b9dd86258a
Add a function to retrieve a semaphore's counter value (#4066) 2025-09-05 15:37:41 +00:00
Dániel Buga
6dd0edd492
Teeny-tiny scheduler improvements (#4061)
* Avoid swapping to the same task

* Allow scheduling multiple tasks to be deleted

* Add task state
2025-09-05 15:01:17 +00:00
Dániel Buga
24d2122c14
Remove ConcurrentQueue & other minor tweaks (#4058)
* Remove ConcurrentQueue

* Unrequire preempt driver for 802.15.4
2025-09-05 14:59:08 +00:00
Björn Quentin
105c163306
Remove pointless functions (#4060)
* Remove pointless functions

* CHANGELOG
2025-09-05 14:10:43 +00:00
Dániel Buga
91e0cea412
Update embassy, embedded-test (#3945) 2025-09-05 13:51:26 +00:00
Jesse Braham
67e0b65ee4
Add a note regarding running on the second core to esp-radio documentation (#4037) 2025-09-05 11:59:13 +00:00
Jesse Braham
9be325cf83
Remove migration guides for old package versions (#4048) 2025-09-05 11:10:22 +00:00