Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
21f9ca4
Update `esp-hal-procmacros` and `esp-hal-smartled` packages to suppor…
jessebraham Mar 27, 2023
60833de
Get scaffolding in place to get `esp-hal-common` building with `esp32…
jessebraham Mar 27, 2023
e8e1c75
Made some progress, some aside functions are already done, bbpll conf…
playfulFence Apr 3, 2023
de2ad05
More progress, all necessary functions are implemented (not every was…
playfulFence Apr 4, 2023
2e982bb
added bus update to function
playfulFence Apr 5, 2023
270dfcf
add esp32h2-hal package
playfulFence Apr 6, 2023
422ae60
remove offset for ROM (maybe temporarly)
playfulFence Apr 6, 2023
e985f24
comment yet unimplemented includes
playfulFence Apr 6, 2023
4a3a052
Provided (COMPLETELY NOT SURE if it's a real solution)
playfulFence Apr 6, 2023
ea86fcc
defined interrupt_map_base
playfulFence Apr 11, 2023
0e53e22
fix typo
playfulFence Apr 11, 2023
3c3aa28
Implemented boot_defaults and configure functions for clock
playfulFence Apr 12, 2023
99def53
Not providing _start_trap_rust_hal to the linker manually now
playfulFence Apr 12, 2023
eb0cc81
Typo: delete comment
playfulFence Apr 12, 2023
f27a004
Cleaning code(1): Removed unnecessary moves, registers, addresses, fu…
playfulFence Apr 13, 2023
8f6981a
Remove irrelevant comments
playfulFence Apr 14, 2023
a5961e1
Enable interrupt peripherals
playfulFence Apr 14, 2023
89994dc
Fix errors, wrong addresses and offsets. Added new CpuClock mode for …
playfulFence Apr 14, 2023
e58e44a
Added bus update, enabling and setting i2c mst clk frequency, deleted…
playfulFence Apr 18, 2023
082d333
fix CpuControl::start_app_core signature (#466)
dimpolo Apr 5, 2023
02ab793
Minor linker script additions
bjoernQ Apr 6, 2023
62c4b07
Use correct linker script comment style
bjoernQ Apr 6, 2023
bee1312
get_wakeup_cause: fix comparison error
liebman Apr 7, 2023
dc7a0a5
Use 192 as mclk_multiple for 24-bit I2S
raiker Apr 7, 2023
a503810
use bitflags to decode wakeup cause (#473)
liebman Apr 11, 2023
3e0353c
rsa peripheral support (#467)
matrixhead Apr 11, 2023
b3e5acc
Added software interrupt API, examples for all of the MCUs
onsdagens Apr 14, 2023
d0c19dd
Added software interrupt API, examples for all of the MCUs
onsdagens Apr 14, 2023
dec74b0
Pin nightly to 2023-03-09 to workaround a problem with embedded-hal-a…
bjoernQ Apr 17, 2023
2a45d1b
Fixed comments
onsdagens Apr 18, 2023
d63ab24
Fixed comments
onsdagens Apr 18, 2023
743793e
Fixed comments
onsdagens Apr 18, 2023
0c1922b
Get scaffolding in place to get `esp-hal-common` building with `esp32…
jessebraham Mar 27, 2023
a6c224d
Merge branch 'feature/esp32h2' into feature/esp32h2
playfulFence Apr 18, 2023
6cbcf0d
Updated Cargo.toml
playfulFence Apr 18, 2023
d6f80c3
Added esp32h2-hal and other ESP32-H2 to CI workflow
playfulFence Apr 18, 2023
0e93bce
Fix Cargo.toml and add a simple hello_world example
playfulFence Apr 18, 2023
aeab263
ci: Fix indentation
SergioGasquez Apr 19, 2023
f1f72f0
Update esp-backtrace version in Cargo.toml
playfulFence Apr 19, 2023
6a3c9ab
Adjust for rustfmt
playfulFence Apr 19, 2023
c2b0bfb
Adjust for rustfmt
playfulFence Apr 19, 2023
2755bb7
Adjust for rustfmt
playfulFence Apr 19, 2023
d82d74d
Deleted irrelevant comments, fixed wrong i2c_clock frequency
playfulFence Apr 20, 2023
958eadb
Update esp-hal-common/Cargo.toml
playfulFence Apr 20, 2023
126566c
Populated SocResetReason to get get_wakeup_cause function working
playfulFence Apr 20, 2023
498d07a
Update esp-hal-common/src/clock/clocks_ll/esp32h2.rs
playfulFence Apr 20, 2023
658a8af
PAC has been updated, should be working now
playfulFence Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
run: cd esp-hal-smartled/ && cargo +nightly-2023-03-09 check --features=esp32c3
- name: check (esp32c6)
run: cd esp-hal-smartled/ && cargo +nightly-2023-03-09 check --features=esp32c6
#- name: check (esp32h2)
# run: cd esp-hal-smartled/ && cargo +nightly-2023-03-09 check --features=esp3h2
# Check all Xtensa targets:
- name: check (esp32)
run: cd esp-hal-smartled/ && cargo +esp check --features=esp32,esp32_40mhz
Expand Down Expand Up @@ -180,6 +182,39 @@ jobs:
- name: check esp32c6-hal (async, spi)
run: cd esp32c6-hal/ && cargo +nightly-2023-03-09 check --example=embassy_spi --features=embassy,embassy-time-systick,async

