Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libc heap size calculation for ESP32, use heap adapter #84331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marekmatej
Copy link

@marekmatej marekmatej commented Jan 21, 2025

This PR:

  • fixes the libc heap allocation for ESP32 chips
  • remove ESP heap and transform the heap adapter
  • use kernel heap by default in RF stacks

@zephyrbot zephyrbot added area: C Library C Standard Library size: XS A PR changing only a single line of code labels Jan 21, 2025
lib/libc/common/Kconfig Outdated Show resolved Hide resolved
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 3142fc0 to 853dbfe Compare January 22, 2025 23:14
@zephyrbot zephyrbot added the platform: ESP32 Espressif ESP32 label Jan 22, 2025
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 853dbfe to 851f3ab Compare January 22, 2025 23:18
@marekmatej marekmatej changed the title libc: common: Kconfig Fix system heap size calc for ESP32 and separate it from the ESP heap Jan 22, 2025
wmrsouza
wmrsouza previously approved these changes Jan 23, 2025
thedjnK
thedjnK previously approved these changes Jan 25, 2025
@marekmatej marekmatej removed the size: XS A PR changing only a single line of code label Jan 25, 2025
wmrsouza
wmrsouza previously approved these changes Jan 26, 2025
sylvioalves
sylvioalves previously approved these changes Jan 28, 2025
@marekmatej marekmatej dismissed stale reviews from sylvioalves, wmrsouza, and thedjnK via 9debbfd January 29, 2025 13:33
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from de5e46b to 9debbfd Compare January 29, 2025 13:33
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 9debbfd to 745474a Compare January 29, 2025 14:15
@marekmatej marekmatej marked this pull request as draft January 29, 2025 19:26
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch 2 times, most recently from df0d856 to c148a1e Compare January 29, 2025 23:09
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 29, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_espressif zephyrproject-rtos/hal_espressif@c0b3802 zephyrproject-rtos/hal_espressif@2b81987 (zephyr) zephyrproject-rtos/hal_espressif@c0b38024..2b819879

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_espressif DNM This PR should not be merged (Do Not Merge) labels Jan 29, 2025
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from c148a1e to b94ef47 Compare January 29, 2025 23:26
@marekmatej marekmatej changed the title Fix system heap size calc for ESP32 and separate it from the ESP heap Fix libc heap size calculation for ESP32, use heap adapter Jan 29, 2025
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch 5 times, most recently from f4e0e99 to 8d16387 Compare January 30, 2025 16:47
@marekmatej marekmatej marked this pull request as ready for review January 30, 2025 21:22
Marek Matej added 2 commits January 31, 2025 14:25
Use proper hal version.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
Change the condition so that ESP32 SoCs are using `_heap_sentry` to
get actual run-time heap size.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 8d16387 to 500adf2 Compare January 31, 2025 13:26
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Jan 31, 2025
@marekmatej
Copy link
Author

@stephanosio can you PTAL

Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
@marekmatej marekmatej force-pushed the bugfix/libc_malloc_arena_size branch from 500adf2 to e50546c Compare January 31, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants