As in, the NuttX community would need to start moving over initialization out of NSH and into the board initialization?
On Fri, May 2, 2025, 11:54 PM Xiang Xiao <xiaoxiang781...@gmail.com> wrote: > The quick approach is coping the initialization routine to your > application, but it isn't an elegant solution. > A better approach is splitting the general initialization functionality > from nsh to init like other POSIX operating systems. > But, the second approach needs more work. > > On Thu, May 1, 2025 at 10:19 AM Matteo Golin <matteo.go...@gmail.com> > wrote: > > > Hello everyone, > > > > Currently working on an application for a network controlled switch box. > > So far everything has gone great and we've > > finally completed our application that is capable of sending switch > > commands over the network using NuttX on the > > W5500-EVB Pico. > > > > I have one last hurdle left for this project, and that is automatically > > booting into our application instead of > > `nsh_main`. I have done this before for other less involved applications > > and typically only needed to do some `boardctl` > > calls to start up the USB shell. This time, however, I need to start up > > networking at boot time without relying on NSH's > > initialization. > > > > I read through the docs and found that this is done in `nsh_netinit()` > > (since renamed `netinit_bringup` I believe). > > After reading through some of the code I see it performs some important > > tasks like setting the MAC address (W5500 has > > software MAC only), etc. I am wondering if there is a suggested way for > me > > to perform all these task without needing to > > use NSH. I suppose I can include the `netutils.h` file into my > application > > and call it myself? Is there anyway to > > initialize the networking infrastructure within board code, like > > `board_appinit()`? I can't access the `netutils` > > library from board code, and it appears that networking is one of the few > > initialization tasks without a `boardctl` > > call. > > > > > Any help is appreciated! Thank you, > > > > -- > > Matteo Golin > > >