447 Commits

Author SHA1 Message Date
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Chen Ji Chang
9342b3fba1 Merge branch 'feat/h4_introduce_step1_add_target' into 'master'
feat(esp32h4): introduce target esp32h4(stage 1)

See merge request espressif/esp-idf!36780
2025-02-11 18:11:08 +08:00
Chen Jichang
6f83f39dce feat(esp32h4): introduce target esp32h4(stage 1) 2025-02-08 17:07:44 +08:00
gaoxu
5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
Song Ruo Jing
20eb6ca5e9 feat(heap): add a MALLOC_CAP_SIMD flag
MALLOC_CAP_SIMD can be used to allocate memory to be used for SIMD instructions
2025-01-16 14:39:12 +08:00
Omar Chebib
d6cd339e46 fix: take into account MR comments 2025-01-09 11:57:02 +08:00
Omar Chebib
1e0cdcbd13 feat(heap): enable heap tracing for the RISC-V targets
When the frame pointer is enabled, it is possible for RISC-V targets to now
possible to enable and generate heap call traces.
2025-01-09 11:57:02 +08:00
gaoxu
25731d0c1e feat(esp32h21): finnal introduce hello world support 2024-12-30 20:14:40 +08:00
Marius Vikhammer
34c7d62855 refactor(hw_support): combine esp_hw_support rtc header to a single file 2024-12-30 10:09:34 +08:00
Guillaume Souchere
a995a5339b fix(heap): MALLOC_CAP_EXEC does not allocate in RTC IRAM
This commit fixes the issue when trying to allocate memory
with the MALLOC_CAP_EXEC in RTC memory. Prior to the fix,
the heap allocator was returning an address in RTC DRAM.

To fix this issue:
- modified memory_layout.c of the concerned targets to fill the iram_address
field in the rtc entry of the soc_memory_region array properly.
- modified heap component  related functions to return IRAM address when
an allocation in RTC memory with MALLOC_CAP_EXEC is requested.

Closes https://github.com/espressif/esp-idf/issues/14835
2024-12-09 09:34:56 +01:00
Laukik Hase
733741bbac
feat(esp_tee): Support for ESP-TEE - esp_system component 2024-12-02 12:20:04 +05:30
Guillaume Souchere
793382107f fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c
In esp32c2 and esp32c61 memory_layout.c files, the config used to allow
MALLOC_CAP_EXEC was CONFIG_ESP_SYSTEM_MEMPROT_FEATURE when
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT should be used.

Closes https://github.com/espressif/esp-idf/issues/14836
2024-11-25 11:46:02 +01:00
Guillaume Souchere
2a9a41886c feat(heap): Sort list of registered heap by increasing size
For a given group of heaps sharing the same capabilities, it is
best to use smaller heaps first when performing "small" allocations
to keep the bigger heaps untouched. This prevents the scenario where
a series of small allocations would crowd the bigger heaps making
any bigger allocation fail for lack of space.

Closes https://github.com/espressif/esp-idf/issues/13588
2024-11-21 11:02:19 +01:00
Guillaume Souchere
8e06c4ca6a docs(heap_debug): Add missing information
- Place the section on alloc failed hook at a better place
- Add reference to the different poisoning configs at the beginning
  of the heap corruption detectino section
- Update the information concerning heap tracing
- Update the heap tracing log examples
- Fix heap tracing standalone code:
  - Update the logging format in heap_trace_dump_base
  - Add freed field in trace stucture to keep this info even
    when no call stack is available
2024-11-19 10:25:40 +01:00
gaoxu
64bbb53b8f feat(esp32h21): introduce target esp32h21(stage 1) 2024-11-12 15:42:27 +08:00
Guillaume Souchere
00c727427c feat(heap): Update heap tests on external memory
Create a specific group "psram" to only run meaningful
tests on the sdkconfig.ci.psram and sdkconfig.ci.psram_all_ext
configuration.

