Commit Graph

66 Commits

Author SHA1 Message Date
Jesse Braham
5ddfacb1c6 Re-enable RTC in remaining examples, fix linker scripts, fix CI 2022-10-12 10:01:13 -07:00
Jesse Braham
c55ef277d8 Add the ESP32-C2 to the CI workflow, update README 2022-10-11 10:12:42 -07:00
Jesse Braham
797d9b5e02 Minor CI tweaks 2022-08-30 11:32:31 -07:00
Jesse Braham
6f20358124
Update the Cargo manifests and top-level README (#168)
* Add the `rust-version` key to each Cargo manifest

* Normalize dependencies and features in each Cargo manifest

* Enable all features in CI when checking examples

* Update the top-level README
2022-08-25 09:20:05 -07:00
Scott Mabin
be184a552d
critical_section implementations & esp_backtrace (#151)
* CS impl

* use CS Mutex in C3 examples

* use CS Mutex in S2 examples

* Update esp32 example

* run fmt

* Update S3 examples

* Remove uses of unsafe where no longer required

* use esp_backtrace in examples

* fix import & fmt once more

* Bump MSRV to 1.60.0

Co-authored-by: Jesse Braham <jesse@beta7.io>
2022-08-22 20:02:28 +01:00
Jesse Braham
82371f526c Add jobs to the CI workflow to verify the MSRV 2022-08-03 17:12:18 +02:00
Scott Mabin
1789780d06
Xtensa vectored interrupts (#103)
* Xtensa interrupt vectoring: peripheral source

- Initial Xtensa vectoring, updated esp32 gpio example to use new interrupt macro.
- Only peripheral sources supported.
- Only level one priority supported.
- CPU & Edge interrupts still need to be handled.

* Xtensa interrupt vectoring: CPU & EDGE

- Add support for handling CPU interrupts and edge interrupts
- PR required to xtensa-lx-rt for CPU handlers

* Xtensa interrupt vectoring: Priority

- Finally implement priortization
- Only three priorities available at the moment. Xtensa programmer guide
  discourages using highpri interrupts in Rust/C. Guide also mentions
  using software priortization to increase the number of Priorities
  available

* support CPU interrupts, using patch xtensa-lx-rt

* Update example

* Add support & examples for the s2 & s3 too

* Fix formatting and missing imports

* Run interrupt handling in ram, optionally run the vector handler in ram in the examples

* Use xtensa_lx::Mutex CS when enabling interrupts

* Run clippy on each target

* Remove redundant features

* Fix C3 builds

* make enable unsafe. Add note about preallocated interrupts in vectored mode.

* Remove `INTERRUPT_LEVELS` static

The interrupt levels static introduces a few issues
  - A lock is needed when configuring interrupts to keep
    INTERRUPT_LEVELS in a consistent state
  - Interrupts enabled from outside the Rust domain wouldn't be
    serviced, this is the case with the wifi blobs

To remove it, the prioty configuration is now calculated dynamically in
the interrupt handler. Essentially INTERRUPT_LEVELS is now created once
the interrupt triggers. It has some benefits, such as only having to
look at interrupts configured on the current core, not both, but there
is of course an overhead with doing this in the interrupt.

* Allow raw interrupts on levels 4-7, whilst also supporting vectoring on levels 1-3

* rename core number features

* Fix examples and formatting

* use xtensa-lx-rt release, update pacs

* Support passing the trap frame into interrupt handlers

* cfg away the #[interrupt] macro when not using vectoring

* rename enable to map

move vectored feature to chip specific hals

* export vectored functions

- rename `enable_with_priority` to `enable`
- add docs for interrupt macro

* Update all examples to use vectored interrupts
2022-07-25 07:12:34 -07:00
Jesse Braham
a5bdab7316 Update the CI to include the hello_rgb example in checks again 2022-07-20 10:44:04 -07:00
Jesse Braham
b7e84bc7fd Update CI workflow now that we aren't in a workspace 2022-05-31 10:17:13 -07:00
Jesse Braham
80e22ba508 Enforce clippy lints in CI 2022-05-05 14:18:09 +02:00
Jesse Braham
3cb276838e Update xtensa-toolchain action and fix build errors 2022-04-28 16:15:32 +02:00
Jesse Braham
1f033f4e65 If one device fails in CI, do not cancel the checks for others in the matrix 2022-03-29 09:33:39 -07:00
bjoernQ
545f997b07 Support ESP32S3 2022-02-16 15:44:06 +00:00
bjoernQ
0039996e8e Remove obsolete FIXME comment, check ESP32S2 in CI builds 2022-02-14 18:04:48 +00:00
Jesse Braham
9bbe5e0987 Allow for CI runs to be manually dispatched 2022-01-13 09:08:55 -08:00
Jesse Braham
61bd8ee8d4 Add a CI workflow to check the examples for each package 2022-01-07 16:35:59 -08:00