Commit Graph

410 Commits

Author SHA1 Message Date
Mahavir Jain
2d95d621b7 Merge branch 'fix/fault-assert-volatile-survive' into 'master'
Make ESP_FAULT_ASSERT survive optimization

Closes IDF-15794

See merge request espressif/esp-idf!49644
2026-06-18 16:27:53 +05:30
harshal.patil
6b417e9d47 fix(esp_common/esp_fault): make ESP_FAULT_ASSERT survive optimization
ESP_FAULT_ASSERT(C) was silently deleted by the optimizer when C is a cached
flag/status already proven by a preceding `if (!C) return/goto`: the compiler
folds C to a constant and drops all three checks, removing the fault-injection
protection with no warning.
2026-06-17 16:45:29 +05:30
Alexey Lapshin
406bd2393e fix(ci): suppress GNU static analyzer warnings 2026-06-15 18:53:21 +07:00
Guillaume Souchere
d670774f5c feat(esp_common): implement composable error code registration via link-time arrays
Refactor the esp_err_to_name() system to decouple esp_common from
higher-level components. Instead of a monolithic generated table,
each component registers its error codes into a dedicated linker
section (.esp_err_msg_table) via idf_define_esp_err_codes() in its
CMakeLists.txt.

New files:
- tools/err_codes_extract.py: extract ESP_ERR_* defines from headers to CSV
- tools/err_codes_to_c.py: generate C source placing entries into linker section
- tools/err_codes_to_rst.py: generate RST documentation from error codes
- tools/cmake/err_codes.cmake: CMake module providing idf_define_esp_err_codes()
- components/esp_common/include/esp_err_codes.h: esp_err_msg_t typedef
- components/esp_common/src/esp_err_to_name_new.c: new lookup using link-time array
- tools/test_apps/build_system/err_codes_check/: CI test app

Changes:
- Remove all optional component dependencies from esp_common/CMakeLists.txt
- Add .esp_err_msg_table section to all 5 linker scripts
- Register error codes in 18 components via idf_define_esp_err_codes()
- Add new scripts to .gitlab/ci/rules.yml build_check patterns
- use new scripts to generate doc and add CI validation
- Update esp_err.rst to add description of composable code registration
2026-05-28 09:53:32 +02:00
Aditya Patwardhan
cec6f5bff4 fix(esp_http_client): require https->https for cross-scheme redirects
esp_http_client_set_redirection() now rejects any redirect target whose
scheme is not https:// when the origin is HTTPS. This catches http, ftp,
ws and any other scheme before client state is mutated. Same-host /
https-to-https redirects are unaffected. Apps that intentionally want
mixed-scheme redirects can set disable_auto_redirect=true and handle
HTTP_EVENT_REDIRECT.
2026-05-25 21:58:14 +05:30
Ivan Grokhotkov
6589ba9bbb change(version): Update version to v6.2-dev
Start of v6.2 development.
2026-05-25 14:16:08 +02:00
Guillaume Souchere
e7cf8cd3cb fix(mbedtls): fix undefined esp_mbedtls_mem_calloc/free at link time
platform.c (compiled into the 'builtin' archive) calls
esp_mbedtls_mem_calloc and esp_mbedtls_mem_free directly by name via
the MBEDTLS_PLATFORM_STD_CALLOC/FREE macros in esp_config.h.
Previously, esp_mem.c was compiled into the 'tfpsacrypto' archive, which
appears after 'builtin' in the link command, causing the linker to fail
with undefined reference errors when 'builtin' was processed first.

Moving esp_mem.c into 'builtin' to assure that the function used by
esp_mbedtls_mem_calloc and esp_mbedtls_mem_free are available when
pltform.c is linked.
2026-04-09 10:51:21 +02:00
armando
c60ed4b338 fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-17 01:29:34 +00:00
Guillaume Souchere
ca8eb6b6f2 Merge branch 'fix/esp-attr-section-impl' into 'master'
fix(esp_common): remove alignment value for section definition

