Commit Graph

49603 Commits

Author SHA1 Message Date
Frantisek Hrbata
b72b14a159 feat(cmakev2/utilities): add __set_property and __get_property helpers
The `idf_build_(set|get)_property` and
`idf_component_(set|get)_property` functions share a lot of similar
code. Move these common parts into new `__(set|get)_property` helper
functions. With the upcoming `idf_build_library` API function, we might
need to add properties for the interface target created for the library,
which would otherwise lead to yet another code duplication for setting
and getting library interface properties.

Update the current implementations of `idf_build_(set|get)_property` and
`idf_component_(set|get)_property` to utilize these new helper
functions.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
27e726b176 feat(cmakev2/test): add simple test for toolchain settings
Also format the current testing CMakeLists.txt properly.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
d37f7eaeb6 feat(cmakev2/idf): initialize toolchain
Determine the IDF_TOOLCHAIN from the following sources in this order:
environmental variable and CMake cache variable.  Ensure there are no
inconsistencies between the values set in these different locations.

Set the IDF_TOOLCHAIN and IDF_TOOLCHAIN_FILE build properties. Also,
configure the IDF_TOOLCHAIN CMake cache variable and set the
CMAKE_TOOLCHAIN_FILE global variable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
ec600a8132 feat(cmakev2/idf): initialize IDF_TARGET build property
Determine the IDF_TARGET from the following sources in this order:
environmental variable, CMake cache variable, and sdkconfig files.
Ensure there are no inconsistencies between the values set in these
different locations.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
6e27038dc3 feat(cmakev2/utilities): add __get_sdkconfig_option helper
Search for the configuration option value in the specified sdkconfig
file.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
62db5692cd feat(cmakev2/idf): initialize SDKCONFIG and SDKCONFIG_DEFAULTS build properties
Based on the environmental variables, CMake cache variables, or default
values, set the DKCONFIG and SDKCONFIG_DEFAULTS build properties.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
ed34c24de6 feat(cmakev2/idf): add Python interpreter detection
Determine the Python interpreter and verify package dependencies if the
CMake cache variable PYTHON_DEPS_CHECKED is not set.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
00671f2f1e feat(cmakev2/idf): add IDF_VERSION variables
The version.cmake file should be the sole file used from the cmakev1
build system. There's no need to maintain the IDF_VERSION information in
two separate locations.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
95f4d88dac feat(cmakev2/utilities): add __get_default_value helper
Helper for obtaining the default value of a variable. It returns the
value of the specified variable based on the following order of
precedence, with the highest precedence first:

1. Environmental variable
2. CMake cache variable
3. Provided default value

This can be used to retrieve the value of variables that might also be
set in the environment or cache, such as PYTHON or SDKCONFIG.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
4b02439599 fix(cmakev2/utilities): make the PATHS option optional in __get_absolute_paths
With the default signature of `cmake_parse_arguments`, without using
`PARSE_ARGV`, it's not possible to determine if options were not
specified or set as an empty string (or empty list)[1]. If an empty
string is passed to the `PATHS` option, the variable parsed by
`cmake_parse_arguments` is not defined. This issue can be addressed by
using `PARSE_ARGV`, but this approach only works for functions and
requires CMake version 3.31 or newer. Additionally, when `PARSE_ARGV` is
used for multiple value option, the values are not concatenated into a
single list, which is inconvenient, as the lists are instead escaped. If
the `PATHS` option is not defined, set it to an empty string.  This
allows passing an empty string, as well as a mix of lists and
individual strings, through PATHS.

The behaviour can be seen with a simple example:

$ cmake -P test.cmake

```test.cmake
cmake_minimum_required(VERSION 3.22)

function(test)
    set(options)
    set(one_value)
    set(multi_value PATHS)

    cmake_parse_arguments(ARG "${options}" "${one_value}" "${multi_value}" ${ARGN})
    #cmake_parse_arguments(PARSE_ARGV 0 ARG "${options}" "${one_value}" "${multi_value}")

    message("PATHS: ${ARG_PATHS}")
endfunction()

test(PATHS "one;two;three" "four" "five;six" "seven")
```

```
PATHS: one;two;three;four;five;six;seven
vs
PATHS: one\;two\;three;four;five\;six;seven
```

Also update the current usage of __get_absolute_paths, as the check for
empty PATHS is no longer necessary.

[1] https://cmake.org/cmake/help/latest/policy/CMP0174.html#policy:CMP0174

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
2cbeb7a1a2 test(cmakev2): add testing project CMakeLists.txt
This is a basic CMake project that currently includes tests for
displaying build and component properties, as well as testing component
priority. These tests should be removed once proper CI testing is
in place.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
050ed5c76a ci(cmakev2): temporarily exclude cmakev2 from CI testing
There are currently no CI tests for CMakeV2, so add it to the
exclude_check_tools_files.txt file. Once CI testing is implemented, this
change should be reverted.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Frantisek Hrbata
a9d55936ef feat(cmakev2): add basic component initialization
Discover component directories and initialize components within them.
This process does not include managed components, which should be added
separately at a later stage. To facilitate this, some minimal
functionalities are introduced, such as build properties, component
properties, and other helper functions.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Island
583cca8f8d Merge branch 'feat/support_blecrt_361' into 'master'
fix(ble/bluedroid): Fixed GATT response timeout setting

Closes BLERP-2041 and BLERP-2042

See merge request espressif/esp-idf!40187
2025-10-30 17:11:19 +08:00
laokaiyao
ff1c14b1a3 refactor(parlio_rx): refactor to support unaligned user payload buffer
Closes https://github.com/espressif/esp-idf/issues/17581
2025-10-30 16:12:34 +08:00
Chen Ji Chang
a177fe6483 Merge branch 'feat/rgb_lcd_memory' into 'master'
feat(rgb_lcd): allow users to manage the lifecycle of the frame buffer

Closes IDF-13917

See merge request espressif/esp-idf!41457
2025-10-30 16:07:15 +08:00
laokaiyao
75eacee3ec refactor(parlio_rx): use gdma_link for better gdma link management 2025-10-30 16:06:12 +08:00
laokaiyao
49284c3f8d feat(gdma_link): support to select final node link type 2025-10-30 16:06:12 +08:00
morris
717312f472 fix(gdma): fixed the race conditon in of gdma resource allocation 2025-10-30 16:05:44 +08:00
wuzhenghui
487f9204dd change(esp_hw_support): esp32p4 rev3.0 dummy read workaround refactor 2025-10-30 14:50:33 +08:00
wuzhenghui
e9da2e3606 fix(esp_hw_support): add p4 rev3.0 MSPI workaround for deepsleep 2025-10-30 14:50:27 +08:00
Shen Meng Jing
b3eaeaea7a Merge branch 'docs/update_cn_translation' into 'master'
docs: Update CN translation for several docs

Closes DOC-12708 and DOC-12686

See merge request espressif/esp-idf!42918
2025-10-30 14:42:01 +08:00
Island
ed0a86ad53 Merge branch 'fix/ble_mesh_adv_rpt_fix' into 'master'
fix(ble_mesh): check data length before assigning adv data pointer

Closes BLERP-2343

See merge request espressif/esp-idf!42976
2025-10-30 14:23:46 +08:00
Island
c705b71ffe Merge branch 'change/ble_update_lib_20251030' into 'master'
change(ble): [AUTO_MR] 20251030 - Update ESP BLE Controller Lib

Closes BLERP-2344

See merge request espressif/esp-idf!42979
2025-10-30 14:23:40 +08:00
Rahul Tank
2738c5ac76 fix(nimble): Address compilation issues in nimble examples 2025-10-30 10:54:36 +05:30
nilesh.kale
e1f7a5e1fc feat: added test_cases for ECC P-384 curve operations 2025-10-30 10:42:40 +05:30
nilesh.kale
b132ab96d3 feat(hal): add support for ESP32-P4 ECO5 ECC peripheral
This commit also enabled constant time mode for ECC.
2025-10-30 10:42:40 +05:30
radek.tandler
fffef09b50 fix(spi-flash): Fixed missing flash write check of non 4-byte aligned data 2025-10-30 12:20:32 +08:00
Shen Mengjing
3e501f5bff docs: Sync EN and CN docs without 'needs translation' label 2025-10-30 12:07:54 +08:00
Chen Ji Chang
0630fe8870 Merge branch 'fix/fix_esp32_rmt_pm_lock_type' into 'master'
fix(rmt): fix pm lock type to increase stability

