Commit Graph

515 Commits

Author SHA1 Message Date
Guillaume Souchere
177024eeeb fix(heap): Do not consider newly registered heap in minimum free size calcualtion
After startup is done and app_main is reached, all calls to
heap_caps_add_region_with_caps (adding a new heap to the list of registered
heaps) will not affect the minimum free heap size value.

For heaps created before startup, this won't apply and their size will
end up being taken into account in the calculation of the minimum.
2026-05-28 10:30:25 +02:00
Mahavir Jain
23aba459f5 feat(esp_psram): add option to carve unencrypted PSRAM region
Adds CONFIG_SPIRAM_ENC_EXEMPT, available on chips that support per-page
PSRAM encryption configuration (esp32c5, esp32c61, esp32p4). When
enabled, esp_psram carves CONFIG_SPIRAM_ENC_EXEMPT_SIZE off the top of
PSRAM and maps it via the new mmu_hal_map_region_no_enc() helper, which
writes MMU entries without the SENSITIVE bit. The region is registered
as a separate heap pool reachable only through the new
MALLOC_CAP_SPIRAM_NO_ENC capability bit, so default SPIRAM allocations
cannot accidentally land there.

PSRAM encryption imposes alignment constraints that some DMA engines
(e.g. 2D-DMA) cannot satisfy. This option lets such workloads place
their buffers in unencrypted PSRAM while keeping the rest of PSRAM
(and flash) encrypted. Default disabled; security implications are
documented in the Kconfig help text.
2026-05-14 19:21:18 +05:30
Marius Vikhammer
261bd160aa feat(ulp): support placing ULP app in HP-RAM 2026-04-29 09:47:33 +08:00
Guillaume Souchere
a56354e9ab feat(heap): move TLSF ROM patches and related files from esp_rom to heap
The TLSF ROM patch code (rom_patch_tlsf.c, rom_patch_multi_heap.c),
their headers, and the per-target *.rom.heap.ld linker scripts are
semantically owned by the heap component, not esp_rom. Move them
accordingly:

- components/esp_rom/patches/esp_rom_tlsf.c
  → components/heap/rom_patches/rom_patch_tlsf.c
- components/esp_rom/patches/esp_rom_multi_heap.c
  → components/heap/rom_patches/rom_patch_multi_heap.c
- components/esp_rom/include/esp_rom_tlsf.h
  → components/heap/rom_patches/include/rom_patch_tlsf.h
- components/esp_rom/include/esp_rom_multi_heap.h
  → components/heap/rom_patches/include/rom_patch_multi_heap.h
- components/esp_rom/<target>/ld/<target>.rom.heap.ld (×8)
  → components/heap/port/<target>/ld/<target>.rom.heap.ld

Update heap/CMakeLists.txt to:
- use target_linker_script() directly for *.rom.heap.ld
- guard post-registration ROM patch setup with NOT BOOTLOADER_BUILD
- drop stale CONFIG_HEAP_TLSF_CHECK_PATCH symbol reference
- drop esp_rom_include_multi_heap_patch from TLSF_CHECK_PATCH guard

Remove the corresponding entries from esp_rom/CMakeLists.txt.
2026-04-23 12:21:31 +02:00
Guillaume Souchere
da81ec6f47 fix(esp_rom): Set poison check hook for tlsf_walk_pool patch 2026-04-23 07:51:04 +02:00
Marius Vikhammer
10637dbf5e feat(ulp): add support for ulp on esp32s31 2026-04-20 14:45:23 +08:00
Song Ruo Jing
50051b74a5 feat(clk): support for esp32s31 clock tree 2026-04-02 20:39:59 +08:00
Fu Hanxi
ddc7e0cdf7 ci: move qemu test cli args alongside test scripts
remove redundant host_test marker
2026-03-26 10:56:15 +01:00
armando
c60ed4b338 fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-17 01:29:34 +00:00
armando
c96f69faef change(mem): deprecated tcm and added scp memory utils 2026-03-11 11:18:15 +08:00
Marius Vikhammer
406d592929 feat(heap): complete ESP32-S31 heap bringup
Remove stale TODO reference from memory_layout.c.
2026-01-28 14:48:02 +08: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
Sudeep Mohanty
160e1c5bf7 fix(heap): Fixed const qualifier warning in heap_task_info.c
Fixed compilation error when building with -Wwrite-strings or
-Wdiscarded-qualifiers by adding const qualifier to char pointers with
string literals.

Closes https://github.com/espressif/esp-idf/issues/18120
2026-01-21 08:44:50 +01:00
Michael (XIAO Xufeng)
c299c0b749 Merge branch 'refactor/remove_idf_test_component' into 'master'
refactor: Remove idf_test component

Closes IDF-12578

See merge request espressif/esp-idf!43733
2026-01-06 16:20:20 +08:00
Guillaume Souchere
55e9868979 ci(heap): Add depends_components attribute to build-test-rules 2026-01-05 07:44:50 +01:00
Xiao Xufeng
438e07b30e refactor: Remove idf_test component
Split the idf_performance.h and target ver, which hold the performance
thresholds, into the headers of each testing.

In the past pytest also parse the common header to get the thresholds.
Now the logic is also removed. Performance thresholds are supposed to be
in the pytest scripts.
2026-01-01 02:26:42 +08:00
Wu Zheng Hui
0f549fa113 Merge branch 'fix/fix_secure_boot_fast_wake_feature' into 'master'
fix(esp_system): fix ROM secure boot fast wake feature

