Skip to content

Commit

Permalink
Add Esp32 IDF v5.0 support (#2614)
Browse files Browse the repository at this point in the history
IDF version 5 has a number of breaking changes. See https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32/migration-guides/release-5.x/index.html.

Change summary:

- hw_timer driver has been reworked to replace timer_hal_xxx calls with  timer_ll_xx. IDF 5 replaces the timer HAL with a gptimer driver.
- The ADC interface has changed so new code has been added when compiled with IDF 5. Calibration has not been implemented.
- Minor API changes for uart, Ethernet
- Bluetooth support updated using latest esp-nimble-cpp master branch
- Separate CI workflow added for ESP32
- Add esp32s3 and esp32c2 variants (both untested - hardware not available)
- Update esptool to v4.4, required for esp32c2
- Gdbstub panic handler enabled by default only for debug builds
- The RMT driver interface has changed. This is used by the Adafruit_Neopixel library which has not yet been updated. The previous driver interface has been enabled but is deprecated - a warning is visible in the build logs.
  • Loading branch information
mikee47 authored Feb 8, 2023
1 parent 309d438 commit 241324e
Show file tree
Hide file tree
Showing 49 changed files with 928 additions and 235 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci-esp32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Continuous Integration (CI) for Esp32

on:
push:

pull_request:
branches: [ develop ]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
variant: [esp32, esp32s2, esp32c3, esp32s3, esp32c2]
idf_version: ["4.3", "4.4", "5.0"]
exclude:
- variant: esp32s3
idf_version: "4.3"
- variant: esp32c2
idf_version: "4.3"
- variant: esp32c2
idf_version: "4.4"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJson(matrix) }}
cancel-in-progress: true

runs-on: ${{ matrix.os }}

env:
SMING_ARCH: Esp32
SMING_SOC: ${{ matrix.variant }}
INSTALL_IDF_VER: ${{ matrix.idf_version }}

steps:
- name: Fix autocrlf setting
run: |
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3

- name: Configure environment
shell: pwsh
run: |
"CI_BUILD_DIR=" + (Resolve-Path ".").path >> $env:GITHUB_ENV
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
Tools/ci/install.sh
- name: Install build tools for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
source $SMING_HOME/../Tools/export.sh
Tools/ci/build.sh
- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
. Tools/ci/setenv.ps1
Tools/ci/build.cmd
25 changes: 5 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
variant: [esp8266, host, esp32, esp32s2, esp32c3, rp2040]
INSTALL_IDF_VER: ["4.3", "4.4"]
variant: [esp8266, host, rp2040]
include:
- variant: esp8266
arch: Esp8266
- variant: host
arch: Host
- variant: esp32
arch: Esp32
- variant: esp32s2
arch: Esp32
- variant: esp32c3
arch: Esp32
- variant: rp2040
arch: Rp2040
exclude:
- variant: esp8266
INSTALL_IDF_VER: "4.4"
- variant: host
INSTALL_IDF_VER: "4.4"
- variant: rp2040
INSTALL_IDF_VER: "4.4"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJson(matrix) }}
Expand All @@ -58,20 +44,19 @@ jobs:
run: |
"CI_BUILD_DIR=" + (Resolve-Path ".").path >> $env:GITHUB_ENV
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
"INSTALL_IDF_VER=${{ matrix.INSTALL_IDF_VER }}" >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
Tools/ci/install.sh
- name: Install build tools for Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-latest' }}
run: |
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
- name: Build and test for ${{matrix.arch}} on Ubuntu
- name: Build and test for ${{matrix.variant}} on Ubuntu
env:
CLANG_FORMAT: clang-format-8
if: ${{ matrix.os == 'ubuntu-20.04' }}
Expand All @@ -80,7 +65,7 @@ jobs:
$CLANG_FORMAT --version
Tools/ci/build.sh
- name: Build and test for ${{matrix.arch}} on Windows
- name: Build and test for ${{matrix.variant}} on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
. Tools/ci/setenv.ps1
Expand Down
Loading

0 comments on commit 241324e

Please sign in to comment.