2592 Commits

Author SHA1 Message Date
Juraj Sadel
693b99a7e3
Remove unused deps (#4184) 2025-09-26 07:07:17 +00:00
Kirill Mikhailov
c700b8bda3
Fix RISC-V direct vectoring and re-enable interrupts HIL test (#4171)
* Fix direct vectoring

* WIP global_asm

* resolve reviews

ugh

* Document `enable_direct` function more, remove misc conversion.

fix

* Make instructions stricter
2025-09-25 13:07:10 +00:00
Björn Quentin
4b7fbc79df
Format MEPC to let espflash resolve the address (#4179) 2025-09-25 08:44:46 +00:00
Dominic Fischer
a47f0b8a4b
Replace unsafe with new std API (#4178)
* Replace unsafe with new std API

* bump

* Fix link in readme

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-25 07:36:26 +00:00
Björn Quentin
c233ca70fe
Init syscall table (#4177)
* Init syscall table

* CHANGELOG

* Address review comments
2025-09-25 07:01:48 +00:00
Dániel Buga
caadbbba41
Separate esp-radio support code (#4175) 2025-09-24 11:47:25 +00:00
Dániel Buga
6baba85f9e
Only lock scheduler once in mutex ops (#4176) 2025-09-24 09:54:35 +00:00
Juraj Sadel
0180a38ba0
esp-storage now depends on esp-hal (#4173)
* esp-storage now depends on esp-hal

* clean up cfg gates

* changelog
2025-09-24 08:55:26 +00:00
Dániel Buga
f3907af22b
Possibly awful SMP implementation (#4152)
* Test and fix time slicing

* Possibly awful SMP implementation

Co-authored-by: g1ibby <wss.world@gmail.com>

* Remove __esp_radio_builtin_scheduler

---------

Co-authored-by: g1ibby <wss.world@gmail.com>
2025-09-24 08:34:55 +00:00
Benedikt
129fa9676b
RMT: move more things to esp-metadata, improve HIL test robustness (#4138)
* RMT: use hil_test::assert{,eq}, clarify potential timing issues

* RMT: prevent flaky HIL tests by matching pulse codes fuzzily

* RMT: add rmt_clock_rate HIL test

* RMT: add esp-metadata flags for most hardware features

* RMT: move supported clock sources to esp-metadata

* RMT: move max_idle_threshold to esp-metadata

from a quick glance at the TRMs, it seems that these values are also
wrong! e.g. c3 & c6 appear to support up to 0x7FFF -> this should be verified
and fixed if correct
2025-09-23 09:50:38 +00:00
Juraj Sadel
8e6b5919b0
esp-radio: Wrap C types that are needed fot pub API (#4148) 2025-09-22 15:50:31 +00:00
Dániel Buga
90382c92ad
Add task name to the preempt api (#4164) 2025-09-22 15:34:28 +00:00
Dániel Buga
94d24a99c3
Force 16-byte stack alignment (#4166) 2025-09-22 15:31:43 +00:00
Björn Quentin
5da68279bc
Rework ota (#4150)
* OTA Fixes

- Support up to 16 OTA app partitions
- Fixed some bugs and shortcomings
- Added an OTA helper

* Changelog

* CHANGELOG.md

* Fix

* Constants

* Code comments

* Make code more readable

* Fix auto-complete's sins
2025-09-22 13:48:59 +00:00
Juraj Sadel
5129e326a0
Remove unused deps across workspace (#4158) 2025-09-22 12:10:43 +00:00
Dániel Buga
7edd62d15b
Consistent println output, take 2 (#4162) 2025-09-22 10:22:33 +00:00
Dániel Buga
6ee143eef9
Check stack overflow in main task (#4161)
* Check main task for stack overflow

* Reuse esp-hal's config
2025-09-22 10:01:09 +00:00
Dániel Buga
0ede07d697
Revert "Put the whole print macro in a critical section (#4154)" (#4159)
This reverts commit 9f7193fec49623a34583bae879099d43d2d495fc.
2025-09-22 09:17:14 +00:00
Dániel Buga
13d66de06d
Clean up interrupt mask operations (#4153)
* Clean up interrupt mask operations

* Remove unnecessary interrupt enabling
2025-09-22 07:09:38 +00:00
Juraj Sadel
44e7aea358
esp-storage: Clean warnings when running host-tests (#4151)
* esp-storage: Clean warnings when running host-tests

* Emit all check-cfg lines

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-22 06:22:10 +00:00
Dániel Buga
3e015dfd1c
Read thread ID with interrupts disabled (#4155) 2025-09-19 18:11:36 +00:00
Dániel Buga
9f7193fec4
Put the whole print macro in a critical section (#4154) 2025-09-19 18:09:57 +00:00
Ulf Lilleengen
62529e2fd3
chore: update bt-hci version (#4146)
* chore: update bt-hci version

* chore: use released version of trouble-host

* Make sure clippy fails, fix warning

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-19 13:48:49 +00:00
Simon Neuenhausen
8e29b925cb
Split out PHY init into esp-phy crate. (#3892)
* Minimal infrastructure

* Implemented dig reg backup.

* usb bbpll

* Removed default feature.

* OS adapter tweaks

* Fixed S2 and implemented PhyController

* Added manual deinit.

* Fixed linker scripts and migrated esp-radio to esp-phy

* Fixed warnings.

* Fixed NPL

* Tried fixing NPL again

* Fixed ieee802154

* Fixed reading chip version of S3.

* fmt

* Added changelog entry

* Added changelog for esp-radio

* Deleted chip specific common adapters.

* Added docs and unstable

* Migrated cal data load/store to esp-phy

* Fixed PHY cal CI error

* Removed instability

* Removed feature from esp-phy

* fmt

* Fixed esp-sync docs.

* Removed log with CONFIG

* Removed nonreentrantmutex from common adapter

* Disable reset for radio blocks where required.

* Fixed cfg_if for s2

* fmt

* Added bt_bb_v2_init_cmplx to phy_provides.x

* Added CHANGELOG

* Moved EXTERN and fixed comment.

* Fixed lint

* Fixed common adapter again.

* Docs and Readme.

* Fixed ref count.

* This time pls.

* Added MAC time update CB for esp-radio

* fixed field init

* Fixed inconsistency in metadata

* Removed useless changelog entry

* Fixed S2.

* Swaped addr_of for &raw mut

* Properly initialize NVS

* Fixed lint

* Fixed C6

* Fixed remaining issues

* Fixed CI

* Added link

* Updated esp-wifi-sys in esp-phy

* Address reviews

* Renamed PHY lock

* Moved syscon let in common_adapter

* Fmt

* Remove critical_section

* Don't steal when not necessary

* Added esp-phy changelog to workflow

* Add cargo metadata for esp-phy

* Added reference to #4015

* Refixed Cargo.toml

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-19 14:14:25 +00:00
Dániel Buga
83105b4dbb
Replace some inline ASM with xtensa_lx implementations (#4144)
* Fix incorrect uses of wsr.intset

* Also use interrupt::clear

* Also replace wsr.vecbase

* Remove cause_sw_intr_to_core from C3/S3
2025-09-19 11:52:33 +00:00
Dániel Buga
e57530c9b5
Process timer queue in timer interrupt handler (#4147) 2025-09-19 10:45:21 +00:00
Björn Quentin
37f048f20b
Fix ota-update example (#4145) 2025-09-19 08:11:24 +00:00
Dániel Buga
5e938322f4
Remove static muts from multicore control code (#4143) 2025-09-19 07:47:32 +00:00
Dániel Buga
f0d029b29d
Fix running specific test (#4142) 2025-09-19 05:11:40 +00:00
Dániel Buga
69776eb638
Even more cargo-batch, encode configs in Cargo.toml (#4134)
* Abstract out LP-core targeting packages

* Encode targets_lp_core in Cargo.toml

* Encode architecture compatibility in Cargo.toml

* Move semver_checked into Cargo.toml

* Cache parsed tomls

* Parse simple feature sets from Cargo.toml

* Move all basic feature rules to Cargo.toml

* Add check configs

* Limit command length on Windows

* Update cargo.rs

* Add clippy configs

* Use a single syntax, use a single doc-config line

* Fix known problems

* Run cargo check in CI command

* Fix more problems

* Fix esp-storage
2025-09-18 16:15:35 +00:00
Juraj Sadel
9e892db654
clean up (#4141) 2025-09-18 15:30:38 +00:00
Juraj Sadel
3d0d20002e
Make a singleton form FlashStorage constructor, removed Default (#4132)
* Make a singleton form FlashStorage constructor, removed Default

* changelog

* Simplify, don't need the Singleton

* changelog

* reviews and build errors

* fix dead links

* fmt
2025-09-18 14:33:42 +00:00
Dániel Buga
1eed542f64
Use cargo-batch to build tests and examples, avoid linting so much (#4108)
* Use cargo-batch

* Run CI on mac runner

* Rely on MSRV and nightly jobs to lint

* Build docs separately

* Don't copy examples - fix builds on stable

* Run everything by default, set CI env var in ci command

* Run batched commands with RUSTC_BOOTSTRAP enabled

* Force cargo-batch to correctly ignore unstable option

* Test with nightly

* Use a persistent target folder, remove cache

* Don't delete the lp examples

* Restore target dir

* Build with stable again

* Fix rebase fail

* Remove handling tests

* Remove redundant code

* Restore repeated test run option

* Add simpler cargo check

* Introduce check-packages

* Remove stabilized -Zdoctest-xcompile

* Clean up commented code

* Remove more stuff

* Fix uart_uhci test

* No badger for us
2025-09-18 11:25:11 +00:00
Benedikt
8e58a753b6
RMT: refactor copies to/from channel RAM (#4126)
* RMT: add check_data_eq to log more details on test failure

if defmt is enabled

* RMT: add minimal RmtWriter

- de-duplicates the copy-to-hardware code
- splits copying data to the buffer and `start_send`
- this also paves the way for supporting other data types (like
  iterators instead of slices)

* RMT: add minimal RmtReader

- de-duplicates the copy-from-hardware code
- this also paves the way for supporting other data types (like
  iterators instead of slices) and wrapping rx (RmtReader as implemented
  here already supports that, but it's unused for now)
2025-09-18 08:48:43 +00:00
Szybet
97b34faa1b
Improve the UHCI Api, configurable after splitting and dma channel as generic (#4039)
* Make UHCI more configurable

* UHCI hil tests improvements

* change DMA to use DmaXXChannel

* further merging

* Apply suggested changes

* split structs

* changelog

* changelog + format
2025-09-18 07:43:34 +00:00
Juraj Sadel
aadbf3c076
Remove duplicated log (#4133) 2025-09-17 14:04:11 +00:00
Dániel Buga
42297811be
Use TLSF by default (#4130)
* Use TLSF by default

* Update example heap usage to leave more stack

* Fix test configurations
2025-09-17 14:03:32 +00:00
florianL21
acf3327fa3
Esp storage implement multi core strategies (#4082)
* First draft of multicore strategies implementation

* Implemented second core active detection mechanism
Removed dependency to esp-hal

* Guarded flash unlock as well
Made esp_metadata_generated only check for chips if not building with "emulation"
Added more documentation

* Applied suggestions

* Restored second core active detection for esp32

* Flipped check of stall condition on esp32

* Implement defmt::Format and common traits

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2025-09-17 13:00:05 +00:00
Juraj Sadel
555922b887
Add defmt to esp-storage (#4127)
* Add defmt to esp-storage

* changelog

* Fix technically-incorrect feature comment

* Add some docs for pub API

* Move demft in the optional deps

* reviews

* reviews
2025-09-17 11:09:23 +00:00
Benedikt
099b70fef9
RMT: move channel specification to esp-metadata (#4131) 2025-09-17 11:05:29 +00:00
Dániel Buga
38bd6a5a88
ESP32/I2S: Allow connecting MCLK (#4128)
* Support CLK_OUT on ESP32 I2S

* Enable example

* Remove mclk_signal from ESP32
2025-09-17 10:40:14 +00:00
Juraj Sadel
139ce0e0c7
xtask housekeeping, adding logs, adding missing docs (#4106)
* xtask housekeeping, adding logs, adding missing docs

* Use anyhow::Context
2025-09-17 10:17:29 +00:00
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