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

drivers: esp32: update runtime heap usage #79523

Merged

Conversation

sylvioalves
Copy link
Collaborator

@sylvioalves sylvioalves commented Oct 7, 2024

This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectabily issues.
Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.
Such changes are described below:

  1. Rename heap.c to esp_heap_runtime.c for better readability.
  2. Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
    available in Zephyr.
  3. Add runtime heap to BT as such as Wi-Fi.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 7, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_espressif zephyrproject-rtos/hal_espressif@61a002a zephyrproject-rtos/hal_espressif@5e7220b (zephyr) zephyrproject-rtos/[email protected]

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

@sylvioalves sylvioalves force-pushed the improvement/runtime_heap branch 4 times, most recently from 9f382ad to 5c7a7a1 Compare October 7, 2024 21:23
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Oct 7, 2024
@sylvioalves sylvioalves force-pushed the improvement/runtime_heap branch 3 times, most recently from b9c5237 to 2e52749 Compare October 12, 2024 01:56
@sylvioalves sylvioalves marked this pull request as ready for review October 12, 2024 01:56
@sylvioalves sylvioalves removed the DNM This PR should not be merged (Do Not Merge) label Oct 12, 2024
@sylvioalves sylvioalves force-pushed the improvement/runtime_heap branch from 2e52749 to a77c0c8 Compare October 12, 2024 01:57
@zephyrbot zephyrbot added platform: ESP32 Espressif ESP32 DNM This PR should not be merged (Do Not Merge) labels Oct 12, 2024
@sylvioalves sylvioalves removed the DNM This PR should not be merged (Do Not Merge) label Oct 12, 2024
@sylvioalves
Copy link
Collaborator Author

Depends on #79524 due to compliance check.

@Thalley Thalley removed their request for review October 13, 2024 21:15
jukkar
jukkar previously approved these changes Oct 14, 2024
wmrsouza
wmrsouza previously approved these changes Oct 14, 2024
jhedberg
jhedberg previously approved these changes Oct 14, 2024
uLipe
uLipe previously approved these changes Oct 14, 2024
marekmatej
marekmatej previously approved these changes Oct 16, 2024
Update both Wi-FI and BLE init codes to return proper
error code and logging when it is missing heap.

Signed-off-by: Sylvio Alves <[email protected]>
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.

Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.

Such changes are described below:

1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.

Fixes zephyrproject-rtos#79490
Fixes zephyrproject-rtos#79470

Signed-off-by: Sylvio Alves <[email protected]>
@sylvioalves sylvioalves force-pushed the improvement/runtime_heap branch from a77c0c8 to 49570fa Compare October 16, 2024 21:06
@zephyrbot zephyrbot requested a review from Kludentwo October 16, 2024 21:07
@sylvioalves
Copy link
Collaborator Author

Rebased,

@carlescufi carlescufi merged commit 59f0418 into zephyrproject-rtos:main Oct 17, 2024
27 checks passed
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.

9 participants