Closes IDFCI-3746 and IDFCI-3343

See merge request espressif/esp-idf!42970
2025-10-30 11:53:29 +08:00
Zhou Xiao
777f21783b fix(ble): fixed hci event log when link layer logging is disabled 2025-10-30 11:44:37 +08:00
radek.tandler
c16f82b367 fix(spi-flash): Fixed wrong offset calculation in s_verify_write log message 2025-10-30 11:38:40 +08:00
Chen Jichang
73bc04afec feat(esp32h4): switch default h4 build to mp version 2025-10-30 11:23:51 +08:00
Island
338c4c471f Merge branch 'docs/ble_add_low_power_intro' into 'master'
Added BLE Low Power Mode Introduction

See merge request espressif/esp-idf!40106
2025-10-30 11:06:23 +08:00
yinqingzhao
4656a3cc7c fix(wifi): fix some wifi bugs related to bandwidth, twt and regdomain 2025-10-30 10:46:58 +08:00
zhaoweiliang
16a893e934 change(ble): [AUTO_MR] Update lib_esp32c6 to 5b8adfa8 2025-10-30 10:45:18 +08:00
zhaoweiliang
baf8a20a5e change(ble): [AUTO_MR] Update lib_esp32c5 to 5b8adfa8 2025-10-30 10:45:18 +08:00
zhaoweiliang
4e07ce892d change(ble): [AUTO_MR] Update lib_esp32h2 to 5b8adfa8 2025-10-30 10:45:18 +08:00
Jiang Jiang Jian
23455e9fd0 Merge branch 'feat/libphy_c3_s3_c2_rxdc_20250804' into 'master'
feat(phy): update esp32c3 esp32s3 esp32c2 esp32s2 libphy for PHY cali param opt

Closes ESPCS-1019

See merge request espressif/esp-idf!41045
2025-10-29 20:06:46 +08:00
luoxu
6202aa89a6 fix(ble_mesh): check data length before assigning adv data pointer 2025-10-29 20:00:06 +08:00
He Binglin
2e0f0dc66a Merge branch 'test/esp_idf_hp_uart_wakeup' into 'master'
fix(esp_driver_uart): resolve the issue of other chips receiving break data

Closes IDFCI-4616 and IDFCI-4810

See merge request espressif/esp-idf!42952
2025-10-29 19:45:26 +08:00
wanckl
a31e2b4018 refactor(driver_twai): using hal/config in hal layer 2025-10-29 17:46:15 +08:00
wanckl
59d2692bc5 refactor(driver_twai): remove errata config selection 5 2025-10-29 17:46:15 +08:00
wanckl
3bebf1041d refactor(driver_twai): remove errata config selection 4 2025-10-29 17:46:15 +08:00
wanckl
cd483606c9 refactor(driver_twai): remove errata config selection 3 2025-10-29 17:46:15 +08:00
wanckl
66f56f9ed1 refactor(driver_twai): remove errata config selection 2 2025-10-29 17:46:15 +08:00
wanckl
e894d65548 refactor(driver_twai): remove errata config selection 1 2025-10-29 17:45:43 +08:00
Chen Jichang
74b18dac5c feat(rgb_lcd): allow users to manage the lifecycle of the frame buffer 2025-10-29 17:39:18 +08:00
morris
f58a86a82a Merge branch 'feat/deprecate_legacy_twai' into 'master'
feat(driver_twai): add legacy driver deprecated warning

Closes IDF-14261

See merge request espressif/esp-idf!42622
2025-10-29 17:05:26 +08:00
luoxu
29a722296f fix(ble_mesh): fixed incorrect rpl behavior in transport enh 2025-10-29 17:03:51 +08:00