Skip to content

Commit c01b265

Browse files
authored
Merge branch 'espressif:release/v5.3' into release/v5.3
2 parents dc93803 + 9a6aba7 commit c01b265

File tree

515 files changed

+15490
-9000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+15490
-9000
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
22
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*
3-
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,ot,wel
3+
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,ot,wel,parms
44
write-changes = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pytest_embedded_log/
102102
list_job*.txt
103103
size_info*.txt
104104
XUNIT_RESULT*.xml
105+
.manifest_sha
105106

106107
# clang config (for LSP)
107108
.clangd

.gitlab/ci/build.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.build_template:
22
stage: build
33
extends:
4-
- .after_script:build:ccache:upload-when-fail
4+
- .after_script:build:ccache-show-stats:upload-failed-job-logs
55
image: $ESP_ENV_IMAGE
66
tags:
77
- build
@@ -16,7 +16,7 @@
1616
extends:
1717
- .build_template
1818
- .before_script:build
19-
- .after_script:build:ccache
19+
- .after_script:build:ccache-show-stats
2020
dependencies: # set dependencies to null to avoid missing artifacts issue
2121
needs:
2222
- job: fast_template_app
@@ -42,9 +42,9 @@
4242
--parallel-count ${CI_NODE_TOTAL:-1}
4343
--parallel-index ${CI_NODE_INDEX:-1}
4444
--extra-preserve-dirs
45-
examples/bluetooth/esp_ble_mesh/ble_mesh_console
46-
examples/bluetooth/hci/controller_hci_uart_esp32
47-
examples/wifi/iperf
45+
examples/bluetooth/esp_ble_mesh/ble_mesh_console
46+
examples/bluetooth/hci/controller_hci_uart_esp32
47+
examples/wifi/iperf
4848
--modified-components ${MR_MODIFIED_COMPONENTS}
4949
--modified-files ${MR_MODIFIED_FILES}
5050
# for detailed documents, please refer to .gitlab/ci/README.md#uploaddownload-artifacts-to-internal-minio-server
@@ -210,15 +210,16 @@ pytest_build_system_macos:
210210
extends:
211211
- .test_build_system_template
212212
- .before_script:build:macos
213-
- .after_script:build:macos:upload-when-fail
213+
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
214214
- .rules:build:macos
215215
tags:
216216
- macos_shell
217217
parallel: 3
218218
variables:
219219
PYENV_VERSION: "3.8"
220-
CI_CCACHE_DISABLE: "1" # ccache: error: Read-only file system
221-
220+
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
221+
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
222+
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
222223
build_docker:
223224
extends:
224225
- .before_script:minimal
@@ -264,6 +265,8 @@ generate_build_child_pipeline:
264265
dependencies: # set dependencies to null to avoid missing artifacts issue
265266
needs:
266267
- pipeline_variables
268+
- job: baseline_manifest_sha
269+
optional: true
267270
artifacts:
268271
paths:
269272
- build_child_pipeline.yml

.gitlab/ci/common.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ stages:
1414
- post_deploy
1515

1616
variables:
17-
# System environment
17+
# System environment
1818

1919
# Common parameters for the 'make' during CI tests
2020
MAKEFLAGS: "-j5 --no-keep-going"
2121

22-
# GitLab-CI environment
22+
# GitLab-CI environment
2323
# Thanks to pack-objects cache, clone strategy should behave faster than fetch
2424
# so we pick "clone" as default git strategy
2525
# Shiny runners by default remove the CI_PROJECT_DIR every time at the beginning of one job
@@ -39,7 +39,7 @@ variables:
3939
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
4040
# we're using .cache folder for caches
4141
GIT_CLEAN_FLAGS: -ffdx -e .cache/
42-
LATEST_GIT_TAG: v5.3.1
42+
LATEST_GIT_TAG: v5.3.2
4343

4444
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
4545
# by default we will fetch all submodules
@@ -219,13 +219,14 @@ variables:
219219
- *setup_tools_and_idf_python_venv
220220
- fetch_submodules
221221

222-
.after_script:build:macos:upload-when-fail:
222+
.after_script:build:macos:upload-failed-job-logs:ccache-show-stats:
223223
after_script:
224224
# macos is running shell executor, which means it would use
225225
# the system installed /usr/local/bin/python3 by default.
226226
# Ensure pyenv and PYENV_VERSION installed
227227
- eval "$(pyenv init -)"
228228
- *upload_failed_job_log_artifacts
229+
- *show_ccache_statistics
229230

230231
.before_script:build:
231232
before_script:
@@ -236,11 +237,11 @@ variables:
236237
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
237238
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
238239

239-
.after_script:build:ccache:
240+
.after_script:build:ccache-show-stats:
240241
after_script:
241242
- *show_ccache_statistics
242243

