310 Commits

Author SHA1 Message Date
Guillaume Souchere 8706cd6135 feat(esp_system): add linux test for system init function regisration 2026-04-01 11:46:06 +02:00
Omar Chebib 08f33cf590 Merge branch 'feature/esp32s31_pie_coproc_old_commit' into 'master'
feat: add support for PIE coprocessor on the ESP32-S31

Closes IDF-14867 and IDF-14661

See merge request espressif/esp-idf!45851
2026-04-01 15:46:01 +08:00
Marius Vikhammer 5c572e5a60 docs: refresh broken documentation links 2026-04-01 10:17:33 +08:00
Omar Chebib 38abf98216 feat: add support for PIE coprocessor on the ESP32-S31 2026-03-31 13:27:16 +08:00
Konstantin Kondrashov 59901fd3bb Merge branch 'fix/freertos_riscv_px_end_of_stack_alignment' into 'master'
fix(freertos): fix riscv pxEndOfStack offset alignment

Closes IDFGH-17266

See merge request espressif/esp-idf!45969
2026-03-11 09:54:13 +02:00
Marius Vikhammer 5b4c0c91fa Merge branch 'fix/freertos-message-buffer-privileged-function' into 'master'
fix(freertos): remove spurious PRIVILEGED_FUNCTION from macro body

Closes IDFGH-16879

See merge request espressif/esp-idf!46265
2026-03-11 12:41:38 +08:00
Marius Vikhammer eb6f35f6a0 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-04 15:23:04 +08:00
Konstantin Kondrashov fa9b7843bc fix(freertos): fix riscv pxEndOfStack offset alignment
Closes https://github.com/espressif/esp-idf/issues/18256
2026-02-20 12:42:26 +02:00
wuzhenghui b7edaebed9 feat(esp_hw_support): support esp32p4 & esp32h4 RV FPU context retention in pd_cpu sleep 2026-02-05 15:39:40 +08:00
Alexey Lapshin f28a2765d8 fix(esp_system): xtensa: refactor linker scripts and reduce binary size for C++ apps 2026-01-30 23:27:32 +07:00
Michael Wilson 39409058d3 fix(freertos): Correct misleading error messages for vPortEnter/ExitCritical
The error messages for vPortEnterCritical and vPortExitCritical are
misleading when they're called on a multi-core target, as they seem to
imply that the call is NOT supported on a single-core target. In fact,
they are, these functions are, however, not supported on multi-core
targets, so the error message has been updated to reflect this.

Merges https://github.com/espressif/esp-idf/pull/18109
2026-01-13 10:33:45 +01:00
morris 291554cd09 refactor(global): remove completed todos in the codebase 2025-12-15 22:40:15 +08:00
Laukik Hase 7c24682643 feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2025-11-24 18:49:06 +05:30
Erhan Kurubas 79cda70029 change(app_trace): move sysview to component registry 2025-11-10 15:55:41 +08:00
Erhan Kurubas 1dac8685db feat(tracing): add new component for tracing 2025-10-30 12:15:35 +01: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 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
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
Sudeep Mohanty 11b80a7f11 Merge branch 'feat/freertos_in_flash_by_default' into 'master'
feat(freertos): Place FreeRTOS in flash by default

Closes IDF-12695

See merge request espressif/esp-idf!40579
2025-08-15 02:18:57 +02:00
Sudeep Mohanty 26c19928a9 feat(freertos): Place FreeRTOS in flash by default
The following updates have been made in this commit:
- The commit places FreeRTOS code in flash memory by default.
- CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_FREERTOS_IN_IRAM is unhidden and can be used to restore the
  previous memory placement.
- A test has been added for users to conduct performance impact testing
  based on memory placement configurations.
