Skip to content

Commit

Permalink
feat: Update training
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Jan 14, 2025
1 parent 46e9d0f commit 5831eba
Show file tree
Hide file tree
Showing 32 changed files with 91 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// "build": {
// "dockerfile": "Dockerfile",
// "args": {
// "NIGHTLY_VERSION": "nightly-2024-06-30"
// "NIGHTLY_VERSION": "nightly-2025-01-01"
// }
// },
"customizations": {
Expand Down
11 changes: 5 additions & 6 deletions advanced/button-interrupt/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

6 changes: 3 additions & 3 deletions advanced/button-interrupt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[dependencies]
anyhow = "=1.0.86"
esp-idf-svc = "=0.49.0"
anyhow = "=1.0.95"
esp-idf-svc = "=0.50.1"
rgb-led = { path = "../../common/lib/rgb-led" }

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
2 changes: 1 addition & 1 deletion advanced/button-interrupt/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
11 changes: 5 additions & 6 deletions advanced/i2c-driver/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

6 changes: 3 additions & 3 deletions advanced/i2c-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[dependencies]
anyhow = "=1.0.86"
anyhow = "=1.0.95"
embedded-hal = "=0.2.7"
esp-idf-svc = "=0.49.0"
esp-idf-svc = "=0.50.1"

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
2 changes: 1 addition & 1 deletion advanced/i2c-driver/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
11 changes: 5 additions & 6 deletions advanced/i2c-sensor-reading/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

6 changes: 3 additions & 3 deletions advanced/i2c-sensor-reading/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[dependencies]
anyhow = "=1.0.86"
anyhow = "=1.0.95"
embedded-hal = "=0.2.7"
esp-idf-svc = "=0.49.0"
esp-idf-svc = "=0.50.1"
icm42670 = "=0.1.1"
lis3dh = "=0.4.2"
shared-bus = "=0.3.1"
shtcx = "=0.11.0"

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
2 changes: 1 addition & 1 deletion advanced/i2c-sensor-reading/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
2 changes: 1 addition & 1 deletion book/src/03_2_cargo_generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" } # add this line

```toml
[toolchain]
channel = "nightly-2024-06-30" # change this line
channel = "nightly-2025-01-01" # change this line
```

✅ Run your project by using the following command out of the `hello-world` directory.
Expand Down
4 changes: 2 additions & 2 deletions common/lib/get-uuid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ authors = [
edition = "2021"

[dependencies]
anyhow = "=1.0.86"
anyhow = "=1.0.95"

[build-dependencies]
anyhow = "=1.0.86"
anyhow = "=1.0.95"
uuid = { version = "=1.9.1", features = ["v4"] }
2 changes: 1 addition & 1 deletion common/lib/mqtt-messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ authors = [
edition = "2021"

[dependencies]
rgb = "=0.8.40"
rgb = "=0.8.50"
11 changes: 5 additions & 6 deletions common/lib/rgb-led/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

7 changes: 4 additions & 3 deletions common/lib/rgb-led/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ edition = "2021"
authors = ["Sergio Gasquez <[email protected]>"]

[dependencies]
anyhow = "=1.0.86"
esp-idf-svc = "=0.49.0"
anyhow = "=1.0.95"
esp-idf-svc = "=0.50.1"
esp-idf-hal ={ version = "=0.45.0", features = ["rmt-legacy"] }
log = "=0.4.22"
rgb = "0.8.29"

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
2 changes: 1 addition & 1 deletion common/lib/rgb-led/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
2 changes: 1 addition & 1 deletion common/lib/rgb-led/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use core::time::Duration;
use esp_idf_svc::hal::{
use esp_idf_hal::{
gpio::OutputPin,
peripheral::Peripheral,
rmt::{config::TransmitConfig, FixedLengthSignal, PinState, Pulse, RmtChannel, TxRmtDriver},
Expand Down
11 changes: 5 additions & 6 deletions common/lib/wifi/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

6 changes: 3 additions & 3 deletions common/lib/wifi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"
authors = ["Sergio Gasquez <[email protected]>"]

[dependencies]
anyhow = "=1.0.86"
esp-idf-svc = "=0.49.0"
anyhow = "=1.0.95"
esp-idf-svc = "=0.50.1"
log = "=0.4.22"

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"

[dev-dependencies]
toml-cfg = "=0.1.3"
2 changes: 1 addition & 1 deletion common/lib/wifi/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
11 changes: 5 additions & 6 deletions intro/hardware-check/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["std", "panic_abort"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

6 changes: 3 additions & 3 deletions intro/hardware-check/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[dependencies]
anyhow = "=1.0.86"
esp-idf-svc = "=0.49.0"
anyhow = "=1.0.95"
esp-idf-svc = "=0.50.1"
log = "=0.4.22"
rgb-led = { path = "../../common/lib/rgb-led" }
toml-cfg = "=0.1.3"
wifi = { path = "../../common/lib/wifi" }

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
toml-cfg = "=0.1.3"
2 changes: 1 addition & 1 deletion intro/hardware-check/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
11 changes: 5 additions & 6 deletions intro/http-client/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linker = "ldproxy"
runner = "espflash flash --monitor"
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["--cfg", "espidf_time64"]

[unstable]
build-std = ["panic_abort", "std"]

[env]
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.2.2)
ESP_IDF_VERSION = { value = "tag:v5.2.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF (v5.3.2)
ESP_IDF_VERSION = { value = "tag:v5.3.2" }

# 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
Expand All @@ -23,7 +23,6 @@ ESP_IDF_VERSION = { value = "tag:v5.2.2" }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
# ESP-IDF will be installed in ~/.espressif so it can be reused across the different examples.
# See also https://github.com/esp-rs/esp-idf-sys#esp_idf_tools_install_dir-esp_idf_tools_install_dir
# See also https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
# Workaround for https://github.com/esp-rs/esp-idf-template/issues/174
CRATE_CC_NO_DEFAULTS = "1"

8 changes: 4 additions & 4 deletions intro/http-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[dependencies]
anyhow = "=1.0.86"
embedded-svc = "=0.28.0"
esp-idf-svc = "=0.49.0"
anyhow = "=1.0.95"
embedded-svc = "=0.28.1"
esp-idf-svc = "=0.50.1"
toml-cfg = "=0.1.3"
wifi = { path = "../../common/lib/wifi" }

[build-dependencies]
embuild = "=0.32.0"
embuild = "=0.33.0"
toml-cfg = "=0.1.3"
2 changes: 1 addition & 1 deletion intro/http-client/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-06-30"
channel = "nightly-2025-01-01"
components = ["rust-src"]
Loading

0 comments on commit 5831eba

Please sign in to comment.