Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ESP32 IDF to v5.2.2 #2991

Merged
merged 15 commits into from
Jul 30, 2024
Merged
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-all:v2.49
FROM ghcr.io/nanoframework/dev-container-all:v2.50
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-
RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip

# Clone ESP-IDF
RUN git clone --branch v5.1.4 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf

# Clone what is needed for TI
RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/ESP32/Dockerfile.ESP32
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-esp32:v2.31
FROM ghcr.io/nanoframework/dev-container-esp32:v2.32
2 changes: 1 addition & 1 deletion .devcontainer/ESP32/Dockerfile.ESP32.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN mkdir -p /usr/local/bin/gcc
RUN git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs

# Clone ESP-IDF
RUN git clone --branch v5.1.4 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf

# Creating static link python for pyhton3
RUN ln -fs /usr/bin/python3 /usr/bin/python \
Expand Down
4 changes: 3 additions & 1 deletion CMake/Modules/FindESP32_IDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ include(${TARGET_SERIES}_GCC_options)
# freertos #
############

list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/include)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/include/freertos)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/config/${ESP32_CPU_TYPE}/include)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/FreeRTOS-Kernel/include)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/include/esp_additions)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/include)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/include/freertos)
list(APPEND ESP32_IDF_INCLUDE_DIRS ${esp32_idf_SOURCE_DIR}/components/freertos/esp_additions/arch/${ESP32_CPU_TYPE}/include)
Expand Down
4 changes: 0 additions & 4 deletions CMake/binutils.ESP32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,6 @@ macro(nf_add_idf_as_library)

if(ESP32_USB_CDC)

#idf_build_set_property(IDF_COMPONENT_MANAGER 1)
#idf_build_set_property(__COMPONENT_MANAGER_INTERFACE_VERSION 2)
#message(STATUS "Support for component manager enabled")

# add IDF components specific to ESP32S2/S3 series
# They have to be added in a specific order so they compile/link ok
list(APPEND IDF_COMPONENTS_TO_ADD tinyusb)
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resources:
type: github
name: espressif/esp-idf
endpoint: nanoframework
ref: refs/tags/v5.1.4
ref: refs/tags/v5.2.2

# scheduled build
# the schedule is defined at the AZDO web interface because of inconsistencies with time zones
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('STM32_1_11_0_versioncounter', 0)]
REVISION: $[counter('STM32_1_12_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "stm32"

Expand Down Expand Up @@ -544,7 +544,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('ESP32_1_11_0_versioncounter', 0)]
REVISION: $[counter('ESP32_1_12_0_versioncounter', 0)]
IDF_PATH: "D:/a/1/s/esp-idf"
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
TargetPlatform: "esp32"
Expand Down Expand Up @@ -620,7 +620,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('TI_1_11_0_versioncounter', 0)]
REVISION: $[counter('TI_1_12_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "ti_simplelink"

Expand Down Expand Up @@ -671,7 +671,7 @@ jobs:

variables:
# creates a counter and assigns it to the revision variable
REVISION: $[counter('AZURERTOS_1_11_0_versioncounter', 0)]
REVISION: $[counter('AZURERTOS_1_12_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "azure_rtos"

Expand Down
212 changes: 106 additions & 106 deletions azure-pipelines-templates/build-espressif-esp32-targets.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.

parameters:
- name: repoDirectory
type: string
default: $(Build.SourcesDirectory)\nf-interpreter
- name: partitionsDirectory
type: string
default: $(Build.SourcesDirectory)\nf-interpreter\targets\ESP32\_IDF\$(IDF_Target)

steps:
- template: setup-cmake-user-presets.yml
parameters:
repoDirectory: ${{ parameters.repoDirectory }}

- task: Cache@2
displayName: Cache IDF components
inputs:
key: 'esp-idf-components-cache | 0'
path: $(Agent.BuildDirectory)/s/esp-idf/components
cacheHitVar: ESP32_COMPONENTS_RESTORED

- task: CMake@1
condition: succeeded()
displayName: Setup build with CMake
inputs:
cmakeArgs: "--preset $(CMakePreset) -DESP32_IDF_PATH=$(IDF_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_NAME=$(TargetPublishName) $(BuildOptions)"
workingDirectory: ${{ parameters.repoDirectory }}

- task: CMake@1
displayName: Build with CMake
condition: succeeded()
inputs:
cmakeArgs: "--build --preset $(CMakePreset) --target all --config MinSizeRel"
workingDirectory: ${{ parameters.repoDirectory }}

# because of permission issues (the python script isn't allowed to write on the output folder)
# we need to perform these steps by calling directly the python scripts

# 16MB partition table it's generated for ESP32 and ESP32_C3 only
- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32c6'),
eq(variables['TargetSeries'], 'esp32s2'),
eq(variables['TargetSeries'], 'esp32s3')
)
)
displayName: Generate ESP32 Partition tables for 16MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_16mb.csv ${{ parameters.repoDirectory }}\build\partitions_16mb.bin'

- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32s2')
)
)
displayName: Generate ESP32 Partition tables for 8MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_8mb.csv ${{ parameters.repoDirectory }}\build\partitions_8mb.bin'

- task: PythonScript@0
condition: succeeded()
displayName: Generate ESP32 Partition tables for 4MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_4mb.csv ${{ parameters.repoDirectory }}\build\partitions_4mb.bin'

- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32c3')
)
)
displayName: Generate ESP32 Partition tables for 2MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_2mb.csv ${{ parameters.repoDirectory }}\build\partitions_2mb.bin'

- task: CopyFiles@2
condition: succeeded()
displayName: Copy CSV partition files
inputs:
sourceFolder: ${{ parameters.partitionsDirectory }}
Contents: |
*.csv
TargetFolder: ${{ parameters.repoDirectory }}\build
flattenFolders: false
ignoreMakeDirErrors: true
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.
parameters:
- name: repoDirectory
type: string
default: $(Build.SourcesDirectory)\nf-interpreter
- name: partitionsDirectory
type: string
default: $(Build.SourcesDirectory)\nf-interpreter\targets\ESP32\_IDF\$(IDF_Target)
steps:
- template: setup-cmake-user-presets.yml
parameters:
repoDirectory: ${{ parameters.repoDirectory }}
- task: Cache@2
displayName: Cache IDF components
inputs:
key: 'esp-idf-components-cache | 5_2_2'
path: $(Agent.BuildDirectory)/s/esp-idf/components
cacheHitVar: ESP32_COMPONENTS_RESTORED
- task: CMake@1
condition: succeeded()
displayName: Setup build with CMake
inputs:
cmakeArgs: "--preset $(CMakePreset) -DESP32_IDF_PATH=$(IDF_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_NAME=$(TargetPublishName) $(BuildOptions)"
workingDirectory: ${{ parameters.repoDirectory }}
- task: CMake@1
displayName: Build with CMake
condition: succeeded()
inputs:
cmakeArgs: "--build --preset $(CMakePreset) --target all --config MinSizeRel"
workingDirectory: ${{ parameters.repoDirectory }}
# because of permission issues (the python script isn't allowed to write on the output folder)
# we need to perform these steps by calling directly the python scripts
# 16MB partition table it's generated for ESP32 and ESP32_C3 only
- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32c6'),
eq(variables['TargetSeries'], 'esp32s2'),
eq(variables['TargetSeries'], 'esp32s3')
)
)
displayName: Generate ESP32 Partition tables for 16MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_16mb.csv ${{ parameters.repoDirectory }}\build\partitions_16mb.bin'
- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32s2')
)
)
displayName: Generate ESP32 Partition tables for 8MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_8mb.csv ${{ parameters.repoDirectory }}\build\partitions_8mb.bin'
- task: PythonScript@0
condition: succeeded()
displayName: Generate ESP32 Partition tables for 4MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_4mb.csv ${{ parameters.repoDirectory }}\build\partitions_4mb.bin'
- task: PythonScript@0
condition: >-
and(
succeeded(),
or(
eq(variables['TargetSeries'], 'esp32'),
eq(variables['TargetSeries'], 'esp32c3')
)
)
displayName: Generate ESP32 Partition tables for 2MB flash
inputs:
scriptSource: "filePath"
scriptPath: '$(IDF_PATH)\components\partition_table\gen_esp32part.py'
arguments: '--verify ${{ parameters.partitionsDirectory }}\partitions_nanoclr_2mb.csv ${{ parameters.repoDirectory }}\build\partitions_2mb.bin'
- task: CopyFiles@2
condition: succeeded()
displayName: Copy CSV partition files
inputs:
sourceFolder: ${{ parameters.partitionsDirectory }}
Contents: |
*.csv
TargetFolder: ${{ parameters.repoDirectory }}\build
flattenFolders: false
ignoreMakeDirErrors: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ steps:
- task: Cache@2
displayName: Cache ESP32 tools
inputs:
key: "esp32_tools | 5_1_4"
restoreKeys: 5_1_4
key: "esp32_tools | 5_2_2"
restoreKeys: 5_2_2
path: $(UserProfile)\.espressif\tools
cacheHitVar: ESP32_TOOLS_CACHE_RESTORED

Expand Down
Loading
Loading