Skip to content

Commit

Permalink
#1
Browse files Browse the repository at this point in the history
  • Loading branch information
imarkov committed Oct 30, 2021
1 parent 5fe3a5d commit 7c3ce21
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 272 deletions.
20 changes: 11 additions & 9 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build]
# Uncomment the relevant target for your chip here (ESP32, ESP32-S2, ESP32-S3 or ESP32-C3)
target = "xtensa-esp32-espidf"
#target = "xtensa-esp32s2-espidf"
#target = "xtensa-esp32s3-espidf"
#target = "riscv32imc-esp-espidf"
{% if mcu != "esp32" %}#{% endif %}target = "xtensa-esp32-espidf"
{% if mcu != "esp32s2" %}#{% endif %}target = "xtensa-esp32s2-espidf"
{% if mcu != "esp32s3" %}#{% endif %}target = "xtensa-esp32s3-espidf"
{% if mcu != "esp32c3" %}#{% endif %}target = "riscv32imc-esp-espidf"

[target.xtensa-esp32-espidf]
linker = "ldproxy"
Expand All @@ -28,17 +28,19 @@ configurable-env = true # No longer necessary since 1.56, as it was stabilized:
extra-link-arg = true # No longer necessary since 1.56, as it was stabilized: https://github.com/rust-lang/cargo/blob/master/src/cargo/core/features.rs#L695

[env]
ESP_IDF_SYS_GLOB_BASE = { value = ".", relative = true }
#ESP_IDF_VERSION = { value = "master" } # Uncomment this and enable the esp-idf-sys "native" build feature to build against ESP-IDF master

# === PIO builder ===
# These configurations will pick up your custom "sdkconfig.release", "sdkconfig.debug" or "sdkconfig.defaults[.*]" files
# that you might put in the root of the project
# The easiest way to generate a full "sdkconfig[.release|debug]" configuration (as opposed to manually enabling only the necessary flags via "sdkconfig.defaults[.*]"
# is by running "cargo pio espidf menuconfig"
ESP_IDF_SYS_GLOB_BASE = { value = ".", relative = true }
ESP_IDF_SYS_GLOB_0 = { value = "/sdkconfig.*" }

# === Native builder ===
# Same thing but for the native build. Currently the native and PIO builds disagree how sdkconfig configuration should be passed to the ESP-IDF build
# See https://github.com/esp-rs/esp-idf-sys/issues/10#issuecomment-919022205
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.release", relative = true }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG = { value = "./sdkconfig", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }

# Enables the esp-idf-sys "native" build feature to build against ESP-IDF master
{% if espidfver != "master" %}#{% endif %}ESP_IDF_VERSION = { value = "master" }
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Setup | Std
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Setup | Default to nightly
run: rustup default nightly
run: rustup component add rust-src --toolchain nightly
- name: Setup | cargo-generate
run: cargo install cargo-generate
- name: Setup | ldproxy
run: cargo install ldproxy
- name: Generate
run: cargo generate --git https://github.com/ivmarkov/rust-esp32-std-template --name test --vcs none --silent -d mcu=esp32c3 -d toolchain=nightly -d builder=pio -d espidfver=stable
- name: Build | Fmt Check
run: cargo fmt -- --check
run: cd test; cargo fmt -- --check
- name: Build | Clippy
run: cargo clippy --no-deps --target riscv32imc-esp-espidf
run: cd test; cargo clippy --no-deps
- name: Build | Compile
run: cargo build --target riscv32imc-esp-espidf
run: cd test; cargo build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/.vscode
/.espressif
/.embuild
/target
/Cargo.lock
**/*.rs.bk
10 changes: 3 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[package]
name = "rust-esp32-std-mini"
name = "{{project-name}}"
version = "0.1.0"
authors = ["ivmarkov"]
authors = ["{{authors}}"]
edition = "2018"
categories = ["embedded", "hardware-support"]
keywords = ["embedded", "sys", "idf", "esp-idf", "esp32"]
description = "A \"Hello, world!\" binary crate for the ESP32[XX] and ESP-IDF."
repository = "https://github.com/ivmarkov/rust-esp32-std-mini"
license = "MIT OR Apache-2.0"
rust = "1.55"

[features]
native = ["esp-idf-sys/native"]
Expand Down
201 changes: 0 additions & 201 deletions LICENSE-APACHE

This file was deleted.

25 changes: 0 additions & 25 deletions LICENSE-MIT

This file was deleted.

Loading

0 comments on commit 7c3ce21

Please sign in to comment.