diff --git a/cpu/esp32/include/sdk_conf.h b/cpu/esp32/include/sdk_conf.h index 5b41da079f..2440bc7524 100644 --- a/cpu/esp32/include/sdk_conf.h +++ b/cpu/esp32/include/sdk_conf.h @@ -89,7 +89,7 @@ extern "C" { #define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048 #define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS 4 -#define CONFIG_NEWLIB_NANO_FORMAT 0 +#define CONFIG_NEWLIB_NANO_FORMAT 1 #define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000 /** diff --git a/cpu/esp32/syscalls.c b/cpu/esp32/syscalls.c index fcbe69df16..d868fd480b 100644 --- a/cpu/esp32/syscalls.c +++ b/cpu/esp32/syscalls.c @@ -33,6 +33,7 @@ #include "soc/rtc_cntl_struct.h" #include "soc/timer_group_reg.h" #include "soc/timer_group_struct.h" +#include "sdk_conf.h" #include "xtensa/xtensa_api.h" #ifdef MODULE_ESP_IDF_HEAP @@ -97,6 +98,18 @@ static int _no_sys_func(struct _reent *r) return -1; } +extern int _printf_float(struct _reent *rptr, + void *pdata, + FILE * fp, + int (*pfunc) (struct _reent *, FILE *, + _CONST char *, size_t len), + va_list * ap); + +extern int _scanf_float(struct _reent *rptr, + void *pdata, + FILE *fp, + va_list *ap); + static struct syscall_stub_table s_stub_table = { .__getreent = &__getreent,