esp32h2-hal:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imac-unknown-none-elf
toolchain: nightly-2023-03-09
components: rust-src
- uses: Swatinem/rust-cache@v2

# Perform a full build initially to verify that the examples not only
# build, but also link successfully.
# We also use this as an opportunity to verify that the examples link
# for each supported image format.
- name: build esp32h2-hal (no features)
run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 build --examples
- name: build esp32h2-hal (direct-boot)
run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 build --examples --features=direct-boot
# Subsequent steps can just check the examples instead, as we're already
# confident that they link.
- name: check esp32h2-hal (common features)
run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 check --examples --features=eh1,ufmt
# - name: check esp32h2-hal (async, systick)
# run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 check --example=embassy_hello_world --features=embassy,embassy-time-systick
# - name: check esp32h2-hal (async, timg0)
# run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 check --example=embassy_hello_world --features=embassy,embassy-time-timg0
# - name: check esp32h2-hal (async, gpio)
# run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 check --example=embassy_wait --features=embassy,embassy-time-systick,async
# - name: check esp32h2-hal (async, spi)
# run: cd esp32h2-hal/ && cargo +nightly-2023-03-09 check --example=embassy_spi --features=embassy,embassy-time-systick,async

esp32s2-hal:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -264,6 +299,8 @@ jobs:
run: cd esp32c3-hal/ && cargo check --features=eh1,ufmt
- name: msrv (esp32c6-hal)
run: cd esp32c6-hal/ && cargo check --features=eh1,ufmt
- name: msrv (esp32h2-hal)
run: cd esp32h2-hal/ && cargo check --features=eh1,ufmt

msrv-xtensa:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -305,6 +342,8 @@ jobs:
run: cargo +stable clippy --manifest-path=esp32c3-hal/Cargo.toml -- --no-deps
- name: clippy (esp32c6-hal)
run: cargo +stable clippy --manifest-path=esp32c6-hal/Cargo.toml -- --no-deps
- name: clippy (esp32h2-hal)
run: cargo +stable clippy --manifest-path=esp32h2-hal/Cargo.toml -- --no-deps

