From 8b16bfcba0e22a660c91127ce1ba8cf8e1ecd98d Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Sat, 3 Dec 2022 13:07:00 +0100 Subject: [PATCH 1/5] Experiment with IDF 5.0 --- .github/workflows/ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01c09f24e59..b419f8dde57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,9 @@ jobs: - xtensa-esp32-espidf - xtensa-esp32s2-espidf - xtensa-esp32s3-espidf + idf-version: + - release/v4.4 + - release/v5.0 steps: - name: Setup | Checkout uses: actions/checkout@v2 @@ -48,19 +51,19 @@ jobs: run: cargo fmt -- --check - name: Build | Clippy - run: export ESP_IDF_VERSION=release/v4.4; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings - name: Build | Compile - run: export ESP_IDF_VERSION=release/v4.4; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | RISCV-ULP-HAL feature - run: export ESP_IDF_VERSION=release/v4.4; cargo build --features riscv-ulp-hal --no-default-features --target riscv32imc-unknown-none-elf -Zbuild-std=core,panic_abort -Zbuild-std-features=panic_immediate_abort + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; cargo build --features riscv-ulp-hal --no-default-features --target riscv32imc-unknown-none-elf -Zbuild-std=core,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | Compile, no_std - run: export ESP_IDF_VERSION=release/v4.4; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | Compile, no_std, alloc - run: export ESP_IDF_VERSION=release/v4.4; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features alloc,esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features alloc,esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Setup | ldproxy uses: actions-rs/install@v0.1 @@ -70,4 +73,4 @@ jobs: if: matrix.target == 'riscv32imc-esp-espidf' - name: Build | Examples - run: export ESP_IDF_VERSION=release/v4.4; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort From d0c503b01d187197ce666bf79b5b695a2941cd65 Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Sat, 3 Dec 2022 12:20:16 +0100 Subject: [PATCH 2/5] Attempt to fix error about libclang --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b419f8dde57..983370e3382 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,9 @@ jobs: with: default: true if: matrix.target != 'riscv32imc-esp-espidf' + + - name: Temp fix for clang error + run: sudo apt-get install libncurses5 - name: Build | Fmt Check run: cargo fmt -- --check From 7b01d0bddf16d744c0d16b6bdf0edf06efbee4cf Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Sat, 3 Dec 2022 13:43:07 +0100 Subject: [PATCH 3/5] Add RUSTFLAGS --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 983370e3382..68918df4cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,19 +54,37 @@ jobs: run: cargo fmt -- --check - name: Build | Clippy - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + run: cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings - name: Build | Compile - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | RISCV-ULP-HAL feature - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; cargo build --features riscv-ulp-hal --no-default-features --target riscv32imc-unknown-none-elf -Zbuild-std=core,panic_abort -Zbuild-std-features=panic_immediate_abort + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + run: cargo build --features riscv-ulp-hal --no-default-features --target riscv32imc-unknown-none-elf -Zbuild-std=core,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | Compile, no_std - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + run: cargo build --features esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Build | Compile, no_std, alloc - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --features alloc,esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + run: cargo build --features alloc,esp-idf-sys --no-default-features --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort - name: Setup | ldproxy uses: actions-rs/install@v0.1 @@ -76,4 +94,8 @@ jobs: if: matrix.target == 'riscv32imc-esp-espidf' - name: Build | Examples - run: export ESP_IDF_VERSION=${{ matrix.idf-version }}; export ESP_IDF_SDKCONFIG_DEFAULTS=$(pwd)/.github/configs/sdkconfig.defaults; cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort + env: + ESP_IDF_VERSION: ${{ matrix.idf-version }} + ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + run: cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort From 68da737ecc897ea25452036670b8a34ea0eef1d8 Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Sat, 3 Dec 2022 19:21:15 +0100 Subject: [PATCH 4/5] What about the esp-rs/xtensa-toolchain thing to 1.4.0? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68918df4cf2..a9485dbb121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: if: matrix.target == 'riscv32imc-esp-espidf' - name: Install Rust for Xtensa - uses: esp-rs/xtensa-toolchain@v1.2.0 + uses: esp-rs/xtensa-toolchain@v1.4.0 with: default: true if: matrix.target != 'riscv32imc-esp-espidf' From a9c5832229261ca57ff1ecb80845b338042e3a21 Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Thu, 8 Dec 2022 08:18:31 +0100 Subject: [PATCH 5/5] Add rustc flags for default linker libs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9485dbb121..2006bd72b7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,5 +97,5 @@ jobs: env: ESP_IDF_VERSION: ${{ matrix.idf-version }} ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults - RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}" + RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}} ${{ matrix.target == 'riscv32imc-esp-espidf' && '-C default-linker-libraries' || ''}}" run: cargo build --examples --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort