From 6ddf39a857312cf60f28771f21a5adbad4be25c8 Mon Sep 17 00:00:00 2001 From: Rutger Bazen Date: Fri, 4 Mar 2022 14:24:47 +0100 Subject: [PATCH 1/3] Add podman instructions to README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6492f96..3fd5585 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,18 @@ PS> Invoke-WebRequest https://raw.githubusercontent.com/esp-rs/rust-build/main/I PS> .\Install-RustToolchain.ps1 ``` +### Rust with Podman + +Alternatively you might build the project in the container where image already contains pre-installed Rust and ESP-IDF. + +``` +$ podman run --device /dev/ttyUSB0 -it docker.io/espressif/idf-rust +``` +This container is lacking the utilities for the ESP8266, but you can install them using these instructions inside the container: +``` +$ apt update && apt install gcc-xtensa-lx106 binutils-xtensa-lx106 +``` + ## Flashing the examples Once you have the Rust compiler fork installed you can flash the examples using [cargo-espflash](https://github.com/esp-rs/espflash/tree/master/cargo-espflash): From 8930c57a651f388e47cef53951df25480df9e415 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 3 Mar 2022 10:38:40 -0800 Subject: [PATCH 2/3] Add a CI workflow to check the examples --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..cf5240e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,27 @@ +on: + pull_request: + branches: + - main + push: + workflow_dispatch: + +name: CI + +env: + CARGO_TERM_COLOR: always + +jobs: + check-xtensa: + name: Check the examples + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: esp-rs/xtensa-toolchain@v1.1 + with: + default: true + ldproxy: false + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/cargo@v1 + with: + command: check + args: --examples --target=xtensa-esp8266-none-elf -Zbuild-std=core From ce5833b9acc5507b9f8de7a2278411b67897d601 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Fri, 27 May 2022 10:35:49 -0700 Subject: [PATCH 3/3] Cargo manifest improvements and fixes, add VS Code config --- .vscode/settings.json | 4 ++++ Cargo.toml | 48 ++++++++++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5491efe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "rust-analyzer.checkOnSave.allTargets": false, +} diff --git a/Cargo.toml b/Cargo.toml index 3935131..8488dc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,39 +1,55 @@ [package] -name = "esp8266-hal" +name = "esp8266-hal" version = "0.5.0" -authors = ["Robin Appelman "] -edition = "2021" -license = "MIT OR Apache-2.0" -description = "An experimental hardware abstraction layer for the esp8266" -repository = "https://github.com/esp-rs/esp8266-hal" +authors = [ + "Robin Appelman ", + "Jesse Braham ", +] +edition = "2021" +description = "HAL for ESP8266 microcontrollers" +repository = "https://github.com/esp-rs/esp8266-hal" +license = "MIT OR Apache-2.0" + +keywords = [ + "embedded", + "embedded-hal", + "esp", + "esp8266", + "no-std", +] +categories = [ + "embedded", + "hardware-support", + "no-std", +] [dependencies] embedded-hal = { version = "0.2", features = ["unproven"] } -esp8266 = "0.5" -nb = "1.0" -paste = { version = "1.0", optional = true } -void = { version = "1.0", default-features = false } -xtensa-lx = "0.6" -xtensa-lx-rt = { version = "0.9", optional = true, features = ["esp8266"] } +esp8266 = "0.6" +nb = "1.0" +paste = { version = "1.0", optional = true } +void = { version = "1.0", default-features = false } +xtensa-lx = { version = "0.7", features = ["esp8266"] } +xtensa-lx-rt = { version = "0.11", features = ["esp8266"], optional = true } [dependencies.esp8266-hal-proc-macros] -path = "procmacros" +path = "procmacros" version = "=0.1" [dev-dependencies] panic-halt = "0.2" [features] -default = ["interrupt", "rt"] +default = ["interrupt", "rt"] interrupt = ["paste"] -rt = ["xtensa-lx-rt"] +rt = ["xtensa-lx-rt"] # Place program completely in RAM (needed when e.g. using only ROM bootloader, # or for debugging). all_in_ram = [] [profile.dev] -lto = true +lto = true opt-level = 1 # Workaround for linker errors when using lto with the dev profile: