The POSIX APIs that nsh supports are sh 
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html, 2018).  
And system 
(https://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html also 
2018)  And others like posix_spawn.  Not all applications require these, but 
their use is pretty common.

If these or nsh are never referenced in the code, they will not be drawn into 
the link in the FLAT build.  So no special, explicit action should be required 
to exclude them in that build case.

________________________________
From: Nathan Hartman <[email protected]>
Sent: Thursday, July 9, 2026 8:18 PM
To: [email protected] <[email protected]>
Subject: Re: Make NuttX Tiny Again (pun intended)

On Thu, Jul 9, 2026 at 5:25 PM Alan C. Assis <[email protected]> wrote:

>
> I think we need to take it in consideration and have a middle ground to not
> enforce POSIX all the way up, where it is not necessary or in cases when
> the HW cannot support a full POSIX.
> What is the reason to have a terminal interface in a device without screen,
> keyboard or serial port? Just to please the POSIX standard?



Exactly! In my work, NSH is only included in the build for testing in the
lab. The real hardware does not have display, keyboard, or serial ports.
It's deeply embedded, boots directly into my application, and does its
thing. I couldn't even support having NSH because it would get in the way
and be inaccessible anyway.

Now, the POSIX compatibility is important to me, especially because some of
the code running in this deeply embedded stuff is also designed to build
and run on PCs. It's portable and cross platform. NuttX makes it possible
for me to take PC code and run it in microcontrollers. So I want the POSIX
compatibility, but only the parts that are important for my application. I
need to be able to configure the build without the pieces that are
meaningless for my application, such as NSH.

Cheers,
Nathan

Reply via email to