Make a couple of demos build using picolibc (#1202)

* [RISC-V-Qemu-virt_GCC Demo] Add picolibc support

Add minimal picolibc support:

 * Use --specs=picolibc.specs to direct gcc at picolibc
 * Use -DPICOLIBC_INTEGER_PRINTF_SCANF to enable smaller printf implementation
 * Enable configUSE_PICOLIBC_TLS for thread local storage
 * Add TLS section to linker script

Signed-off-by: Keith Packard <keithpac@amazon.com>

* [CORTEX_MPU_M3_MPS2_QEMU_GCC Demo] Add picolibc support

Add minimal picolibc support to this demo

 * Use --specs=picolibc.specs to direct gcc at picolibc
 * Use -DPICOLIBC_INTEGER_PRINTF_SCANF to enable smaller printf implementation
 * Enable configUSE_PICOLIBC_TLS for thread local storage
 * Add TLS section to linker script
 * Replace newlib syscall hooks with picolibc ones

Signed-off-by: Keith Packard <keithpac@amazon.com>

---------

Signed-off-by: Keith Packard <keithpac@amazon.com>
Co-authored-by: Keith Packard <keithpac@amazon.com>
This commit is contained in:
Keith Packard 2024-04-02 21:43:14 -07:00 committed by GitHub
parent 7514cd3d54
commit eb97c5d325
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 89 additions and 2 deletions

View file

@ -45,6 +45,10 @@
#define configMTIME_BASE_ADDRESS ( CLINT_ADDR + CLINT_MTIME )
#define configMTIMECMP_BASE_ADDRESS ( CLINT_ADDR + CLINT_MTIMECMP )
#ifdef PICOLIBC_TLS
#define configUSE_PICOLIBC_TLS 1
#endif
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1