2025-08-07 19:56:30 +08:00
Omar Chebib 03f4744497 feat(riscv): add support for the DSP coprocessor 2025-08-07 14:40:30 +08:00
Nebojsa Cvetkovic d0ceef20f4 refactor(xtensa): Rename specreg.h register macros
This commit renames all registers in xtensa/specreg.h to by adding the
prefix XT_REG_. This is done to avoid naming collisions with similar
variable names. A new register file, viz., xt_specreg.h is created. The
previous names are still available to use but have been deprecated.

Closes https://github.com/espressif/esp-idf/issues/12723
Merges https://github.com/espressif/esp-idf/pull/16040
2025-06-17 15:37:33 +02:00
John Boiles 6287650225 fix(freertos): Use ESP_EARLY_LOGE in vPortTLSPointersDelCb for RISCV
Using ESP_LOG* in this function causes a crash
2025-06-06 10:11:32 +08:00
Marius Vikhammer e527554144 feat(core): bringup dual-core for H4 2025-05-26 17:11:12 +02:00
Sudeep Mohanty 3af5603938 fix(freertos): Fixed tickless idle tick count accounting
This commit fixes an issue where the FreeRTOS kernel does not account
for the pended ticks occuring during automatic light-sleep mode and
hence causing a jump in the tick count at a later stage in the
application lifetime.

Closes: https://github.com/espressif/esp-idf/issues/15642
2025-04-15 09:38:26 +02:00
Omar Chebib 0bc169e735 fix(freertos): optimize HWLP context switch by disabling it when unused 2025-03-13 11:11:24 +08:00
Omar Chebib c26879d29e fix(freertos): workaround a hardware bug related to HWLP coprocessor
This commit manually sets the HWLP context to dirty when a Task that needs it is scheduled it.
2025-03-13 11:11:24 +08:00
Sudeep Mohanty ee18a4d9ab fix(freertos): Backported a change to suppress Coverity warnings
This commit backports the commit# f94bc89108ffca538cf91d5856149960a5d4be81
from the upstream FreeRTOS kernel repository to supress a Coverity
warning. The change was done to avoid using string modification
functions which cause a security violation.
2025-02-07 08:52:51 +01:00
Sudeep Mohanty 65dba9f930 fix(freertos): Limit idle task name length for copy operation
This commit:
- Updates the FreeRTOS kernel prvCreateIdleTasks() function to
limit the length of the IDLE task name before copying it to avoid memory
out-of-bounds warnings.
- Fixes a bug where in the IDLE task name string could be a non
  null-terminated string in SMP configuration.
2025-01-03 18:06:47 +08:00
Sudeep Mohanty 1fe57a5d8e fix(freertos): Fixed SMP race condition in xStreamBufferSend()
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferSend() makes the xTaskWaitingToSend NULL but it may
have already been evaluated to not be NULL by xStreamBufferReceive()
running on another core and eventually leading to a crash in tasks.c.
2024-10-16 19:39:42 +08:00
Sudeep Mohanty 03d76006b8 fix(freertos): Fixed SMP race condition in stream_buffers.c
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferReceive() makes the xTaskWaitingToReceive NULL but it may
have already been evaluated to not be NULL by xStreamBufferSend()
running on another core and eventually leading to a crash in tasks.c.
2024-10-11 14:31:06 +02:00
Sudeep Mohanty a97a7b0962 Merge branch 'fix/priority_inv_when_remove_from_unordered_event_list' into 'master'
fix(freertos): Fixed priority inversion when setting event group bits

Closes IDF-8160

See merge request espressif/esp-idf!33953
2024-10-11 17:49:08 +08:00
Sudeep Mohanty 0e5adc1b9c feat(freertos): Add FreeRTOS port layer mocks for CMock tests
This commit adds mocks for the FreeRTOS linux port layer for tests which
mock the FreeRTOS component and use port layer APIs.
2024-10-08 12:08:24 +02:00
Sudeep Mohanty bd4de3c8a3 fix(freertos): Fixed priority inversion when setting event group bits
This commit fixes a priority inversion when a lower priority task set
event group bits to unblock a higher priority task but the lower
priority task continued to run.
2024-10-08 09:36:45 +02:00
Marius Vikhammer 4bf8d49159 fix(system): fixed potential double exception when booting on xtensa
Due to old windows from the startup flow being present after
switching to running freertos tasks  windowoverflow exceptions
could potentially try to save windows to the startup stack.

