newlib: Update unit tests for ESP32-C3

This commit is contained in:
Angus Gratton 2020-12-22 19:46:38 +11:00
parent 570ef56d86
commit 99d93c1227
2 changed files with 9 additions and 0 deletions

View File

@ -141,7 +141,12 @@ TEST_CASE("check if ROM or Flash is used for functions", "[newlib]")
#if defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_SPIRAM)
TEST_ASSERT(fn_in_rom(atoi));
TEST_ASSERT(fn_in_rom(strtol));
#elif defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
/* S3 and C3 always use these from ROM */
TEST_ASSERT(fn_in_rom(atoi));
TEST_ASSERT(fn_in_rom(strtol));
#else
/* S2 do not have these in ROM */
TEST_ASSERT_FALSE(fn_in_rom(atoi));
TEST_ASSERT_FALSE(fn_in_rom(strtol));
#endif // defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_SPIRAM)

View File

@ -26,6 +26,8 @@ void another_external_stack_function(void)
shared_stack_sp = (StackType_t *)get_sp();
}
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
TEST_CASE("test printf using shared buffer stack", "[newlib]")
{
portSTACK_TYPE *shared_stack = malloc(SHARED_STACK_SIZE);
@ -58,3 +60,5 @@ TEST_CASE("test printf using shared buffer stack", "[newlib]")
vSemaphoreDelete(printf_lock);
free(shared_stack);
}
#endif