From 18b6997e326d9a5c91b1a5f4307a11209c540908 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Tue, 3 Jun 2025 16:19:57 +0200 Subject: [PATCH] test(newlib): fixed failing C5 ECO2 newlib tests --- components/newlib/test_apps/newlib/main/test_newlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/newlib/test_apps/newlib/main/test_newlib.c b/components/newlib/test_apps/newlib/main/test_newlib.c index f486e97bce..bd6a91627a 100644 --- a/components/newlib/test_apps/newlib/main/test_newlib.c +++ b/components/newlib/test_apps/newlib/main/test_newlib.c @@ -131,7 +131,8 @@ static bool fn_in_rom(void *fn) /* Older chips have newlib nano in rom as well, but this is not linked in due to us now using 64 bit time_t and the ROM code was compiled for 32 bit. */ -#define PRINTF_NANO_IN_ROM (CONFIG_NEWLIB_NANO_FORMAT && (CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H21)) +#define PRINTF_NANO_IN_ROM (CONFIG_NEWLIB_NANO_FORMAT && ESP_ROM_HAS_NEWLIB_NANO_FORMAT && !ESP_ROM_HAS_NEWLIB_32BIT_TIME && !ESP_ROM_HAS_NEWLIB_NANO_PRINTF_FLOAT_BUG) + #define SSCANF_NANO_IN_ROM (CONFIG_NEWLIB_NANO_FORMAT && CONFIG_IDF_TARGET_ESP32C2) TEST_CASE("check if ROM or Flash is used for functions", "[newlib]")