clippy-xtensa:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -357,6 +396,8 @@ jobs:
run: cargo fmt --all --manifest-path=esp32c3-hal/Cargo.toml -- --check
- name: rustfmt (esp32c6-hal)
run: cargo fmt --all --manifest-path=esp32c6-hal/Cargo.toml -- --check
- name: rustfmt (esp32h2-hal)
run: cargo fmt --all --manifest-path=esp32h2-hal/Cargo.toml -- --check
- name: rustfmt (esp32s2-hal)
run: cargo fmt --all --manifest-path=esp32s2-hal/Cargo.toml -- --check
- name: rustfmt (esp32s3-hal)
Expand Down
2 changes: 2 additions & 0 deletions esp-hal-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ esp32 = { version = "0.23.0", features = ["critical-section"], optional = true
esp32c2 = { version = "0.10.0", features = ["critical-section"], optional = true }
esp32c3 = { version = "0.13.0", features = ["critical-section"], optional = true }
esp32c6 = { version = "0.3.0", features = ["critical-section"], optional = true }
esp32h2 = { git = "https://github.com/esp-rs/esp-pacs", rev = "0ee1cea", package = "esp32h2", features = ["critical-section"], optional = true }
esp32s2 = { version = "0.14.0", features = ["critical-section"], optional = true }
esp32s3 = { version = "0.17.0", features = ["critical-section"], optional = true }

Expand All @@ -66,6 +67,7 @@ esp32 = ["esp32/rt" , "xtensa", "xtensa-lx/esp32", "xtensa-lx-rt/esp32",
esp32c2 = ["esp32c2/rt", "riscv", "procmacros/esp32c2"]
esp32c3 = ["esp32c3/rt", "riscv", "procmacros/esp32c3"]
esp32c6 = ["esp32c6/rt", "riscv", "procmacros/esp32c6"]
esp32h2 = ["esp32h2/rt", "riscv", "procmacros/esp32h2"]
esp32s2 = ["esp32s2/rt", "xtensa", "xtensa-lx/esp32s2", "xtensa-lx-rt/esp32s2", "esp-synopsys-usb-otg", "usb-device", "procmacros/esp32s2"]
esp32s3 = ["esp32s3/rt", "xtensa", "xtensa-lx/esp32s3", "xtensa-lx-rt/esp32s3", "lock_api", "esp-synopsys-usb-otg", "usb-device", "procmacros/esp32s3"]

Expand Down
1 change: 1 addition & 0 deletions esp-hal-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This crate should not be used directly; you should use one of the device-specifi
- [esp32c2-hal](../esp32c2-hal/README.md)
- [esp32c3-hal](../esp32c3-hal/README.md)
- [esp32c6-hal](../esp32c6-hal/README.md)
- [esp32h2-hal](../esp32h2-hal/README.md)
- [esp32s2-hal](../esp32s2-hal/README.md)
- [esp32s3-hal](../esp32s3-hal/README.md)

Expand Down
6 changes: 5 additions & 1 deletion esp-hal-common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ struct Config {
fn main() {
// NOTE: update when adding new device support!
// Ensure that exactly one chip has been specified:
assert_unique_used_features!("esp32", "esp32c2", "esp32c3", "esp32c6", "esp32s2", "esp32s3");
assert_unique_used_features!(
"esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"
);

// Handle the features for the ESP32's different crystal frequencies:
#[cfg(feature = "esp32")]
Expand All @@ -112,6 +114,8 @@ fn main() {
"esp32c3"
} else if cfg!(feature = "esp32c6") {
"esp32c6"
} else if cfg!(feature = "esp32h2") {
"esp32h2"
} else if cfg!(feature = "esp32s2") {
"esp32s2"
} else if cfg!(feature = "esp32s3") {
Expand Down
65 changes: 65 additions & 0 deletions esp-hal-common/devices/esp32h2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[device]
arch = "riscv"
cores = "single_core"

peripherals = [
# Peripherals available in the PAC:
# "aes",
# "apb_saradc",
# "assist_debug",
# "ds",
# "ecc",
"efuse",
# "gdma",
# "gpio",
# "hmac",
# "hp_apm",
# "hp_sys",
# "i2c0",
# "i2c1",
# "i2s0",
"interrupt_core0",
"intpri",
# "io_mux",
# "ledc",
# "lp_ana",
# "lp_aon",
# "lp_apm",
"lp_clkrst",
# "lp_peri",
# "lp_timer",
"lp_wdt",
# "mcpwm0",
# "mem_monitor",
# "modem_lpcon",
# "modem_syscon",
# "otp_debug",
# "parl_io",
# "pau",
# "pcnt",
"pcr",
# "pmu",
# "peripherals",
# "rmt",
# "rng",
# "rsa",
# "sha",
# "soc_etm",
# "spi0",
# "spi1",
# "spi2",
# "systimer",
# "tee",
# "timg0",
# "timg1",
# "trace",
# "twai0",
# "uart0",
# "uart1",
# "uhci0",
# "usb_device",


# Additional peripherals defined by us (the developers):
"plic",
]
Loading