Can musl libc replace the libc of nuttx system?

2022-07-11 Thread prelude


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.

Re: QUESTIONS

2022-07-11 Thread Alan Carvalho de Assis
Hi Briann,

The main idea of NuttX RTOS is to have a POSIX and in some way a Linux-like
RTOS that runs on low/mid-end microcontrollers, like STM32, ESP32, etc.

You also can run NuttX on high-end processors like Freescale/NXP iMX6 and
others. Then in theory you can port Java Virtual Machine and even run apps
that uses it, but AFAIK nobody did it until now. Maybe because you can use
Linux itself, or Free/Open/Net(BSD) to do it.

BR,

Alan

On Sunday, July 10, 2022, Briann Iañez  wrote:

> Can Apache NuttX run Apache Programs within NuttX? Apps such as Flink or
> Storm?
>


Article: Build an LVGL Touchscreen App with Zig

2022-07-11 Thread Lee, Lup Yuen
This article explains how I used Zig to write an LVGL application for NuttX:

https://lupyuen.github.io/articles/lvgl

Lup


Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Alan Carvalho de Assis
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  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.


Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Xiang Xiao
musl is designed to work exclusively with Linux and then there is no OS
abstraction layer. So it's hard to adapt musl to other OS.
Alan asks a good question: what benefit do you want to get from replacing
NuttX' libc with musl?

On Tue, Jul 12, 2022 at 9:50 AM Alan Carvalho de Assis 
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  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.
>


Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Gregory Nutt
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 
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  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.
>