People have talked about using other C libraries in the past, but no one has been successful.
C libraries support an operating specific interface. For example, a Linux LibC will need to use Linux system calls and Linux data structures to interface with the kernel. A similar interface would be needed to work with NuttX. MUSL supports only Linux. Hopefully, the MUSL OS interface is well modularized to support use of a different OS. Some things have very intense interactions such as C standard I/O and buffered I/O. A good contributor who is no longer associated with the NuttX project looked into using newlib with NuttX 10 or 12 years ago and said that the effort would be quite large. It is technically feasible and there is no known single show-stopping issue. But there would be many, many smaller issues of compatibility with header files, data structures, etc. This effort would be complex, invasive, and probably more work than anyone really would want to commit to doing. He said it would be like “a death from a thousand cuts.” If there is missing functionality in the NuttX LibC, most people would opt to extend the NuttX LibC, not port a different Libc. But if you are willing to put in a significant effort, then perhaps you could be successful. Since this would require the development of the OS interface as part of MUSL, it would not be a part of NuttX; it would be a part of MUSL. If you are serious about pursuing this, you really should be discussing the effort with Rich Felker and the MUSL team. On Mon, Jul 11, 2022 at 7:50 PM Alan Carvalho de Assis <acas...@gmail.com> wrote: > Hi Prelude, > > I don't think someone already tried it before. > > BTW, why do you want to do it? > > BR, > > Alan > > On Monday, July 11, 2022, prelude <wgz_z...@163.com> wrote: > > > > > > > I am currently working on a project that I want to transplant musl LIC to > > nuttx to replace the built-in libc, have any friends done similar work? I > > want to ask how to start.Thank you. >