59 Commits

Author SHA1 Message Date
Jesse Braham
7fce6e32f2
Update to 1.0.0-rc.1 version of embedded-hal-* crates (#747)
* Update a bunch of dependencies

* Implement `embedded-io` and `embedded-io-async` traits for USB Serial JTAG

* Implement `embedded-io` and `embedded-io-async` traits for UART

* Fix `embassy_serial` examples

* Update CHANGELOG

* Address review comments
2023-08-22 14:53:41 +01:00
Dániel Buga
0c47ceda3a
Fix embassy-time tick rates (#746) 2023-08-20 17:31:25 +01:00
Jesse Braham
422eb21186 Convert dependencies to dev-dependencies where able 2023-08-16 09:19:11 -07:00
Dániel Buga
37e24af753
Make examples debuggable (#728) 2023-08-16 09:04:14 +02:00
Björn Quentin
92bda00296
Remove heap related symbols, use all remaining memory for the stack (#716)
* Use all remaining memory for stack(s)

* Remove HEAP related code from RISCV linker scripts

* Fix direct-boot / mcu-boot linker scripts

* Use a statically allocated stack for core-1
2023-08-14 13:38:36 +02:00
Jesse Braham
846f3b0b50
New package releases (#713)
* Add/update `rust-version` to manifests where it is missing or out of date

* Use latest versions of published PACs

* New package releases
2023-08-10 08:44:15 -07:00
onsdagens
d6d5e0c86b
Adding direct vector table hooking support for RISC-V's (#621)
* direct vectoring support added

* provide minimal handlers for hooking the vector table directly

* changed direct vectoring interrupt enable interface to map to CPU interrupt

* direct vectoring interrupt nesting

* removed unused dependency

* added tentative c2 and c6 support for direct vector table hooking

* added direct vectoring examples

* added direct vectoring examples

* updated changelog

* added direct vectoring to CI

* Added H2 support and example, moved helpers to esp-hal-common

* Added H2 direct vectoring example to CI

* Removed remnants of removed feature

* C6 and H2 examples fixed

* C6 and H2 examples fixed

* C6 and H2 examples fixed

* Comment fixed

* Added preemption flag to RT

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-08-01 16:28:40 +01:00
Jesse Braham
00fac71b68
Update the PACs and resolve breaking changes, simplify rmt driver (#695)
* Update to latest (unreleased) versions of PACs

* Update `SDMCC` peripheral to `SDHOST` for ESP32

* Fix `USB_DEVICE` interrupts

* Fix references to various renamed GPIO fields for ESP32-S2

* Update and re-organize the `rmt` driver

* Update CHANGELOG
2023-07-27 23:16:39 +01:00
Jesse Braham
a95f6efb35
Update esp-hal-smartled to use the new rmt driver, remove old pulse_control driver (#694)
* Remove the old `pulse_control` driver

* Update `esp-hal-smartled` to use the new `rmt` driver instead

* Update the `hello_rgb` example for each chip

* Update CHANGELOG
2023-07-27 16:07:15 +01:00
Alex Johnson
debe2b8004
fixed async read w/o at_cmd (#652)
* fixed async read w/o at_cmd

* configurtion checks  for async `read`

* remove fifo thrhd check
2023-07-25 12:19:59 +01:00
Björn Quentin
170d590b67
Make in-progress DMA transfers potentially fallible (#665) 2023-07-22 20:14:57 +01:00
Björn Quentin
213dde9304
Add a new RMT driver (#653)
* Add a new RMT driver

* Add CHANGELOG entry

* Fix typos
2023-07-19 10:54:52 -07:00
Scott Mabin
f1fce08a94
Move segment aliasing to linkall.x (#655)
* Move segment aliasing to linkall.x, this allows other projects to define there own alias whilst still being able to use esp-hal linker scripts

* Move rwtext in front of rwdata

* Re-arrange include

* Fix s3 direct boot script
2023-07-18 07:17:52 -07:00
Jesse Braham
c1b10e7993 Use latest published release of embassy-time 2023-07-06 07:16:24 -07:00
Dániel Buga
b1e8c6e818
Some minor cleanup (#642)
* Fix typo

* Don't require importing paste

* Clean up warnings

* Clean up Clippy warnings
2023-07-05 11:09:04 -07:00
Jesse Braham
49b2a3bf21
Update embedded-hal-* alpha packages to their latest versions (#640)
* Update `embedded-hal-*` alpha packages to their latest versions

* Update CHANGELOG

* Remove unnecessary patch
2023-07-05 09:09:07 -07:00
Jesse Braham
8b8eea66ee New package releases 2023-07-04 10:57:06 -07:00
Jesse Braham
26473baf0e
Assorted small fixes and improvements (#635)
* Include the `esp-riscv-rt` package in VS Code workspace

* Fix a couple warnings

* Update dependencies

* Top-level README improvements
2023-07-04 10:41:32 -07:00
Hannah Kolbeck
a86c2ac310
Clean up a stray comment in rtc_time examples (#630)
Co-authored-by: Hannah Kolbeck <hskolbeck@gmail.com>
2023-06-30 12:30:05 +01:00
Jesse Braham
6869f8c783 Update embedded-graphics and ssd1306, address breaking changes 2023-06-28 09:47:43 -07:00
Dániel Buga
2371c30542
Simplify user-facing DMA channel types (#626)
* Introduce a trait for DMA channels

This trait is then used to hold types related to the particular DMA channel. This change allows us to simplify user-facing types.

* Remove private type from I2s

* Remove redundant spi3 example, update examples

* Merge markdown sections

* Add changelog entry
2023-06-28 13:03:49 +01:00
Jesse Braham
c5f0060d34
Miscellaneous fixes/improvements (#627)
* Un-comment remaining device peripheral definitions for ESP32-H2

* Re-work `RadioExt` implementations, add support for ESP32-H2

* README updates for ESP32-C6/H2

* Update CHANGELOG
2023-06-27 07:14:31 -07:00
Alex Johnson
bce7210b01
Async serial uart read (#620)
* implement embassy async uart read

* Add embassy async read support for uart

* changes based on review

* fix CI failures

* change review #2

* fixed re-opened PR number

* changes review no.3

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-06-26 16:56:32 +01:00
Jordan Halase
a562863cde
Add MD5 functionality from ESP ROM (#618)
* Add ROM MD5 definitions in linker and devices

* Add initial MD5 support

* Implement traits and add comments to MD5 module

* Add MD5 example to ESP32-C3

* Test MD5 context on the quick brown fox

* Implemenr From<Context> for Digest

* Add MD5 to the rest of the examples

* Add docs for MD5

* Remove #[repr(transparent)] from md5::Digest

* Update CHANGELOG.md
2023-06-26 09:01:34 +02:00
Scott Mabin
087bfa570b
Fix insertion location of trap section in ram (#605)
* Fix insertion location of trap section in ram

* Apply fixes for db and mcuboot

* Add changelog
2023-06-23 12:00:16 +01:00
Jesse Braham
5af8b6387a
Clean up re-exports and make small improvements to documentation (#607)
* Create issue_handler.yml

* No longer re-export `embedded-hal`, hide exported macros in documentation

* Add simple package-level documentation for each HAL package

* Clean up/simplify re-exports

* Fix the examples that I broke

* Ensure top-level modules/types/functions have doc comments

* Update CHANGELOG

* Re-export the `soc::psram` module where available

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2023-06-22 06:46:50 -07:00
Sergio Gasquez Arcos
310809a5bf
Update documentation (#606)
* docs: 📝 Update documentation

* docs: 🐛 Fix typo
2023-06-21 04:03:15 -07:00
Sergio Gasquez Arcos
e3b77418c4
ESP32H2: Improve examples documentation (#598)
* style: 🎨 Improve print format

* docs: 📝 Update advanced_serial documentation

* docs: 📝 Update examples documentation
2023-06-19 07:14:12 -07:00
Jesse Braham
a941e6f8a5
Add a debug feature to enable the PACs' impl-register-debug feature (#596)
* Add a `debug` feature to enable the PACs' `impl-register-debug` feature

* Update CHANGELOG
2023-06-19 06:34:04 -07:00
Juraj Sadel
3b689b2a52
H2: Add I2S support (#597)
* H2: Add initial i2s support and i2s_read and i2s_sound examples

* Add I2S_SCLK and I2S_DEFAULT_CLK_SRC constants for all chips

* Update I2S driver

* fmt

* Add changelog

* Change DIN GPIO17 to GPIO14 in ESP32 i2s_read example
2023-06-19 06:24:09 -07:00
Kirill Mikhailov
524a9dfe96
Updated README.md for ESP32-H2 (#585)
* First README prototype

* README update

Fixed link, uncommented Matrix link, made some preparations before docs will be posted

* Added a change to CHANGELOG

* typo: return header sign back
2023-06-15 05:15:51 -07:00
Sergio Gasquez Arcos
78369097ad
Initial support for RNG in ESP32-H2 (#591)
* feat:  Initial RNG support

* build: 📌 Update rev for H2

* docs: 📝 Update changelog
2023-06-14 07:31:47 -07:00
Jordan Halase
f22cd7370d
Add CRC functionality from ESP ROM (#587)
* Add ESP ROM CRC and fallbacks to HAL

* Cargo fmt

* Add CRC examples

* Cargo fmt

* Cargo fmt and clippy (all)

* Update CHANGELOG.md
2023-06-14 05:40:51 -07:00
Sergio Gasquez Arcos
38ebf13bc9
Initial support for smartled in ESP32-H2 (#589)
* feat:  Add hello_rgb example

* feat:  Initial support for RMT

* fix: 🐛 Adjust frequency for H2

* docs: 📝 Update changelog

* build: 📌 Update H2 pacs
2023-06-14 01:52:23 -07:00
Juraj Sadel
aef0ff4e45
H2: Add timer_interrupt example (#576)
* H2: Use PLL_48M_CLK in Timg driver and add 	imer_interrupt example

* Clean timer driver, add helper configure_src_clk and configure_wdt_src_clk methods

* H2: Add 	imer_interrupt example

* add helper methods for selecting default clk src

* Change PR number in the Changelog
2023-06-06 07:18:20 -07:00
bjoernQ
3dabd57a1d Fix ESP32-H2 direct-boot 2023-05-31 08:39:39 -07:00
Jesse Braham
e096bca561
Add embassy_serial and embassy_wait examples for ESP32-H2 (#569)
* Add `embassy_{serial,wait}` examples for ESP32-H2

* Update the CHANGELOG
2023-05-31 07:17:39 -07:00
Juraj Sadel
b1630db5d2
H2: Add initial ADC support with example (#565)
* H2: Add initial ADC support with example

* Add changelog
2023-05-31 06:03:27 -07:00
Jesse Braham
d86300f799
Add all SPI examples for the ESP32-H2 (#549)
* Update the `GDMA` driver to support the ESP32-H2

* Update the `SPI` driver to support the ESP32-H2

* Add `SPI` examples for ESP32-H2

* Update CHANGELOG

* Remove copy-pasted references to ESP32-C6

* Update GPIO pins used in SPI examples, add `qspi_flash` example

* Update SPI clock configuration to produce correct clock rate

* Correct comment regarding clock source frequency

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

* H2: Add PLL_48M_CLK src to ClockControl and RawClocks

* H2: Use PLL_48M_CLK as SPI clk src

* H2: cleanup commented block in SPI driver

* H2: update docs comment in embassy_spi example

* fmt

* Add a new line in embassy_spi example

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2023-05-31 09:49:13 +02:00
Sergio Gasquez Arcos
faf60b6d95
Initial support for ASSIST_DEBUG in ESP32-H2 (#566)
* feat:  Add debug_assist example

* feat:  Enable peripherals

* docs: 📝 Add RAM comments

* feat: ️ Update debug_assist example

* docs: 📝 Update changelog

* build: 📌 Update esp-pacs rev for h2

* style: 🎨 Move assist_debug_region* and assist_debug_sp* to peripherals defined by developers
2023-05-30 09:10:55 -07:00
Juraj Sadel
a82c9dbc45 H2: Add initial LEDC support with example 2023-05-29 07:11:44 -07:00
sethp
171e66e87a
feat(riscv): relocate .trap machinery to RAM (#541)
* feat: relocate riscv isr to iram

Previously, the trap vector itself and its immediate callees
(`_start_trap` and `_start_trap_rust_hal`) were located in the mapped
instruction flash range `0x420..`, increasing cache pressure and adding
variable latency to the very beginning of the interrupt/exception
service flow.

This change places those routines in iram directly:

```
   Num:    Value  Size Type    Bind   Vis      Ndx Name
 48177: 40380280  2428 FUNC    GLOBAL DEFAULT    6 _start_trap_rust_hal
 48197: 40380bfc    54 FUNC    GLOBAL DEFAULT    6 _start_trap_rust
 48265: 40380200     0 FUNC    GLOBAL DEFAULT    6 _vector_table
 48349: 40380100     0 NOTYPE  GLOBAL DEFAULT    6 default_start_trap
 48350: 40380100     0 NOTYPE  GLOBAL DEFAULT    6 _start_trap
```

As seen via `readelf -W -s -C ./target/riscv32imc-unknown-none-elf/debug/examples/gpio_interrupt | grep -E _start_trap\|_vector\|Ndx`

* feat(riscv): place .trap in RAM

This change follows through on relocating the `_vector_table`,
`_start_trap`, and `_start_trap_rust` functions for all present
build/link modes for the 'c2, 'c3, 'c6, and 'h2.

It has been tested by running the `software_interrupts` example for the
'c3 in direct-boot and esp-bootloader contexts, but I wasn't able to
identify how to run the `mcu-boot` mode for the 'c3, nor do I have
present access to any of the other devices for testing.

* docs: Update CHANGELOG.md
2023-05-26 20:48:49 +01:00
Jesse Braham
748512f849
Add interrupt-related examples for the ESP32-H2 (#557)
* Add interrupt-related examples for the ESP32-H2

* Update CI workflow to actually check `interrupt_preemption` examples
2023-05-25 09:22:26 -07:00
Sergio Gasquez Arcos
14ac8c3c80
Initial support for RMT in ESP32-H2 (#556)
* feat:  Enable RMT peripheral

* feat:  Rename RMT GPIOs

* feat:  Add clock source, ram size and ram start

* feat:  Rename GPIOs

* feat:  Add pulse_control example

* fix: 🐛 Fix example clock

* feat:  Initial support for H2

* fix: 📝 Fix typo

* ci:  Enable check on H2

* build: 📌 Update esp-pac revision, use fork

* docs: 📝 Update example documentation

* docs: 📝 Add todo

* docs: 📝 Update changelog

* feat:  Add ram example

* build: 📌 Update H2 PAC

* docs: 📝 Remove todo
2023-05-23 10:14:17 -07:00
Sergio Gasquez Arcos
2c2bb25262
Initial support for PCNT in ESP32-H2 (#551)
* feat:  Enable PCNT peripheral

* feat:  Rename PCNT GPIOs

* feat:  Add pcnt_encoder example

* build: ⬆️ Update esp-pacs revision

* docs: 📝 Update changelog
2023-05-19 09:27:11 +02:00
Jesse Braham
661a9de5eb
Add some miscellaneous examples for the ESP32-H2 (#548)
* Add some miscellaneous examples for the ESP32-H2

* Update the CHANGELOG
2023-05-17 07:13:47 -07:00
Sergio Gasquez Arcos
a7e4400fb5
Initial support for MCPWM in ESP32-H2 (#544)
* feat:  Enable mcpwm peripheral

* feat:  Initial support MCPWM

* fix: 🐛 Select the rigth clock

* fix: 🐛 Select the XTAL clock

* docs: 📝 Update changelog
2023-05-16 09:00:11 -07:00
Sergio Gasquez Arcos
e2442f2d47
Initial support for I2C in ESP32-H2 (#538)
* feat:  Enable i2c peripheral

* feat:  Add I2cExt1 for H2

* feat:  Initial i2c support

* feat:  Add i2c examples

* ci:  Add embassy_i2c check

* ci: 🐛 Fix features

* docs: 📝 Update changelog

* feat:  Add read_efuse example
2023-05-15 16:20:01 +02:00
Sergio Gasquez Arcos
70e453902c
Initial support for RSA in ESP32-H2 (#526)
* feat:  Initial support for RSA

* docs: 📝 Update docstring

* docs: 📝 Update changelog

* fix: 🔥 Remove duplicated code
2023-05-15 09:42:19 +01:00
Sergio Gasquez Arcos
fa3627c1fd
Add blinky_erased_pins example for ESP32-H2 (#530)
* feat:  Add blinky_erased_pins example

* docs: 📝 Update docstrings

* docs: 📝 Update changelog
2023-05-12 14:18:04 +02:00