feat(esp_libc): add full support for picolibc

This commit is contained in:
Alexey Lapshin
2026-01-30 23:39:53 +07:00
parent 1c08b38b27
commit 0b3929d0d9
82 changed files with 934 additions and 382 deletions
@@ -224,6 +224,37 @@ FORCE_INLINE_ATTR __attribute__((pure)) void *esp_cpu_pc_to_addr(uint32_t pc)
#endif
}
/**
* @brief Set the current CPU core's thread pointer
*
* Sets the thread pointer register to the given value.
*
* @param threadptr Pointer to the thread-local storage area
*/
FORCE_INLINE_ATTR void esp_cpu_set_threadptr(void * threadptr)
{
#ifdef __XTENSA__
xt_utils_set_threadptr(threadptr);
#else
rv_utils_set_threadptr(threadptr);
#endif
}
/**
* @brief Get the current CPU core's thread pointer
*
* @return thread pointer register value
*/
FORCE_INLINE_ATTR void *esp_cpu_get_threadptr(void)
{
#ifdef __XTENSA__
return xt_utils_get_threadptr();
#else
return rv_utils_get_threadptr();
#endif
}
/* ------------------------------------------------- CPU Interrupts ----------------------------------------------------
*
* ------------------------------------------------------------------------------------------------------------------ */