From 15ce75330f342bb6d18422810fcb2f696d682c68 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 2 Jan 2025 08:31:32 +0000 Subject: [PATCH] Don't build the imac target against ESP IDF 4.4 as this is not supported; put ESP IDF 5.3 in the supported targets --- .github/workflows/ci.yml | 6 ++++++ build/common.rs | 2 +- build/native/cargo_driver.rs | 10 +++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0358448937..f4d3ec44ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: matrix: target: - riscv32imc-esp-espidf + - riscv32imac-esp-espidf - xtensa-esp32-espidf - xtensa-esp32s2-espidf - xtensa-esp32s3-espidf @@ -57,6 +58,7 @@ jobs: # run: cargo clippy --features pio --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings - name: Build | Clippy + if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4' env: ESP_IDF_VERSION: ${{ matrix.idf-version }} ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" @@ -64,18 +66,21 @@ jobs: run: cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings -Adeprecated - name: Build | Compile (Native) + if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4' env: ESP_IDF_VERSION: ${{ matrix.idf-version }} RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}" run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | Compile (Native), no_std + if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4' env: ESP_IDF_VERSION: ${{ matrix.idf-version }} RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}" run: cargo build --target ${{ matrix.target }} --no-default-features -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort # - name: Build | Compile (Native), alloc +# if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4' # env: # ESP_IDF_VERSION: ${{ matrix.idf-version }} # RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || '' }}" @@ -89,6 +94,7 @@ jobs: chmod a+x $HOME/.cargo/bin/ldproxy - name: Build | Examples + if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'release/v4.4' env: ESP_IDF_VERSION: ${{ matrix.idf-version }} RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v5') && '--cfg espidf_time64' || startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' }}" diff --git a/build/common.rs b/build/common.rs index 61aacbf3ad..ba5355ea72 100644 --- a/build/common.rs +++ b/build/common.rs @@ -19,7 +19,7 @@ pub const NO_PATCHES: &[&str] = &[]; pub const V_5_0_PATCHES: &[&str] = &["patches/esp_app_format_weak_v5.0.diff"]; #[allow(dead_code)] -pub const V_4_4_3_PATCHES: &[&str] = &["patches/esp_app_format_weak_v4.4.diff"]; +pub const V_4_4_PATCHES: &[&str] = &["patches/esp_app_format_weak_v4.4.diff"]; const TOOLS_WORKSPACE_INSTALL_DIR: &str = ".embuild"; diff --git a/build/native/cargo_driver.rs b/build/native/cargo_driver.rs index 235cfb7042..3bd96e607f 100644 --- a/build/native/cargo_driver.rs +++ b/build/native/cargo_driver.rs @@ -23,7 +23,7 @@ use self::chip::Chip; use crate::common::{ self, list_specific_sdkconfigs, manifest_dir, sanitize_c_env_vars, sanitize_project_path, setup_clang_env, workspace_dir, EspIdfBuildOutput, EspIdfComponents, InstallDir, NO_PATCHES, - V_4_4_3_PATCHES, V_5_0_PATCHES, + V_4_4_PATCHES, V_5_0_PATCHES, }; use crate::config::{BuildConfig, ESP_IDF_GLOB_VAR_PREFIX, ESP_IDF_TOOLS_INSTALL_DIR_VAR}; @@ -308,17 +308,17 @@ pub fn build() -> Result { { cargo::print_warning( "Building against ESP-IDF `master` is not officially supported. \ - Supported versions are 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'", + Supported versions are 'v5.3(.X)', 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'", ); NO_PATCHES } - Ok((4, 4, _)) => V_4_4_3_PATCHES, + Ok((4, 4, _)) => V_4_4_PATCHES, Ok((5, 0, _)) => V_5_0_PATCHES, - Ok((5, 1, _)) | Ok((5, 2, _)) => NO_PATCHES, + Ok((5, 1, _)) | Ok((5, 2, _)) | Ok((5, 3, _)) => NO_PATCHES, Ok((major, minor, patch)) => { cargo::print_warning(format_args!( "Building against ESP-IDF version ({major}.{minor}.{patch}) is not officially supported. \ - Supported versions are 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'", + Supported versions are 'v5.3(.X)', 'v5.2(.X)', 'v5.1(.X)', 'v5.0(.X)', 'v4.4(.X)'", )); NO_PATCHES }