diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 685f245..67de6d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - board: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6"] + board: ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"] alloc: ["true", "false"] action: - command: build diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml index 22c8837..be4b1d2 100644 --- a/.github/workflows/ci_docker.yml +++ b/.github/workflows/ci_docker.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - board: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6"] + board: ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"] steps: - uses: actions/checkout@v3 with: diff --git a/README.md b/README.md index ffb84e0..81f3c36 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ cargo generate -a esp-rs/esp-template After running the command, there will be a few prompts: - `Project Name`: Name of the crate. - `Which MCU to target?`: SoC model. -- `Use template default values?`: Skips the rest of the prompts and uses their default value. If false, you will be prompted with: +- `Configure advanced template options?`: If `false`, skips the rest of the prompts and uses their default value. If `true`, you will be prompted with: - `Enable allocations via the esp-alloc crate?`: Adds [`esp-alloc`] dependency, and initializes the heap. - `Configure project to support Wokwi simulation with Wokwi VS Code extension?`: Adds support for Wokwi simulation using [VS Code Wokwi extension]. - `Configure project to use Dev Containers (VS Code and GitHub Codespaces)?`: Adds support for: diff --git a/cargo-generate.toml b/cargo-generate.toml index a69639e..a00f869 100644 --- a/cargo-generate.toml +++ b/cargo-generate.toml @@ -8,7 +8,7 @@ pre = ["pre-script.rhai"] [placeholders.mcu] type = "string" prompt = "Which MCU to target?" -choices = ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32s2", "esp32s3"] +choices = ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"] default = "esp32" [placeholders.advanced] diff --git a/pre-script.rhai b/pre-script.rhai index 6b43f44..29c968f 100644 --- a/pre-script.rhai +++ b/pre-script.rhai @@ -9,36 +9,10 @@ let targets = #{ rust_target: "xtensa-esp32-none-elf", atomic_emulation: "none", gcc_target: "xtensa-esp32-elf", - hal_version: "0.12.0", + hal_version: "0.13.0", wokwi_board: "board-esp32-devkit-v1", }, - esp32s2: #{ - arch: "xtensa", - has_swd: false, - has_tg1: true, - sys_peripheral: "SYSTEM", - rct_peripheral: "RTC_CNTL", - toolchain: "esp", - rust_target: "xtensa-esp32s2-none-elf", - atomic_emulation: "esp32s2", - gcc_target: "xtensa-esp32s2-elf", - hal_version: "0.9.0", - wokwi_board: "board-esp32-s2-devkitm-1", - }, - esp32s3: #{ - arch: "xtensa", - has_swd: false, - has_tg1: true, - sys_peripheral: "SYSTEM", - rct_peripheral: "RTC_CNTL", - toolchain: "esp", - rust_target: "xtensa-esp32s3-none-elf", - atomic_emulation: "none", - gcc_target: "xtensa-esp32s3-elf", - hal_version: "0.9.0", - wokwi_board: "board-esp32-s3-devkitc-1", - }, - esp32c2: #{ + esp32c2: #{ arch: "riscv", has_swd: true, has_tg1: false, @@ -48,7 +22,7 @@ let targets = #{ rust_target: "riscv32imc-unknown-none-elf", atomic_emulation: "riscv", gcc_target: "riscv32-esp-elf", - hal_version: "0.7.0", + hal_version: "0.8.0", wokwi_board: "", }, esp32c3: #{ @@ -61,7 +35,7 @@ let targets = #{ rust_target: "riscv32imc-unknown-none-elf", atomic_emulation: "riscv", gcc_target: "riscv32-esp-elf", - hal_version: "0.9.0", + hal_version: "0.10.0", wokwi_board: "board-esp32-c3-devkitm-1", }, esp32c6: #{ @@ -74,9 +48,48 @@ let targets = #{ rust_target: "riscv32imac-unknown-none-elf", atomic_emulation: "none", gcc_target: "riscv32-esp-elf", - hal_version: "0.2.0", + hal_version: "0.3.0", wokwi_board: "board-esp32-c6-devkitc-1", }, + esp32h2: #{ + arch: "riscv", + has_swd: true, + has_tg1: true, + sys_peripheral: "PCR", + rct_peripheral: "LP_CLKRST", + toolchain: "nightly", + rust_target: "riscv32imac-unknown-none-elf", + atomic_emulation: "none", + gcc_target: "riscv32-esp-elf", + hal_version: "0.1.0", + wokwi_board: "", + }, + esp32s2: #{ + arch: "xtensa", + has_swd: false, + has_tg1: true, + sys_peripheral: "SYSTEM", + rct_peripheral: "RTC_CNTL", + toolchain: "esp", + rust_target: "xtensa-esp32s2-none-elf", + atomic_emulation: "esp32s2", + gcc_target: "xtensa-esp32s2-elf", + hal_version: "0.10.0", + wokwi_board: "board-esp32-s2-devkitm-1", + }, + esp32s3: #{ + arch: "xtensa", + has_swd: false, + has_tg1: true, + sys_peripheral: "SYSTEM", + rct_peripheral: "RTC_CNTL", + toolchain: "esp", + rust_target: "xtensa-esp32s3-none-elf", + atomic_emulation: "none", + gcc_target: "xtensa-esp32s3-elf", + hal_version: "0.10.0", + wokwi_board: "board-esp32-s3-devkitc-1", + }, }; let target = variable::get("mcu");