From aac3e56a9a2644ec8a5810a1d55cff43b71e728e Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 3 May 2020 23:15:58 +0200 Subject: [PATCH] newlib: initialize syscall_table_ptr_app in single core mode ESP32 ECO3 ROM uses syscall_table_ptr_app on both CPUs, so the pointer needs to be set if running in single core mode. --- components/newlib/syscall_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/newlib/syscall_table.c b/components/newlib/syscall_table.c index 8010cc656..40ad8bb9a 100644 --- a/components/newlib/syscall_table.c +++ b/components/newlib/syscall_table.c @@ -25,6 +25,7 @@ #include "esp_vfs.h" #include "esp_newlib.h" #include "sdkconfig.h" +#include "soc/soc_caps.h" #if CONFIG_IDF_TARGET_ESP32 #include "esp32/rom/libc_stubs.h" @@ -98,7 +99,7 @@ static struct syscall_stub_table s_stub_table = { void esp_setup_syscall_table(void) { syscall_table_ptr_pro = &s_stub_table; -#if !CONFIG_FREERTOS_UNICORE +#if SOC_CPU_CORES_NUM == 2 syscall_table_ptr_app = &s_stub_table; #endif _GLOBAL_REENT = &s_reent;