From 0c042bd2c4f825329ffabbb4ff76cdc68ac07bef Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 17 Nov 2025 11:09:06 +0200 Subject: [PATCH 1/9] feat(core): Add option to support chip variants --- boards.txt | 9 +++++++++ platform.txt | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/boards.txt b/boards.txt index dc38debe94d..82df1e1fc30 100644 --- a/boards.txt +++ b/boards.txt @@ -19,6 +19,7 @@ menu.EraseFlash=Erase All Flash Before Sketch Upload menu.JTAGAdapter=JTAG Adapter menu.ZigbeeMode=Zigbee Mode menu.PinNumbers=Pin Numbering +menu.ChipVariant=Chip Variant # Custom options menu.Revision=Board Revision @@ -398,6 +399,7 @@ esp32p4.build.target=esp esp32p4.build.mcu=esp32p4 esp32p4.build.core=esp32 esp32p4.build.variant=esp32p4 +esp32p4.build.chip_variant=esp32p4_es esp32p4.build.board=ESP32P4_DEV esp32p4.build.bootloader_addr=0x2000 @@ -414,6 +416,13 @@ esp32p4.build.boot=qio esp32p4.build.partitions=default esp32p4.build.defines= +esp32p4.menu.ChipVariant.prev3=Before v3.00 +esp32p4.menu.ChipVariant.prev3.build.chip_variant=esp32p4_es +esp32p4.menu.ChipVariant.prev3.build.f_cpu=360000000L +esp32p4.menu.ChipVariant.postv3=v3.00 or newer +esp32p4.menu.ChipVariant.postv3.build.chip_variant=esp32p4 +esp32p4.menu.ChipVariant.prev3.build.f_cpu=400000000L + ## IDE 2.0 Seems to not update the value esp32p4.menu.JTAGAdapter.default=Disabled esp32p4.menu.JTAGAdapter.default.build.copy_jtag_files=0 diff --git a/platform.txt b/platform.txt index d715c0e2dca..f346d385b90 100644 --- a/platform.txt +++ b/platform.txt @@ -27,8 +27,8 @@ tools.gen_insights_pkg.cmd.windows="{runtime.platform.path}\tools\gen_insights_p compiler.path={tools.{build.tarch}-esp-elf-gcc.path}/bin/ compiler.prefix={build.tarch}-{build.target}-elf- -compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.mcu} -compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.mcu} +compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.chip_variant} +compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.chip_variant} # EXPERIMENTAL feature: optimization flags # - this is alpha and may be subject to change without notice @@ -105,6 +105,7 @@ build.event_core= build.extra_flags=-DARDUINO_HOST_OS="{runtime.os}" -DARDUINO_FQBN="{build.fqbn}" -DESP32=ESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.loop_core} {build.event_core} {build.defines} {build.extra_flags.{build.mcu}} {build.zigbee_mode} build.extra_libs= build.memory_type={build.boot}_qspi +build.chip_variant={build.mcu} # Custom build options build.opt.name=build_opt.h From ffe4d3639dd7fac524c24d0a0cbea0c69b7d58f1 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Mon, 17 Nov 2025 13:08:25 +0100 Subject: [PATCH 2/9] add Chip variant to pioarduino-build.py (#12037) * add `chip_variant` to pioarduino-build.py to support different variants of an MCU (p4 prev3 and postv3) * Refactor build_mcu and chip_variant assignment logic * ci(pre-commit): Apply automatic fixes * Fix chip_variant retrieval with default value --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- tools/pioarduino-build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/pioarduino-build.py b/tools/pioarduino-build.py index 2bacd9fcaef..ac0a743610e 100644 --- a/tools/pioarduino-build.py +++ b/tools/pioarduino-build.py @@ -32,6 +32,8 @@ platform = env.PioPlatform() board_config = env.BoardConfig() build_mcu = board_config.get("build.mcu", "").lower() +chip_variant = board_config.get("build.chip_variant", "").lower() +chip_variant = chip_variant if chip_variant else build_mcu partitions_name = board_config.get("build.partitions", board_config.get("build.arduino.partitions", "")) FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32") @@ -80,7 +82,7 @@ def get_bootloader_image(variants_dir): else generate_bootloader_image( join( FRAMEWORK_LIBS_DIR, - build_mcu, + chip_variant, "bin", "bootloader_${__get_board_boot_mode(__env__)}_${__get_board_f_boot(__env__)}.elf", ) @@ -159,7 +161,7 @@ def add_tinyuf2_extra_image(): SConscript( join( FRAMEWORK_LIBS_DIR, - build_mcu, + chip_variant, "pioarduino-build.py", ) ) From 5ddff74dfe209f108c609105a2c9f65714bea12e Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 18 Nov 2025 11:51:43 +0200 Subject: [PATCH 3/9] feat(p4): Fix CPU frequency selection --- boards.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/boards.txt b/boards.txt index 82df1e1fc30..fee18c92c14 100644 --- a/boards.txt +++ b/boards.txt @@ -421,7 +421,7 @@ esp32p4.menu.ChipVariant.prev3.build.chip_variant=esp32p4_es esp32p4.menu.ChipVariant.prev3.build.f_cpu=360000000L esp32p4.menu.ChipVariant.postv3=v3.00 or newer esp32p4.menu.ChipVariant.postv3.build.chip_variant=esp32p4 -esp32p4.menu.ChipVariant.prev3.build.f_cpu=400000000L +esp32p4.menu.ChipVariant.postv3.build.f_cpu=400000000L ## IDE 2.0 Seems to not update the value esp32p4.menu.JTAGAdapter.default=Disabled @@ -521,12 +521,6 @@ esp32p4.menu.PartitionScheme.custom=Custom esp32p4.menu.PartitionScheme.custom.build.partitions= esp32p4.menu.PartitionScheme.custom.upload.maximum_size=16777216 -## From https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-reference/kconfig.html#config-esp-default-cpu-freq-mhz -esp32p4.menu.CPUFreq.360=360MHz -esp32p4.menu.CPUFreq.360.build.f_cpu=360000000L -esp32p4.menu.CPUFreq.40=40MHz -esp32p4.menu.CPUFreq.40.build.f_cpu=40000000L - esp32p4.menu.FlashMode.qio=QIO esp32p4.menu.FlashMode.qio.build.flash_mode=dio esp32p4.menu.FlashMode.qio.build.boot=qio From fdc2482d82586f72b5de16b2f8d469fa6b0d9955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 18 Nov 2025 10:52:55 +0100 Subject: [PATCH 4/9] fix(adc): Rename data struct as its used in idf --- cores/esp32/esp32-hal-adc.c | 6 +++--- cores/esp32/esp32-hal-adc.h | 4 ++-- docs/en/api/adc.rst | 10 +++++----- .../AnalogReadContinuous/AnalogReadContinuous.ino | 2 +- tests/validation/periman/periman.ino | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index c7cc1f5d556..dcdb529cfc2 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -360,7 +360,7 @@ static uint8_t __adcContinuousAtten = ADC_11db; static uint8_t __adcContinuousWidth = SOC_ADC_DIGI_MAX_BITWIDTH; static uint8_t used_adc_channels = 0; -adc_continuous_data_t *adc_result = NULL; +adc_continuous_result_t *adc_result = NULL; static bool adcContinuousDetachBus(void *adc_unit_number) { adc_unit_t adc_unit = (adc_unit_t)adc_unit_number - 1; @@ -536,7 +536,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi } //Allocate and prepare result structure for adc readings - adc_result = malloc(pins_count * sizeof(adc_continuous_data_t)); + adc_result = malloc(pins_count * sizeof(adc_continuous_result_t)); for (int k = 0; k < pins_count; k++) { adc_result[k].pin = pins[k]; adc_result[k].channel = channel[k]; @@ -577,7 +577,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi return true; } -bool analogContinuousRead(adc_continuous_data_t **buffer, uint32_t timeout_ms) { +bool analogContinuousRead(adc_continuous_result_t **buffer, uint32_t timeout_ms) { if (adc_handle[ADC_UNIT_1].adc_continuous_handle != NULL) { uint32_t bytes_read = 0; uint32_t read_raw[used_adc_channels]; diff --git a/cores/esp32/esp32-hal-adc.h b/cores/esp32/esp32-hal-adc.h index 6ab5c920cfc..d22ac65d06f 100644 --- a/cores/esp32/esp32-hal-adc.h +++ b/cores/esp32/esp32-hal-adc.h @@ -86,7 +86,7 @@ typedef struct { uint8_t channel; /*! Date: Tue, 18 Nov 2025 10:33:37 +0000 Subject: [PATCH 5/9] IDF release/v5.5 8d036f2e --- package/package_esp32_index.template.json | 204 +++++++++++----------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/package/package_esp32_index.template.json b/package/package_esp32_index.template.json index 32fba7d3082..eb84ab9076e 100644 --- a/package/package_esp32_index.template.json +++ b/package/package_esp32_index.template.json @@ -51,12 +51,12 @@ { "packager": "esp32", "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-8410210c-v2" + "version": "idf-release_v5.5-8d036f2e-v1" }, { "packager": "esp32", "name": "xtensa-esp-elf-gcc", - "version": "esp-14.2.0_20250730" + "version": "esp-14.2.0_20251107" }, { "packager": "esp32", @@ -66,7 +66,7 @@ { "packager": "esp32", "name": "riscv32-esp-elf-gcc", - "version": "esp-14.2.0_20250730" + "version": "esp-14.2.0_20251107" }, { "packager": "esp32", @@ -104,125 +104,125 @@ "tools": [ { "name": "esp32-arduino-libs", - "version": "idf-release_v5.5-8410210c-v2", + "version": "idf-release_v5.5-8d036f2e-v1", "systems": [ { "host": "i686-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "x86_64-mingw32", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "arm64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8410210c-v2.zip", - "checksum": "SHA-256:ebcc69e1db0681147c3ef145f4cd5a063a7d3cb87820ddf57e2a04e363e42223", - "size": "449287409" + "url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "archiveFileName": "esp32-arduino-libs-idf-release_v5.5-8d036f2e-v1.zip", + "checksum": "SHA-256:333daa41ae0f479d0400fdf1ab0f47141dccd10245c7a1c8fa504cb0eed486f8", + "size": "508786676" } ] }, { "name": "xtensa-esp-elf-gcc", - "version": "esp-14.2.0_20250730", + "version": "esp-14.2.0_20251107", "systems": [ { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-x86_64-linux-gnu.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-x86_64-linux-gnu.tar.gz", - "checksum": "SHA-256:2031cbec81edf5f863afcaba44ce8d05d2a570c48ad514f0d43be7f9419198d8", - "size": "326342823" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-x86_64-linux-gnu.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:c8aced923fe9bb8d3614212aee94b9f354f1c47992ac987f74138997212e0393", + "size": "326311197" }, { "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-aarch64-linux-gnu.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-aarch64-linux-gnu.tar.gz", - "checksum": "SHA-256:0ac7087a07b554477f66043b6cd81189b3b15d89d51dc08767b1af469f3dd532", - "size": "322745855" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-aarch64-linux-gnu.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-aarch64-linux-gnu.tar.gz", + "checksum": "SHA-256:d290e34fcf10ac53157add3de4954d8d10b732f7b7763b7494686ada1d7a4e49", + "size": "322742882" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-arm-linux-gnueabi.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-arm-linux-gnueabi.tar.gz", - "checksum": "SHA-256:8a64d968832a3ede4481fcec8140968384942c52f817c4af347401ef024b52a5", - "size": "322129706" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-arm-linux-gnueabi.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-arm-linux-gnueabi.tar.gz", + "checksum": "SHA-256:b026f393edf77401caeb35582574de02937d318c61ea6883ec5ffe266af96b6e", + "size": "322125748" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-i586-linux-gnu.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-i586-linux-gnu.tar.gz", - "checksum": "SHA-256:a9e3b5f516a00b6b580c7c7bb983e536ea76fb39cac1cbc3d0e632c9f790c71c", - "size": "330989568" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-i586-linux-gnu.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-i586-linux-gnu.tar.gz", + "checksum": "SHA-256:4a4e6ca8f61cea063ccca9e79d8b5d0bcc6e867d0f5ad0bbab1b61a85ad5930b", + "size": "330996425" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-x86_64-apple-darwin.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-x86_64-apple-darwin.tar.gz", - "checksum": "SHA-256:7f6e9273b0c2330869f847dd6a12c7a95eda572de5f58bd5dc4550869395e01f", - "size": "338869041" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-x86_64-apple-darwin.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-x86_64-apple-darwin.tar.gz", + "checksum": "SHA-256:26a05cecf704c660ed5eeb90737be27135fd686267c63fda0fb8b4046880b7b5", + "size": "338872460" }, { "host": "arm64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-aarch64-apple-darwin.tar.gz", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-aarch64-apple-darwin.tar.gz", - "checksum": "SHA-256:8ce30a1b662dc0d57266146c2a144cb8238761fe8b118c0610ff19533dd35d78", - "size": "321443711" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-aarch64-apple-darwin.tar.gz", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-aarch64-apple-darwin.tar.gz", + "checksum": "SHA-256:4f2765f2ecbeaf5de42a26277462ca0dc3f013d15fe85f1f1b2d3a69633abb70", + "size": "321459468" }, { "host": "i686-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-i686-w64-mingw32.zip", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-i686-w64-mingw32.zip", - "checksum": "SHA-256:77020244927a0deaabb650ea1c56ee1d355ca9fdad78d0f53b1a80075ecabcba", - "size": "391479409" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-i686-w64-mingw32.zip", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-i686-w64-mingw32.zip", + "checksum": "SHA-256:70778f0e7dad518f9e6547911bedd6e23c48775313c7ed92f1cb04a86cea2351", + "size": "391481671" }, { "host": "x86_64-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/xtensa-esp-elf-14.2.0_20250730-x86_64-w64-mingw32.zip", - "archiveFileName": "xtensa-esp-elf-14.2.0_20250730-x86_64-w64-mingw32.zip", - "checksum": "SHA-256:9ce39218884cfbf428f9f6b1cb6afd9341e327f5e1a8d1d0369c21ae6e3b0828", - "size": "396050234" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/xtensa-esp-elf-14.2.0_20251107-x86_64-w64-mingw32.zip", + "archiveFileName": "xtensa-esp-elf-14.2.0_20251107-x86_64-w64-mingw32.zip", + "checksum": "SHA-256:b0de5062da2f05d1773d1537421134e2a7517bd74a06c3b5763b07f94e38bece", + "size": "396056136" } ] }, @@ -290,63 +290,63 @@ }, { "name": "riscv32-esp-elf-gcc", - "version": "esp-14.2.0_20250730", + "version": "esp-14.2.0_20251107", "systems": [ { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-x86_64-linux-gnu.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-x86_64-linux-gnu.tar.gz", - "checksum": "SHA-256:05b3fe041866c2bee400c3a5bc591beb710795aee3bab63b7c95e2e47f1f4cf4", - "size": "596288860" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-x86_64-linux-gnu.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-x86_64-linux-gnu.tar.gz", + "checksum": "SHA-256:051403b578f5c76ab5fbadb5171ec580df7695b16657a97d27e728b92ba64854", + "size": "598664912" }, { "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-aarch64-linux-gnu.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-aarch64-linux-gnu.tar.gz", - "checksum": "SHA-256:e1c63b7dc9348af0a642b1694a7f5b83fdb08ad1fb4ec0742f52864eddfe0573", - "size": "590413157" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-aarch64-linux-gnu.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-aarch64-linux-gnu.tar.gz", + "checksum": "SHA-256:b7c7ebcd109c7bcf173f541e0974d4bb563f577acfccb9e60da502be73bc6070", + "size": "592595534" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-arm-linux-gnueabi.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-arm-linux-gnueabi.tar.gz", - "checksum": "SHA-256:433a232e515a75f9155ab50900cfeb25f6522f40faf9e24a0126d67448e31784", - "size": "589108924" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-arm-linux-gnueabi.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-arm-linux-gnueabi.tar.gz", + "checksum": "SHA-256:c6f02999b34dcfef6b035f727ed9505717dba33285cde7c62798f4e92d650fb7", + "size": "591433574" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-i586-linux-gnu.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-i586-linux-gnu.tar.gz", - "checksum": "SHA-256:b28e95b39f64e485da4cb9e2c93904cefeb46ce17390cfe8844cbd96354921d4", - "size": "599653621" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-i586-linux-gnu.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-i586-linux-gnu.tar.gz", + "checksum": "SHA-256:7385b2537f62cf77526a37f9b229f9deabb22e71ea267c27023d1daac83b40ac", + "size": "602193988" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-x86_64-apple-darwin.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-x86_64-apple-darwin.tar.gz", - "checksum": "SHA-256:07fc04efb5ee40c75f526761424d1e8cd1b486393b8edc1dc558a5eaa6524120", - "size": "604869144" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-x86_64-apple-darwin.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-x86_64-apple-darwin.tar.gz", + "checksum": "SHA-256:81bf86f4bc07e3355ff0fc5f5699c0880d450d8ec74cdd6c734747d721e73994", + "size": "608972763" }, { "host": "arm64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-aarch64-apple-darwin.tar.gz", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-aarch64-apple-darwin.tar.gz", - "checksum": "SHA-256:654e2c0d14e8c8955a166a800af9081bd2fdad41a89c20659a20eeff6c0f287b", - "size": "581049206" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-aarch64-apple-darwin.tar.gz", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-aarch64-apple-darwin.tar.gz", + "checksum": "SHA-256:c87e17eced80e82d971508f9a01ce602155e2b801a7e7dcbe648ace0f722fe9d", + "size": "584629596" }, { "host": "i686-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-i686-w64-mingw32.zip", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-i686-w64-mingw32.zip", - "checksum": "SHA-256:ac8816920e0bc6c4032abc27f4962b2b2f59b231ed86e0002476196f9f1f0d35", - "size": "686131875" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-i686-w64-mingw32.zip", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-i686-w64-mingw32.zip", + "checksum": "SHA-256:7670128df99adbdcbc99ebbdccda19347daf2fd191aab1eb22c24ae1c4d77226", + "size": "690936765" }, { "host": "x86_64-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20250730/riscv32-esp-elf-14.2.0_20250730-x86_64-w64-mingw32.zip", - "archiveFileName": "riscv32-esp-elf-14.2.0_20250730-x86_64-w64-mingw32.zip", - "checksum": "SHA-256:a41e5219f0ff66cde3da3ac096b55d60fef4a1fb746590893c4c47f5437f192a", - "size": "692761883" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251107/riscv32-esp-elf-14.2.0_20251107-x86_64-w64-mingw32.zip", + "archiveFileName": "riscv32-esp-elf-14.2.0_20251107-x86_64-w64-mingw32.zip", + "checksum": "SHA-256:373abecd1cdfd480b09b8659e319e636064f99fec46f635a05c5413e5f009c05", + "size": "697522467" } ] }, From b78536b5a6e0b4675770da162076d315253c3156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:48:39 +0100 Subject: [PATCH 6/9] fix(adc): Add weak definitions for p4 rev 3 --- cores/esp32/esp32-hal-adc.c | 43 ++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index dcdb529cfc2..dd3898c43d1 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -21,6 +21,39 @@ #include "esp_adc/adc_continuous.h" #include "esp_adc/adc_cali_scheme.h" +#if CONFIG_IDF_TARGET_ESP32P4 && CONFIG_ESP32P4_REV_MIN_FULL >= 300 +// NOTE: These weak definitions allow successful linkage if the real efuse calibration functions are missing. +// This is a workaround for the ESP32P4 rev 3.0+, which is missing efuse calibration functions in the IDF. +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_ver(void) +{ + return 0; +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_init_code(uint32_t atten, uint32_t *code) +{ + if (code) { + *code = 0; + } + return 0; // 0 means success in ESP-IDF conventions +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_chan_compens(uint32_t atten, uint32_t *comp) +{ + if (comp) { + *comp = 0; + } + return 0; +} + +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_cal_voltage(uint32_t atten, uint32_t *voltage) +{ + if (voltage) { + *voltage = 0; + } + return 0; +} +#endif + // ESP32-C2 does not define those two for some reason #ifndef SOC_ADC_DIGI_RESULT_BYTES #define SOC_ADC_DIGI_RESULT_BYTES (4) @@ -75,7 +108,7 @@ static bool adcDetachBus(void *pin) { if (err != ESP_OK) { return false; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; @@ -127,7 +160,7 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_curve_fitting failed with error: %d", err); return err; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED log_d("Deleting ADC_UNIT_%d line cali handle", adc_unit); err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { @@ -310,7 +343,7 @@ uint32_t __analogReadMilliVolts(uint8_t pin) { .bitwidth = __analogWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __analogWidth, @@ -379,7 +412,7 @@ static bool adcContinuousDetachBus(void *adc_unit_number) { if (err != ESP_OK) { return false; } -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) +#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; @@ -552,7 +585,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi .bitwidth = __adcContinuousWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif (!defined(CONFIG_IDF_TARGET_ESP32H2) && !defined(CONFIG_IDF_TARGET_ESP32P4)) //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __adcContinuousWidth, From a43a04eec85fdd5db98472940173995fe51093c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:53:55 +0100 Subject: [PATCH 7/9] fix(adc): Fix if else --- cores/esp32/esp32-hal-adc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index dd3898c43d1..da13570036d 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -108,7 +108,7 @@ static bool adcDetachBus(void *pin) { if (err != ESP_OK) { return false; } -#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; @@ -160,7 +160,7 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_curve_fitting failed with error: %d", err); return err; } -#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED log_d("Deleting ADC_UNIT_%d line cali handle", adc_unit); err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { @@ -343,7 +343,7 @@ uint32_t __analogReadMilliVolts(uint8_t pin) { .bitwidth = __analogWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __analogWidth, @@ -412,7 +412,7 @@ static bool adcContinuousDetachBus(void *adc_unit_number) { if (err != ESP_OK) { return false; } -#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; @@ -585,7 +585,7 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi .bitwidth = __adcContinuousWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#elif //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __adcContinuousWidth, From 7de5b9ceb143563ccc70c81c03461d8e62fe9919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:29:35 +0100 Subject: [PATCH 8/9] fix(adc): Calibration fix for unsupported socs --- cores/esp32/esp32-hal-adc.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index da13570036d..0bd7e3b2929 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -108,11 +108,14 @@ static bool adcDetachBus(void *pin) { if (err != ESP_OK) { return false; } -#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; } +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif } adc_handle[adc_unit].adc_cali_handle = NULL; @@ -160,7 +163,7 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_curve_fitting failed with error: %d", err); return err; } -#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED log_d("Deleting ADC_UNIT_%d line cali handle", adc_unit); err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { @@ -178,6 +181,9 @@ esp_err_t __analogChannelConfig(adc_bitwidth_t width, adc_attenuation_t atten, i log_e("adc_cali_create_scheme_line_fitting failed with error: %d", err); return err; } +#else + log_e("ADC Calibration scheme is not supported!"); + return ESP_ERR_NOT_SUPPORTED; #endif } } @@ -343,13 +349,16 @@ uint32_t __analogReadMilliVolts(uint8_t pin) { .bitwidth = __analogWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __analogWidth, .atten = __analogAttenuation, }; err = adc_cali_create_scheme_line_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); +#else + log_e("ADC Calibration scheme is not supported!"); + return value; #endif if (err != ESP_OK) { log_e("adc_cali_create_scheme_x failed!"); @@ -412,11 +421,14 @@ static bool adcContinuousDetachBus(void *adc_unit_number) { if (err != ESP_OK) { return false; } -#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED err = adc_cali_delete_scheme_line_fitting(adc_handle[adc_unit].adc_cali_handle); if (err != ESP_OK) { return false; } +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif } adc_handle[adc_unit].adc_cali_handle = NULL; @@ -585,13 +597,16 @@ bool analogContinuous(const uint8_t pins[], size_t pins_count, uint32_t conversi .bitwidth = __adcContinuousWidth, }; err = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); -#else //ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED +#elif ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED adc_cali_line_fitting_config_t cali_config = { .unit_id = adc_unit, .bitwidth = __adcContinuousWidth, .atten = __adcContinuousAtten, }; err = adc_cali_create_scheme_line_fitting(&cali_config, &adc_handle[adc_unit].adc_cali_handle); +#else + log_e("ADC Calibration scheme is not supported!"); + return false; #endif if (err != ESP_OK) { log_e("adc_cali_create_scheme_x failed!"); From a1bc749484cff046242c50b12bf1b714c9c09cd2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:11:01 +0000 Subject: [PATCH 9/9] ci(pre-commit): Apply automatic fixes --- cores/esp32/esp32-hal-adc.c | 38 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/cores/esp32/esp32-hal-adc.c b/cores/esp32/esp32-hal-adc.c index 0bd7e3b2929..342ce9aefb0 100644 --- a/cores/esp32/esp32-hal-adc.c +++ b/cores/esp32/esp32-hal-adc.c @@ -24,33 +24,29 @@ #if CONFIG_IDF_TARGET_ESP32P4 && CONFIG_ESP32P4_REV_MIN_FULL >= 300 // NOTE: These weak definitions allow successful linkage if the real efuse calibration functions are missing. // This is a workaround for the ESP32P4 rev 3.0+, which is missing efuse calibration functions in the IDF. -__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_ver(void) -{ - return 0; +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_ver(void) { + return 0; } -__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_init_code(uint32_t atten, uint32_t *code) -{ - if (code) { - *code = 0; - } - return 0; // 0 means success in ESP-IDF conventions +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_init_code(uint32_t atten, uint32_t *code) { + if (code) { + *code = 0; + } + return 0; // 0 means success in ESP-IDF conventions } -__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_chan_compens(uint32_t atten, uint32_t *comp) -{ - if (comp) { - *comp = 0; - } - return 0; +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_chan_compens(uint32_t atten, uint32_t *comp) { + if (comp) { + *comp = 0; + } + return 0; } -__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_cal_voltage(uint32_t atten, uint32_t *voltage) -{ - if (voltage) { - *voltage = 0; - } - return 0; +__attribute__((weak)) uint32_t esp_efuse_rtc_calib_get_cal_voltage(uint32_t atten, uint32_t *voltage) { + if (voltage) { + *voltage = 0; + } + return 0; } #endif