Commit Graph
1348 Commits
Author SHA1 Message Date
Sudeep Mohanty 9b01655989 fix(freertos): close vTaskDeleteWithCaps cross-core delete race on SMP preview kernel
Replace the eTaskGetState() polling guard in prvTaskDeleteWithCaps()
with a per-core xTaskGetCurrentTaskHandleForCore() check, so the
predicate matches vTaskDelete()'s immediate-vs-deferred decision. This
closes the taskTASK_SCHEDULED_TO_YIELD race against the IDLE-deferred
TCB cleanup on the SMP preview kernel; behaviour is unchanged on the
default IDF kernel and on single-core targets.
2026-05-15 15:29:32 +02:00
Jonas Jonsson 529d113d47 fix(freertos): Avoid core switch deadlock on start
With CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY=y the main task could
switch core between registering the idle hook and the while loop.

This would cause a deadlock were the current task was waiting for the
idle hook to run on the same core it's busy waiting.

Merge https://github.com/espressif/esp-idf/pull/16149
2026-05-14 14:43:39 +08:00
Konstantin Kondrashov 12f88ef87a fix(esp32): Fix IRAM_AS_8BIT_ACCESSIBLE_MEMORY accessible from ISR1 2026-05-01 18:17:51 +03:00
Marius Vikhammer 3113a33b93 Merge branch 'fix/freertos_mutex_not_given_by_owner_v6.0' into 'release/v6.0'
fix(freertos): hide obsolete mutex-owner config and harden assert test (v6.0)

See merge request espressif/esp-idf!47593
2026-04-29 13:58:24 +08:00
Sudeep Mohanty 8cd35ba1e0 test(freertos): harden mutex owner assert reset test 2026-04-23 16:40:01 +08:00
Sudeep Mohanty 3df797257d fix(freertos): hide mutex-owner check config 2026-04-23 16:40:01 +08:00
Marius Vikhammer 2baddb3295 docs: refresh broken documentation links 2026-04-13 09:47:46 +08:00
Konstantin Kondrashov b789f667e0 fix(freertos): fix riscv pxEndOfStack offset alignment
Closes https://github.com/espressif/esp-idf/issues/18256
2026-03-24 09:40:28 +02:00
Sudeep Mohanty eea52d65fb fix(freertos): Use bare ticks for cleanup delays in freertos tests 2026-03-23 13:19:59 +01:00
Sudeep Mohanty a8db5b8128 fix(freertos): Fix flaky PSRAM tests for freertos
This commit adds additional delays to the stress test where we create
and self-delete tasks on PSRAM. iSuch tasks rely on the kernel creating
a special cleanup task to delete them. Hence, the delays in the main
task allow the cleanup task to bescheduled and the deletion to go
through.
2026-03-23 13:16:33 +01:00
Alexey Lapshin 8bfe943dbb fix(esp_system): xtensa: refactor linker scripts and reduce binary size for C++ apps 2026-03-23 11:19:22 +08:00
Jiang Jiang Jian 7fb69168e4 Merge branch 'fix/malloc_cap_iram_8bit_access_in_loop_v6.0' into 'release/v6.0'
fix(esp32): Fix access to MALLOC_CAP_IRAM_8BIT byte array in loop (v6.0)

See merge request espressif/esp-idf!46418
2026-03-23 10:31:04 +08:00
Konstantin Kondrashov d834791967 fix(esp32): Fix access to MALLOC_CAP_IRAM_8BIT byte array in loop
The Xtensa load/store handler did not properly handle 8/16-bit
memory access to IRAM regions configured with MALLOC_CAP_IRAM_8BIT
(and CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY=y) from a loop
(LBEG/LEND/LCOUNT) context. This caused the loop to exit after
the first access, instead of continuing to iterate as intended.

Closes https://github.com/espressif/esp-idf/issues/14127
2026-03-20 16:43:58 +08:00
Frantisek Hrbata 33680597c7 fix(freertos): set app_main as undefined even for linux target
In cmakev1, the initial order of components linked to the executable is
determined by the `__build_expand_requirements` function and stored as a
list in the `BUILD_COMPONENT_ALIASES` build property. Later, the
components from `BUILD_COMPONENT_ALIASES` are linked to the executable
using `target_link_libraries`. The issue is that
`BUILD_COMPONENT_ALIASES` contains components in a "reversed" order
compared to how they would typically appear on the link command line. In
other words, components (archives) deeper in the dependency chain are
placed first. As a result, cmake has to repeat the archives in the link
command more times than is actually necessary. This has the beneficial
side effect of placing libfreertos.a before libmain.a, allowing the
`app_main` symbol to be resolved.

In cmakev2, there is no predefined order because it does not perform
early evaluation. Instead, the entire link command is created based on
actual component dependencies using `target_link_libraries`.
Consequently, freertos must set the `app_main` symbols as undefined.
This is already done for non-Linux targets, but it must also be done for
the Linux target.

Another issue arises with macOS, which mangles C symbols by prepending
an underscore. We cannot use the same method as in
`components/linux/assert_func.c` for `__assert_func`, so for macOS,
`_app_main` is used. In the future, if more undefined symbols need to be
added for the Linux target, we should consider introducing a helper.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-20 08:13:26 +01:00
Jiang Jiang Jian 204ad1c7ef Merge branch 'feat/support_rv_fp_retention_v6.0' into 'release/v6.0'
feat(esp_hw_support): support rv fp retention (v6.0)

See merge request espressif/esp-idf!46521
2026-03-20 10:17:11 +08:00
Marius Vikhammer a8089abbd6 Merge branch 'fix/freertos-message-buffer-privileged-function_v6.0' into 'release/v6.0'
fix(freertos): remove spurious PRIVILEGED_FUNCTION from macro body (v6.0)

See merge request espressif/esp-idf!46552
2026-03-20 09:21:57 +08:00
Evgeny Torbin 0070b687b5 ci: remove unused test cases 2026-03-12 12:34:23 +01:00
Marius Vikhammer 1cc6e4f70e fix(freertos): remove spurious PRIVILEGED_FUNCTION from macro body
The macro expanded with a trailing PRIVILEGED_FUNCTION; token, making it
unusable in expression contexts (e.g. inside assert() or as a function
argument), causing a compile error: "expected ')' before ';' token".

Closes https://github.com/espressif/esp-idf/issues/17948

Made-with: Cursor
2026-03-12 16:47:33 +08:00
wuzhenghui 659dbbe5f8 feat(esp_hw_support): support esp32p4 & esp32h4 RV FPU context retention in pd_cpu sleep 2026-03-12 11:06:43 +08:00
Mahavir Jain ee2da28726 Merge branch 'feat/esp_tee_backports_v6.0' into 'release/v6.0'
feat(esp_tee): Feature/fixes backports to `release/v6.0`

See merge request espressif/esp-idf!45095
2026-01-31 10:27:34 +05:30
Laukik Hase 421246323a feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2026-01-29 11:49:14 +05:30
armando 5105dd8016 fix(freertos): place criticalsection in internal ram on smp 2026-01-28 15:30:08 +08:00
Li Shuai 83bd91b9c4 change(esp_pm): fix ci failed test case of Automatic light occurs when tasks are suspended 2026-01-09 10:30:22 +08:00
Jiang Jiang Jian 96d61b6dcf Merge branch 'fix/freertos_tick_hook_test_v6.0' into 'release/v6.0'
fix(freertos): Added stability fixes to tick hook test (v6.0)

See merge request espressif/esp-idf!44522
2026-01-08 20:37:36 +08:00
Jiang Jiang Jian 7c5706c5c7 Merge branch 'fix/freertos_suspen_resume_test_memory_leak_v6.0' into 'release/v6.0'
test(freertos): Fix race condition in suspend-resume tests (v6.0)

