mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp_common: fix bootloop on ESP8266
This commit is contained in:
parent
a53e1a3fc4
commit
6c4f0da7a7
@ -88,7 +88,7 @@ LINKFLAGS += -nostdlib -Wl,-gc-sections -Wl,-static
|
||||
ifeq (,$(filter esp_idf_heap,$(USEMODULE)))
|
||||
# use the wrapper functions for calloc to add correct overflow detection missing
|
||||
# in the newlib's version.
|
||||
LINKFLAGS += -Wl,-wrap=calloc
|
||||
LINKFLAGS += -Wl,-wrap=_calloc_r
|
||||
endif
|
||||
|
||||
# LINKFLAGS += -Wl,--verbose
|
||||
|
@ -289,7 +289,7 @@ void* IRAM_ATTR __wrap__calloc_r(struct _reent *r, size_t count, size_t size)
|
||||
|
||||
#else /* MODULE_ESP_IDF_HEAP */
|
||||
|
||||
void *__wrap_calloc(size_t nmemb, size_t size)
|
||||
void* IRAM_ATTR __wrap__calloc_r(struct _reent *r, size_t nmemb, size_t size)
|
||||
{
|
||||
/* The xtensa support has not yet upstreamed to newlib. Hence, the fixed
|
||||
* calloc implementation of newlib >= 4.0.0 is not available to the ESP
|
||||
@ -299,7 +299,7 @@ void *__wrap_calloc(size_t nmemb, size_t size)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *res = malloc(total_size);
|
||||
void *res = _malloc_r(r, total_size);
|
||||
|
||||
if (res) {
|
||||
memset(res, 0, total_size);
|
||||
|
Loading…
Reference in New Issue
Block a user