Add test testing that external memory is prioritized when using
MALLOC_CAP_DEFAULT.
2024-09-23 11:32:22 +02:00
Guillaume Souchere
19d512ebee Merge branch 'feat/heap-support-esp32c61' into 'master'
feat(heap): Add support for esp32c61

Closes IDF-9858 and IDF-10989

See merge request espressif/esp-idf!33556
2024-09-20 16:01:20 +08:00
Guillaume Souchere
8ff8b520f3 Merge branch 'feat/update-to-latest-tlsf' into 'master'
feat(heap): Update component to latest TLSF

See merge request espressif/esp-idf!33193
2024-09-19 17:55:38 +08:00
Guillaume Souchere
f0903aef6b feat(heap): Add test support for esp32c61 2024-09-19 09:53:45 +02:00
Guillaume Souchere
200241b9aa feat(heap): Add support for esp32c61 2024-09-16 14:44:57 +02:00
Guillaume Souchere
ccd8486462 feat(heap): Update component to latest TLSF
The new TLSF architecture has changed. tlsf.h public API
header is now moved into an include folder. tlsf_common.h
is removed from the repo.

This commit updates the heap component and respective
esp_rom patches to take into account this new
architecture.
2024-09-16 09:02:44 +02:00
Marius Vikhammer
520fda61cd feat(system): remove references to RTC mem on C61 2024-09-04 11:16:36 +08:00
wanckl
4e095f4b9f ci(esp32c61): enable c61 generic target test 2024-09-02 19:26:12 +08:00
Armando
67b8dbb5e5 feat(cache): supported cache on c61 2024-08-01 09:34:18 +08:00
igor.udot
b0e8ce0111 ci: replace pytest function for linux target 2024-07-23 14:07:31 +08:00
igor.udot
8691672f03 ci: replace pytest function 2024-07-23 14:07:31 +08:00
wanlei
3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
Marius Vikhammer
fd18bb608b test(misc): enable misc tests that have been missed during bringup 2024-06-28 13:24:28 +08:00
Alexey Lapshin
fcd2aee74d fix(heap): fix warnings found by GNU static analyzer 2024-06-18 14:25:37 +08:00
laokaiyao
21f870ecd5 remove(c5beta3): remove c5 beta3 system files 2024-06-17 12:02:15 +08:00
Jeroen Domburg
a1ba660b4a change(system): heap_caps_alloc returns aligned memory if caps indicate a need for it
The implicit promise of heap_alloc_caps() and friends is that the memory it
returns is fit for the purpose as requested in the caps field. Before
this commit, that did not happen; e.g. DMA-capable memory wass returned
from a correct region, but not aligned/sized to something the DMA subsystem
can handle.

This commit adds an API to the esp_mm component that is then used by the
heap component to adjust allocation alignment, caps and size dependent on
the hardware requirement of the requested allocation caps.
2024-05-27 12:41:18 +08:00
Guillaume Souchere
f7d2423826 Merge branch 'feat/update-memory-layout-c5-mp' into 'master'
feat(heap): support heap and update memory layout on esp32c5-mp target

Closes IDF-9641 and IDF-9358

See merge request espressif/esp-idf!30640
2024-05-22 19:00:21 +08:00
Guillaume Souchere
3f366d6e8b feat(heap-trace): Add a pause state to the heap tracing
This commit adds a feature to pause the heap tracing in the
sense that in this state, the heap tracing will no longer
record the new allocations but will continue to monitor
the free() in order to keep track of the status of the
allocations present in the list of records.