Closes PM-625

See merge request espressif/esp-idf!44052
2025-12-16 10:24:16 +08:00
wuzhenghui
4125fd68ac fix(esp_system): fix rom secure boot fast wake feature for c5/c6/h2/h21 2025-12-12 16:04:20 +08:00
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Alexey Lapshin
31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
C.S.M
0c4cf75c35 feat(esp32s31): Introduce esp32s31 hello world 2025-12-02 10:44:16 +08:00
C.S.M
a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
armando
a28d9869c1 feat(cache): use icache memroy as diram when single core 2025-11-14 10:35:39 +08:00
Omar Chebib
8e12c7f3ab Merge branch 'fix/task_tracing_crashing' into 'master'
fix(heap): fix a bug where the biggest heap would be NULL on boot

Closes IDFGH-16182 and IDFGH-16183

See merge request espressif/esp-idf!41024
2025-11-12 09:33:32 +08:00
Laukik Hase
d2f8a8f86a Merge branch 'feat/esp_tee_c61' into 'master'
feat(esp_tee): Support for ESP32-C61

Closes IDF-14253

See merge request espressif/esp-idf!42054
2025-11-11 11:42:37 +05:30
Guillaume Souchere
7a58d6d8fb fix(heap): Update RTC test to account for esp32h21 characteristics
"RTC memory should be lowest priority and its free size should be big enough"
was failing because the expected size of RTC heap left after init was bigger
than the total RTC size itself.

The test was updated to:
- check that the minimum free RTC heap size matches the current size
- the current RTC heap size is bigger than 80% of the total RTC memory region
2025-11-10 14:43:16 +01:00
Omar Chebib
3d5023b3a7 fix(heap): fix a bug where the biggest heap would be NULL on boot
Closes https://github.com/espressif/esp-idf/issues/17232
2025-11-10 10:27:48 +08:00
Laukik Hase
b9a503e9ec feat(esp_tee): Support for ESP32-C61 - the rest of the components 2025-11-07 14:54:16 +05:30
Roland Dobai
a0b589c147 Merge branch 'feat/cmakev2' into 'master'
feat(cmakev2): introduce cmake-based build system v2

See merge request espressif/esp-idf!42691
2025-11-04 02:53:36 +01:00
Frantisek Hrbata
1b40b10dc1 fix(heap/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 a 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
wuzhenghui
e9da2e3606 fix(esp_hw_support): add p4 rev3.0 MSPI workaround for deepsleep 2025-10-30 14:50:27 +08:00
wuzhenghui
bedcf4ad88 change(esp_hw_support): allocate memory with MALLOC_CAP_RETENTION for regdma link 2025-10-14 16:33:29 +08:00
Guillaume Souchere
0f3f44be62 feat(heap): Add hidden Kconfig option to allow exec cap 2025-09-29 10:45:33 +08:00
Guillaume Souchere
da9d8a143a feat(heap): Report prohibited usage of MALLOC_CAPS_EXEC at compile time
Add a condition on the definition of the MALLOC_CAP_EXEC macro to
prevent it from being defined if ESP_SYSTEM_MEMPROT_FEATURE or
ESP_SYSTEM_PMP_IDRAM_SPLIT is enabled, thus throwing a compile time
error when using it.

Closes https://github.com/espressif/esp-idf/issues/14837
2025-09-29 10:45:32 +08:00
Guillaume Souchere
1798034d3f feat(tools): Remove old copy of Catch2 in tools 2025-09-23 08:49:58 +02:00
Guillaume Souchere
f8cb539e29 feat(heap): Update test to CMake and use Catch2 component 2025-09-18 10:07:08 +02:00
Alexey Lapshin
9281e78381 change(esp_libc): rename newlib component to esp_libc 2025-09-09 22:00:44 +08:00
armando
179d00a6f8 feat(p4): p4 rev3 real chip support 2025-08-28 17:56:16 +08:00
Konstantin Kondrashov
1ca82baec3 fix(heap): Fixes Coverity false positive in va_list initialization 2025-08-26 22:13:50 +08:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02: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
Laukik Hase
340de9823a feat(esp_tee): Support for ESP32-C5 - the rest of the components 2025-08-13 14:08:59 +05:30
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
harshal.patil
60ff4bca9b refactor(esp_system): Update all references of the memory protection configs 2025-08-04 11:43:01 +05:30
Marius Vikhammer
9788d33351 ci(system): update system pytest apps to use SOC_CAPs 2025-07-31 19:05:58 +08:00
Ashish Sharma
6b02906822 fix(security): improve memory allocation handling in multiple components 2025-07-28 10:05:50 +08:00
Sudeep Mohanty
c8f68c72a7 Merge branch 'feat/remove_global_cmake_vars' into 'master'
change(esptool_py): Make esptool_py component idempotent in the build

Closes IDF-13073

See merge request espressif/esp-idf!39589
2025-07-17 17:13:49 +02:00
Sudeep Mohanty
c29f473a78 refactor(esptool_py): Remove elf variable dependencies
This commit updates all test_apps that have dependency on the elf
variable. Such test_apps now fetch the executable target from the build
properties.
2025-07-10 11:26:28 +02:00
armando
bcf04e356b resolve comments, to squash 2025-07-10 06:24:32 +00:00