See merge request espressif/esp-idf!46582
2026-03-13 12:24:19 +01:00
Guillaume Souchere
51d2cc2245 fix(esp_common): Remove alignement in ojects placced in specific sections
Let the compiler use variabel natural alignment
2026-03-12 13:53:43 +01:00
armando
c96f69faef change(mem): deprecated tcm and added scp memory utils 2026-03-11 11:18:15 +08:00
Guillaume Souchere
bf2d8faebb test(esp_common): Add Linux host test for portable section macros
Add a test app that verifies PLACE_IN_SECTION, _SECTION_ATTR_SYMBOL_DECL_GENERIC,
_SECTION_START and _SECTION_END macros work correctly on Linux.

The test places 5 uint32_t values into a custom .test_data_table section from
two separate translation units, then iterates the section at runtime to verify
the correct count and content of all entries.

Includes:
- Custom linker script (ld/test_section.ld)
- Build-test-rules entry (linux only)
- pytest host_test marker
2026-03-09 07:18:27 +01:00
Guillaume Souchere
0549755e37 feat(esp_common): Add portable link-time section macros to esp_attr.h
Add PLACE_IN_SECTION, _SECTION_ATTR_IMPL_GENERIC, _SECTION_ATTR_SYMBOL_DECL_GENERIC,
_SECTION_START and _SECTION_END macros that emit real section attributes on every
platform (embedded ELF, Linux ELF, macOS Mach-O).

Unlike _SECTION_ATTR_IMPL which is a no-op on Linux, these macros work uniformly
across all targets, enabling link-time arrays for error-code tables, init-function
arrays, and similar patterns.

Also moves _COUNTER_STRINGIFY definition before its first use.
2026-03-02 08:17:50 +01:00
Konstantin Kondrashov
c4e8c1df9f Merge branch 'feature/postpone_locked_efuses' into 'master'
feat(efuse): Defer WR_DIS eFuse burning

Closes IDF-14045

See merge request espressif/esp-idf!44652
2026-02-13 16:21:09 +02:00
Konstantin Kondrashov
be517fa8c0 feat(efuse): Defer WR_DIS eFuse burning 2026-02-11 11:07:12 +02:00
Mahavir Jain
21f8ca5e6f feat(app_update): add API for checking the spi mode compatibility
New API to check the SPI flash mode from the incoming firmware image
during OTA updates could prevent bootloader/app incompatibility of
DIO vs QIO flash modes.

More information:
 - https://github.com/espressif/esp-hosted-mcu/issues/143#issuecomment-3741753788
 - https://github.com/espressif/esp-idf/issues/9674#issuecomment-1232533757
 - https://github.com/espressif/esp-idf/issues/9542#issuecomment-1211317354
2026-02-10 12:53:50 +05:30
Mahavir Jain
c07eb0d5ac Merge branch 'fix/added_check_for_ota_partition_conflicts' into 'master'
fix(app_update): Add conflict detection for concurrent OTA operations on same partition

Closes IDFGH-17102

See merge request espressif/esp-idf!45450
2026-02-05 18:42:46 +05:30
Aditya Patwardhan
ce0597161e Merge branch 'refactor/remove_esp_wolfssl_from_esp_tls' into 'master'
feat(esp-tls): Added support to register custom tls stack

Closes IDF-11266

See merge request espressif/esp-idf!44342
2026-02-05 16:04:34 +05:30
Aditya Patwardhan
f96119db75 feat(esp-tls): Added support to register custom tls stack
* Removed the esp_tls_wolfssl layer from esp-tls
    * Migrated Error codes
2026-02-04 13:53:25 +05:30
nilesh.kale
5f80b77b55 fix: Add conflict detection for concurrent OTA operations on same partition
This change adds conflict detection to prevent multiple OTA operations from
being initiated on the same partition simultaneously.

Closes https://github.com/espressif/esp-idf/issues/18127
2026-02-04 12:04:50 +05:30
Erhan Kurubas
5ba3e9df98 feat(coredump): add coredump_extram attribute
Closes https://github.com/espressif/esp-idf/issues/15429
2026-02-02 10:25:03 +01:00
Marius Vikhammer
5f914189c2 ci(core): removed common_components from core test-apps dependencies 2026-01-26 11:47:23 +08:00
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Erhan Kurubas
14c16bee61 feat(coredump): add coredump_noinit attribute 2026-01-11 18:57:37 +03:00
Marius Vikhammer
17027a6037 ci(esp_common): set depends_components for esp_common tests 2025-12-25 16:01:06 +08:00
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Konstantin Kondrashov
9a95549bee Merge branch 'contrib/github_pr_15525' into 'master'
feat(esp_common): Adds ESP_RETURN_ON_ERROR_CLEANUP macro (GitHub PR)