During this overflow they also values previously saved on the
startup stack to find earlier frames' stacks.
Since the start up stack was already recycled these values were
invalid and would cause a crash.

Closes https://github.com/espressif/esp-idf/issues/14406Y
2024-09-27 09:34:00 +08:00
Alexey Gerenkov 9ca231e76e change(build): Use integrated assembler with Clang for RISCV chips 2024-09-18 21:40:39 +03:00
Xiaoyu Liu 3d403a4ba8 refactor(intr): unify riscv freertos set/clear intr mask from isr apis
refactor(intr): find a potential bug that clic intr mask need extra nop ops
2024-09-11 18:26:07 +08:00
Marius Vikhammer bdb36f133a Merge branch 'docs/freertos_stack_size' into 'master'
docs(freertos): update freertos comments to reflect that stack size is in bytes

Closes IDFGH-10342

See merge request espressif/esp-idf!32946
2024-08-26 16:19:01 +08:00
Marius Vikhammer 0d140f38ea fix(system): fixed warnings related to ununsed var if asserts disabled 2024-08-26 10:25:04 +08:00
Marius Vikhammer 9bff8ad50e docs(freertos): update freertos comments to reflect that stack size is in bytes
Closes https://github.com/espressif/esp-idf/issues/11600
2024-08-20 09:26:09 +08:00
Marius Vikhammer 6cbee5c7f6 Merge branch 'contrib/github_pr_13578' into 'master'
Make FreeRTOS configUSE_TIMERS optional in KConfig (GitHub PR)

Closes IDFGH-12576

See merge request espressif/esp-idf!32576
2024-08-13 10:06:51 +08:00
Sudeep Mohanty 0db5d725ef fix(freertos): Fixed critical section macro in vTaskPlaceOnEventListRestricted()
The vTaskPlaceOnEventListRestricted() did not use the correct macro when
exiting a kernel cirtical section. This does not affect the HW targets
but on the Linux port, this caused an issue as the critical nesting
count became negative, leading to deadlocks. This commit fixes the bug
and updates the linux port to prevent the nesting count from going
negative.
2024-08-09 08:45:23 +02:00
Marius Vikhammer 0bcee8518b fix(freertos): split idf_additions.c event groups to separate file 2024-08-09 11:19:40 +08:00
Frantisek Hrbata 0fdb309d1e change: exclude CVEs that do not impact ESP-IDF components
cJSON:    CVE-2024-31755 - Resolved in cJSON v1.7.18
FreeRTOS: CVE-2024-28115 - Affects only ARMv7-M MPU ports, and ARMv8-M ports

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-01 12:24:47 +02:00
Konstantin Kondrashov 0bdf675992 fix(linux): Fix warnings for Linux target when COMPILER_STATIC_ANALYZER=y 2024-07-31 11:23:54 +03:00
Sudeep Mohanty c3da2ace27 fix(freertos): Fixed memory leak issue in vTaskDeleteWithCaps()
vTaskDeleteWithCaps() leaked memory when a task uses the API to delete
itself. This commit adds a fix to avoid the memory leak.

Closes https://github.com/espressif/esp-idf/issues/14222
2024-07-26 16:58:18 +02:00
Sudeep Mohanty 1012172436 fix(freertos): Incorrect assert in FreeRTOS port layer when not in ISR context
This commit fixes an issue where in the FreeRTOS port layer would cause
the portASSERT_IF_IN_ISR() assert check to fail even when the system is
not in an interrupt context.
2024-07-25 12:06:19 +02:00