5.7.10.3 Mchp-stdlibc Option

The -mchp-stdlibc=library option indicates which standard C library will be linked with the project. The library argument can be either musl, which is the default selection if this option is not used, or picolibc, which links a library with support for reentrancy and thread-local storage of objects, making it suitable for applications using multiple threads. The option aliases -mmusl and -mpicolibc can be used to indicate the default or picolibc libraries respectively. This option must be used both when compiling and linking projects.

When using a debugging environment that supports semihosting, you can combine the picolibc library with the semihosting library (see Semihost Option).

For more on the standard library functions, see the Microchip Unified Standard Library Reference Guide. Specific information on the picolibc library can be found in Picolibc Library.