Closes IDFGH-14787

See merge request espressif/esp-idf!44049
2025-12-11 00:15:28 +08:00
Robot
fdb78272a4 feat(esp_common): Adds ESP_RETURN_ON_ERROR_CLEANUP macro
Merges: https://github.com/espressif/esp-idf/pull/15525
2025-12-09 15:34:41 +02:00
wanckl
4fe7e6ac18 ci(p4): p4 eco5 enable parts of special tests 2025-12-08 13:59:25 +08:00
igor.udot
8c233aa9bd ci: temp_skip_ci for p4 2025-12-04 18:08:33 +08:00
armando
b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
Frantisek Hrbata
3777b19bcc fix(esp_common/cmake): avoid using BUILD_COMPONENTS build property for IDF_BUILD_V2
IDF_BUILD_V2 does not have BUILD_COMPONENTS build property. Therefore,
when IDF_BUILD_V2 is defined, use idf_component_optional_requires and
generator expressions instead. I believe that the one-liner should also
work with IDF_BUILD_V1, but the change is kept separate to clearly show
the difference between IDF_BUILD_V1 and IDF_BUILD_V2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Roland Dobai
f21b4c2381 change(version): Update version to 6.1-dev
Start of v6.1 development
2025-10-24 09:01:34 +02:00
David Cermak
0b319e1670 fix(esp_err): Regenerated esp_err_to_name after lwip header removed 2025-10-20 17:51:39 +08:00
armando
0f6adbebed change(memory): removed rtc related memory attrs on no-rtc-support chips 2025-10-15 01:19:02 +00:00
Mahavir Jain
ad059d385b fix(security): add anti-FI checks while setting up PSRAM encryption 2025-09-30 10:22:53 +05:30
C.S.M
b145ede835 refactor(mspi): Make mspi hal layer independent 2025-09-26 14:57:54 +08:00
Mahavir Jain
572119684c Merge branch 'fix/add_missing_event_tracter_capture_duirng_mbedtls_read' into 'master'
fix(esp-tls): added missing event tracker capture during mbedtls read operation

Closes IDFGH-15609

See merge request espressif/esp-idf!41266
2025-09-21 19:13:13 +05:30
nilesh.kale
421b9abd0d fix(esp-tls): added missing event tracker capture during mbedtls read operation
This commit fixed missing event tracker capture and
added new error code ESP_ERR_MBEDTLS_SSL_READ_FAILED.

Closes https://github.com/espressif/esp-idf/issues/16239
2025-09-17 13:04:16 +08:00
Konstantin Kondrashov
dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
nilesh.kale
73d8ad9083 feat(esp_http_client): handle error while reading data from server
This commit updated API esp_http_cleint_perform() to handle error and
dispatched error  event if any error occured whiling reading data from server.
2025-08-11 16:39:22 +08:00
harshal.patil
55e0730a8d change(esp_hw_support): Move security-related modules to the esp_security component
- Also adds support to whitelist target specific expected dependency violations
in check_dependencies.py
2025-08-04 11:43:01 +05:30
armando
9be8dccef5 feat(psram): psram support on h4 2025-07-28 10:16:48 +08:00
Alexey Lapshin
a3dfc82246 fix(build): add __attribute__((nonstring)) to nonsting variables 2025-06-25 18:01:50 +07:00
Frantisek Hrbata
63b7ae9ad1 fix(esp_common/cmake): do not rely on the target variable being set
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
wuzhenghui
077ce905ed fix(esp_hw_support): fix sleep iram safe code inlined to flash 2025-05-19 21:02:24 +08:00
Ivan Grokhotkov
f89d6ee5a0 change(version): Update version to v6.0-dev 2025-05-12 11:39:42 +02:00
Konstantin Kondrashov
204046e799 feat(log): Add binary logging support 2025-04-23 15:46:34 +08:00
Konstantin Kondrashov
33633a5024 fix(esp_common): Fix DRAM_DMA_ALIGNED_ATTR for P4 2025-04-22 18:02:16 +03:00