On Tue, Jul 9, 2024 at 11:08 AM Philippe Leduc <philippe.le...@mailfence.com.invalid> wrote:
> For the record, we had a hard time understanding why NSH is a VIP citizen > and that there are multiple ways of initializing NuttX ( > https://github.com/apache/nuttx/issues/10821). > I agree that the documentation is lacking on this subject, but I still > feel that NSH shall be see as a standard userspace app and not a kind of > all-in-one userspace super app with embedded init. > > Regards, > > -- > Philippe L. Thank you Philippe, This is the kind of feedback that we need to make the decision. So, before we modify anything we need to better understand the existent scenario and its usage cases. I think there are 5 to 7 ways to do initialization on NuttX: Assuming the ENTRYPOINT itself is also an initialization option we have: 1 - ENTRYPOINT 2 - DRIVERS_EARLY_INITIALIZE 2 - NSH_ARCH_INIT 3 - BOARD_EARLY_INITIALIZE 4 - BOARD_LATE_INITIALIZE 5 - BOARDCTL INIT 6 - INITRC SCRIPT I am sure I missed other methods, please let me know. BR, Alan On Tue, Jul 9, 2024 at 10:06 AM Alan C. Assis <acas...@gmail.com> wrote: > Hi Everyone, > > I decided to bring it from here:https://github.com/apache/nuttx/pull/12641 > to improve our discussion. > > Historically NuttX has many initialization options and not a unified > initialization process. > > NSH for example has its own and exclusive NSH ARCH INIT (because naturally > it has more things to do than a normal application, like initializing the > USB CDC/ACM channel). > > However it poses some issues when someone wants to get rid of NSH and > initialize his/her application directly. Sometime ago we had a discussion > here and it was mostly consensus that all applications need to follow a > standard initialization method, even NSH. > > But time passed and nothing changed. > > Even worst, now with PR 12641 we have another option (yes, I know you also > are thinking about it: https://xkcd.com/927/ ) > > How can we improve things? > > How can we simplify this? > > How can we remove NSH "privileges" (I mean remove NSH ARCH INIT) and still > keep everything working? > > If someone wants to help on this subject... > > There is a documentation about the NuttX Initialization Sequence here: > > > https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Initialization+Sequence > > And many scattered in our official documentation: > > > https://nuttx.apache.org/docs/latest/applications/examples/nxterm/index.html#initialization > https://nuttx.apache.org/docs/latest/faq/index.html#board-initialization > https://nuttx.apache.org/docs/latest/applications/nsh/customizing.html > > https://nuttx.apache.org/docs/latest/applications/nsh/customizing.html#nsh-initialization-sequence > https://nuttx.apache.org/docs/latest/applications/nsh/installation.html > > Best Regards, > > Alan >