See merge request espressif/esp-idf!44479
2026-01-08 20:36:53 +08:00
Sudeep Mohanty 1e8778cd83 fix(freertos): Added stability fixes to tick hook test 2025-12-24 08:14:51 +01:00
Sudeep Mohanty 20ededa464 test(freertos): Added stability fixes to the delete blocked tasks test 2025-12-23 09:44:40 +01:00
Sudeep Mohanty 43b9f7d0c5 test(freertos): Fix race condition in suspend-resume tests
This commit fixes a race condition in suspend-resume tests where in
a test task could escape deletion and result in a memory leak after test
completion.
2025-12-23 09:39:04 +01:00
Erhan Kurubas ccc99e9cd1 change(freertos): add task count and pointer width to OpenOCD debug table 2025-12-17 17:15:15 +01:00
Erhan Kurubas af185993b2 Revert "change(freertos): add task count and pointer width to OpenOCD debug table"
This reverts commit 799de719d7.
2025-12-05 00:51:31 +08:00
Sudeep Mohanty fea721126e ci(freertos): Re-enable freertos tests for esp32p4 2025-11-27 15:07:29 +05:30
armando 714b022a43 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-21 02:48:05 +00:00
Erhan Kurubas 36a8580637 change(freertos): add task count and pointer width to OpenOCD debug table 2025-11-18 12:22:51 +01:00
Marius Vikhammer e6a622a09e Merge branch 'test/freertos_flaky_tests_stabilization_v6.0' into 'release/v6.0'
test(freertos): Added miscellaneous stability fixes to unit tests (v6.0)

See merge request espressif/esp-idf!43122
2025-11-18 09:48:20 +08:00
Erhan Kurubas 7d4ae881c5 change(app_trace): move sysview to component registry 2025-11-13 10:50:42 +01:00
Erhan Kurubas dcde633acd feat(tracing): add new component for tracing 2025-11-05 09:57:18 +01:00
Sudeep Mohanty f67e76d641 test(freertos): Added miscellaneous stability fixes to unit tests
This commit adds fixes for freertos unit tests for a more deterministic
run and avoid occational failures.
2025-11-05 13:41:40 +05:30
Erhan Kurubas 68764bf80f refactor(app_trace): remove redundant init call from startup 2025-10-18 02:28:31 +08:00
Chen Chen a4710cc206 refactor(driver): remove redundant driver dependencies
now the driver component only contains legacy code for i2c, twai and
touch sensor
2025-09-30 15:47:45 +08:00
Sudeep Mohanty cf12478049 refactor(freertos): Deprecate xPortGetTickRateHz()
This commit deprecates xPortGetTickRateHz() from the FreeRTOS port API
as the FreeRTOS tickrate is constant for an application and can be
inferred using the CONFIG_FREERTOS_HZ config option.
2025-09-22 09:23:07 +02:00
Sudeep Mohanty 141e62806c feat(freertos-smp): Enabled FreeRTOS Runtime stats gathering for Amazon SMP Kernel 2025-09-22 09:23:07 +02:00
Sudeep Mohanty 9a4341bb87 refactor(freertos): Moved FreeRTOS Run Time Stats gathering to port.c
This commit creates a new port layer API xPortGetRunTimeCounterValue()
in port.c files. This helps to remove inclusion of header files such as
esp_timer.h and xtensa/hal.h from portmacro.h
2025-09-22 09:23:01 +02:00
Sudeep Mohanty 75619d8ef5 Merge branch 'task/remove_vportcleanuptcb_support' into 'master'
remove(freertos): Remove legacy vPortCleanUpTCB user hook

Closes IDF-8097

See merge request espressif/esp-idf!41867
2025-09-19 10:03:07 +02:00
Konstantin Kondrashov b7da740f12 Merge branch 'feature/log_v2_optimization' into 'master'
feat(log): Optimize idf components for binary logging

Closes IDF-12775

See merge request espressif/esp-idf!40289
2025-09-19 14:45:43 +08:00
Sudeep Mohanty bb0f072c7a refactor(freertos): Make task snapshot debug API public
This commit makes the task snapshot related API public under the header
freertos_debug.h.
2025-09-15 16:13:29 +02:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Sudeep Mohanty c76cc9a24d remove(freertos): Remove legacy vPortCleanUpTCB user hook
This commit removes support for the vPortCleanUpTCB() user hook as well
as drops support for associated Kconfig option,
CONFIG_FREERTOS_STATIC_TASK_CLEAN_UP.
2025-09-11 16:05:11 +02:00
Marius Vikhammer 926817e872 docs(freertos): fixed stack watermark documentation bytes vs words issue
Upstream freertos reports stack sizes in words, while IDF-kernel uses bytes.
2025-09-10 08:50:16 +08:00
Alexey Lapshin b25cb2906c fix(freertos): fix xesppie registers save/restore 2025-08-25 11:58:21 +07:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00