1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: add malloc_thread_safe if esp_idf_heap not used

This commit is contained in:
Gunar Schorcht 2022-06-15 07:31:02 +02:00
parent ca0e651f74
commit 041fe58209
2 changed files with 13 additions and 10 deletions

View File

@ -22,6 +22,7 @@ config CPU_FAM_ESP32
select PACKAGE_ESP32_SDK if TEST_KCONFIG
select MODULE_LIBC_GETTIMEOFDAY if TEST_KCONFIG
select MODULE_MALLOC_THREAD_SAFE if !MODULE_ESP_IDF_HEAP && TEST_KCONFIG
select MODULE_RTT_RTC if HAS_PERIPH_RTT && MODULE_PERIPH_RTC
select MODULE_PERIPH_RTT if HAS_PERIPH_RTT && MODULE_PM_LAYERED
select MODULE_PS if MODULE_SHELL

View File

@ -40,16 +40,6 @@ ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
USEMODULE += pthread
endif
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
# The ESP-IDF heap component uses the TLSF implementation that is part of
# the component. To avoid conflicts with modules and packages that use the
# RIOT package `tlsf`, this package is also used for the ESP-IDF heap instead
# of its own implementation. There does not seem to be any differences in
# the implementations of TLSF with the exception of heap poisoning, which
# is not configured.
USEPKG += tlsf
endif
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
# add additional modules required by esp_idf_nvs_flash
USEMODULE += pthread
@ -91,6 +81,18 @@ ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
USEMODULE += esp_idf_spi_ram
endif
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
# The ESP-IDF heap component uses the TLSF implementation that is part of
# the component. To avoid conflicts with modules and packages that use the
# RIOT package `tlsf`, this package is also used for the ESP-IDF heap instead
# of its own implementation. There does not seem to be any differences in
# the implementations of TLSF with the exception of heap poisoning, which
# is not configured.
USEPKG += tlsf
else
USEMODULE += malloc_thread_safe
endif
ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += esp_idf_spi_flash
endif