See https://github.com/espressif/esp-idf/issues/13803
2024-05-21 10:59:01 +02:00
Guillaume Souchere
d5e4f419f3 change(heap): Remove todo of closed ticket in memory_layout.c files
Leftover closed ticket removed from memory_layout.c on
the following targets:
- esp32c5
- esp32c6
- esp32h2
2024-05-21 10:40:22 +02:00
Guillaume Souchere
32559d51d6 change(heap): Update soc_memory_regions on esp32c5
The array of memory regions is simplyfied by using the
macro defined in soc.h (for beta3 and mp respectively).
2024-05-21 10:40:22 +02:00
Marius Vikhammer
4533f16c34 fix(rtc_memory): fix conflict between LP-ROM and RTC reserved 2024-04-17 13:37:56 +08:00
Guillaume Souchere
3cca8ff905 Merge branch 'fix/heap-trace-on-all-functions' into 'master'
fix(heap): Tracing of all heap_caps API functions

Closes IDF-9385

See merge request espressif/esp-idf!29536
2024-04-15 15:12:12 +08:00
Guillaume Souchere
52ebac9c62 fix(heap): Loop break on failed alloc
don't check for heaps_array != NULL in the loop.
The check is done after the loop since it is allowed
for the allocation to fail until finding aa ssuitable
heap.
2024-04-12 12:21:13 +02:00
Guillaume Souchere
bd0dbbe767 test(heap): Extend task tracking test with task handle check
Add a test to make sure that the task handles returned in the
task tracking information are valid task handles.

To verify that, feed the task name returned by pcTaskGetName()
using the task handle under test to xTaskGetHandle() and make
sure the task handle returned matches the one under test.
2024-04-10 11:23:07 +02:00
Guillaume Souchere
6351771733 fix(heap): Add block owner to allocs in heap_caps_init
Add the block owner field in the  memory allocated in
heap_caps_init() to avoid parsing error wheen using
the task tracking feature.

Closes https://github.com/espressif/esp-idf/issues/13467
2024-04-10 08:20:09 +02:00
Guillaume Souchere
dd1dde5fb9 fix(heap): Tracing of all heap_caps API
This commit fixes the missing tracing on all
heap_caps_xx_prefer and heap_caps_xx_aligned
functions.
2024-04-09 13:27:45 +02:00
Kevin (Lao Kaiyao)
432864e917 Merge branch 'ci/enable_c5_mp_ci_jobs' into 'master'
ci(esp32c5mp): enable esp32c5 build on CI

See merge request espressif/esp-idf!29895
2024-04-08 12:16:16 +08:00
Ivan Grokhotkov
279b67cc5e Merge branch 'bugfix/check_callgraph_ignore_indirect_calls' into 'master'
fix(check_callgraph): rework --ignore-symbols to be more generic

See merge request espressif/esp-idf!29850
2024-04-07 15:05:08 +08:00
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
wanlei
20c18ac52b feat(esp32c61): final introduce helloworld support 2024-04-02 10:50:52 +08:00
Ivan Grokhotkov
64757e9fea
fix(check_callgraph): rework --ignore-refs to be more generic 2024-03-26 17:05:39 +01:00
Guillaume Souchere
497c840172 fix(heap): Wrong size propagated in alloc fail callback
Propagate `n * size` as the size of the failed allocation
instead of just `size` when heap_caps_calloc() fails since
`n * size` is the actual number of bytes that the heap
component tried to allocate.
2024-03-26 06:48:33 +01:00
Guillaume Souchere
573bd1bcc9 Merge branch 'feat/add-heap-walker-api' into 'master'
feat(heap): Add walker to the heap component

Closes IDF-9189

See merge request espressif/esp-idf!29047
2024-03-22 15:58:34 +08:00
Kevin (Lao Kaiyao)
4cd30f9b8f Merge branch 'feature/esp32c5_mp_bringup' into 'master'
feat(esp32c5): bringup esp32c5 mp (Stage 7/7: hello world)

See merge request espressif/esp-idf!29093
2024-03-22 11:18:52 +08:00
Alexey Lapshin
e845d9e0eb feat(esp_system): allow .data to spill over into L2MEM above 0x4ff40000
It may be usefull when .rodata placed into .dram1.data
2024-03-21 15:36:39 +04:00