feat(newlib): add picolibc support

This commit is contained in:
Alexey Lapshin
2024-09-26 13:13:20 +07:00
parent 22a38779fb
commit 888b5f7e8d
171 changed files with 8438 additions and 1016 deletions

View File

@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <sys/reent.h>
#include "sdkconfig.h"
#include "esp_log.h"
#include "bootloader_init.h"
@@ -61,8 +62,10 @@ static int select_partition_number(bootloader_state_t *bs)
return bootloader_utility_get_selected_boot_partition(bs);
}
#if CONFIG_LIBC_NEWLIB
// Return global reent struct if any newlib functions are linked to bootloader
struct _reent *__getreent(void)
{
return _GLOBAL_REENT;
}
#endif