243-
.after_script:build:ccache:upload-when-fail:
244+
.after_script:build:ccache-show-stats:upload-failed-job-logs:
244245
after_script:
245246
- *show_ccache_statistics
246247
- *upload_failed_job_log_artifacts
@@ -363,12 +364,12 @@ default:
363364
- *setup_tools_and_idf_python_venv
364365
- add_gitlab_ssh_keys
365366
- fetch_submodules
366-
# gitlab bug, setting them here doesn't work
367-
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
368-
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
369-
# artifacts:
370-
# expire_in: 1 week
371-
# when: always
367+
# gitlab bug, setting them here doesn't work
368+
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
369+
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
370+
# artifacts:
371+
# expire_in: 1 week
372+
# when: always
372373
retry:
373374
max: 2
374375
when:

.gitlab/ci/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ build_docs_pdf:
171171
- job: fast_template_app
172172
artifacts: false
173173
optional: true
174+
allow_failure: true # TODO IDFCI-2216
174175
artifacts:
175176
paths:
176177
- docs/_build/*/*/latex/*
@@ -182,6 +183,7 @@ build_docs_pdf_prod:
182183
- .build_docs_template
183184
- .doc-rules:build:docs-full-prod
184185
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
186+
allow_failure: true # TODO IDFCI-2216
185187
artifacts:
186188
paths:
187189
- docs/_build/*/*/latex/*

.gitlab/ci/pre_check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,35 @@ pipeline_variables:
169169
- pipeline.env
170170
expire_in: 1 week
171171
when: always
172+
173+
baseline_manifest_sha:
174+
extends:
175+
- .pre_check_template
176+
- .rules:dev-push
177+
tags: [fast_run, shiny]
178+
script:
179+
- |
180+
# merged results pipelines, by default
181+
# diff between target-branch-head and merged-result-head
182+
if [ -n "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA" ]; then
183+
git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_SHA --depth=1
184+
git checkout FETCH_HEAD
185+
idf-build-apps dump-manifest-sha \
186+
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
187+
--output .manifest_sha
188+
# merge request pipelines, when the mr got conflicts
189+
# diff between diff-base-sha and merge-request-head
190+
elif [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
191+
git fetch origin $CI_MERGE_REQUEST_DIFF_BASE_SHA --depth=1
192+
git checkout FETCH_HEAD
193+
idf-build-apps dump-manifest-sha \
194+
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
195+
--output .manifest_sha
196+
# other pipelines, like the protected branches pipelines
197+
# not triggered in this job
198+
fi
199+
artifacts:
200+
paths:
201+
- .manifest_sha
202+
expire_in: 1 week
203+
when: always

.gitlab/ci/rules.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@
217217
rules:
218218
- <<: *if-tag-release
219219

220+
.rules:dev-push:
221+
rules:
222+
- <<: *if-dev-push
223+
220224
# Do not upload caches on dev branches by default
221225
.rules:upload-python-cache:
222226
rules:
@@ -249,15 +253,6 @@
249253
- <<: *if-dev-push
250254
changes: *patterns-python-files
251255

252-
.rules:patterns:static-code-analysis-preview:
253-
rules:
254-
- <<: *if-dev-push
255-
changes: *patterns-c-files
256-
- <<: *if-dev-push
257-
changes: *patterns-python-files
258-
- <<: *if-dev-push
259-
changes: *patterns-sonarqube-files
260-
261256
.rules:patterns:idf-pytest-plugin:
262257
rules:
263258
- <<: *if-protected

.gitlab/ci/static-code-analysis.yml

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -38,84 +38,3 @@ check_pylint:
3838
fi
3939
- if [ -z "$files" ]; then echo "No python files found"; exit 0; fi
4040
- run_cmd pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:pylint.json $files
41-
42-
# build stage
43-
# Sonarqube related jobs put here for this reason:
44-
# Here we have two jobs. code_quality_check and code_quality_report.
45-
#
46-
# code_quality_check will analyze the code changes between your MR and
47-
# code repo stored in sonarqube server. The analysis result is only shown in
48-
# the comments under this MR and won't be transferred to the server.
49-
#
50-
# code_quality_report will analyze and transfer both of the newly added code
51-
# and the analysis result to the server.
52-
#
53-
# Put in the front to ensure that the newly merged code can be stored in
54-
# sonarqube server ASAP, in order to avoid reporting unrelated code issues
55-
.sonar_scan_template:
56-
stage: build
57-
extends: .pre_check_template
58-
# full clone since this image does not support fetch --shallow-since-cutoff
59-
# shiny runners are used for full clone
60-
tags: [build, shiny]
61-
image: $SONARQUBE_SCANNER_IMAGE
62-
before_script:
63-
- source tools/ci/utils.sh
64-
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
65-
- fetch_submodules
66-
# Exclude the submodules, all paths ends with /**
67-
- submodules=$(get_all_submodules)
68-
# get all exclude paths specified in tools/ci/sonar_exclude_list.txt | ignore lines start with # | xargs | replace all <space> to <comma>
69-
- custom_excludes=$(cat $CI_PROJECT_DIR/tools/ci/sonar_exclude_list.txt | grep -v '^#' | xargs | sed -e 's/ /,/g')
70-
# Exclude the report dir as well
71-
- export EXCLUSIONS="$custom_excludes,$submodules"
72-
- export SONAR_SCANNER_OPTS="-Xmx2048m"
73-
variables:
74-
GIT_DEPTH: 0
75-
REPORT_PATTERN: clang_tidy_reports/**/*.txt
76-
artifacts:
77-
paths:
78-
- $REPORT_PATTERN
79-
expire_in: 1 week
80-
when: always
81-
dependencies: # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
82-
- clang_tidy_check
83-
84-
code_quality_check:
85-
extends:
86-
- .sonar_scan_template
87-
- .rules:patterns:static-code-analysis-preview
88-
allow_failure: true # it's using exit code to indicate the code analysis result,
89-
# we don't want to block ci when critical issues founded
90-
script:
91-
- export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits --src-branch ${CI_COMMIT_REF_NAME} | tr '\n' ',')
92-
# test if this branch have merge request, if not, exit 0
93-
- test -n "$CI_MERGE_REQUEST_IID" || exit 0
94-
- test -n "$CI_MERGE_REQUEST_COMMITS" || exit 0
95-
- sonar-scanner
96-
-Dsonar.analysis.mode=preview
97-
-Dsonar.branch.name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
98-
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
99-
-Dsonar.exclusions=$EXCLUSIONS
100-
-Dsonar.gitlab.ci_merge_request_iid=$CI_MERGE_REQUEST_IID
101-
-Dsonar.gitlab.commit_sha=$CI_MERGE_REQUEST_COMMITS
102-
-Dsonar.gitlab.merge_request_discussion=true
103-
-Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
104-
-Dsonar.host.url=$SONAR_HOST_URL
105-
-Dsonar.login=$SONAR_LOGIN
106-
107-
code_quality_report:
108-
extends:
109-
- .sonar_scan_template
110-
- .rules:protected
111-
allow_failure: true # it's using exit code to indicate the code analysis result,
112-
# we don't want to block ci when critical issues founded
113-
script:
114-
- sonar-scanner
115-
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
116-
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
117-
-Dsonar.exclusions=$EXCLUSIONS
118-
-Dsonar.gitlab.commit_sha=$PIPELINE_COMMIT_SHA
119-
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
120-
-Dsonar.host.url=$SONAR_HOST_URL
121-
-Dsonar.login=$SONAR_LOGIN

Kconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
625625
config COMPILER_ORPHAN_SECTIONS_WARNING
626626
bool "Place with warning"
627627
help
628-
Places orphan sections without a warning message.
628+
Places orphan sections with a warning message.
629629

630630
config COMPILER_ORPHAN_SECTIONS_PLACE
631631
bool "Place silently"
@@ -655,3 +655,5 @@ mainmenu "Espressif IoT Development Framework Configuration"
655655
- CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
656656
- CONFIG_ESP_WIFI_EAP_TLS1_3
657657
- CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
658+
- CONFIG_USB_HOST_EXT_PORT_SUPPORT_LS
659+
- CONFIG_USB_HOST_EXT_PORT_RESET_ATTEMPTS

components/bootloader_support/include/bootloader_common.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -181,6 +181,20 @@ uint32_t bootloader_common_get_chip_ver_pkg(void);
181181
*/
182182
esp_err_t bootloader_common_check_chip_validity(const esp_image_header_t* img_hdr, esp_image_type type);
183183

184+
#if !CONFIG_IDF_TARGET_ESP32
185+
/**
186+
* @brief Check the eFuse block revision
187+
*
188+
* @param[in] min_rev_full The required minimum revision of the eFuse block
189+
* @param[in] max_rev_full The required maximum revision of the eFuse block
190+
* @return
191+
* - ESP_OK: The eFuse block revision is in the required range.
192+
* - ESP_OK: DISABLE_BLK_VERSION_MAJOR has been set in the eFuse of the SoC. No requirements shall be checked at this time.
193+
* - ESP_FAIL: The eFuse block revision of this chip does not match the requirement of the current image.
194+
*/
195+
esp_err_t bootloader_common_check_efuse_blk_validity(uint32_t min_rev_full, uint32_t max_rev_full);
196+
#endif // !CONFIG_IDF_TARGET_ESP32
197+
184198
/**
185199
* @brief Configure VDDSDIO, call this API to rise VDDSDIO to 1.9V when VDDSDIO regulator is enabled as 1.8V mode.
186200
*/

0 commit comments

Comments
 (0)