Re: (Standard | Recommended) way to create NuttX applications
Em sáb., 22 de mai. de 2021 às 18:01, Gregory Nutt escreveu: > > > > In my application, I am not using nutshell. > > > > But I was wondering if is it the best, or correct or recommended way to do. > > I don't think there is a best or recommended in this case. You should > do what is best for you and for the final product. > > Often people build NSH in their development builds, but omit it from > final production build. Many embedded systems have no easily accessible > to UI and carrying NSH is a waste of FLASH in that case. > > NSH can also be a security hole if you don't carefully check which > commands are available or do not use a login. I was thinking about that. > > Other people like to keep NSH in FLASH for post-release debugging or for > remote sessions. > > There is no one-size-fits-all answer. > Indeed. In my case, I implemented a single application controlling everything, maybe just like any firmware. And I prepared my environment to work that way. But, then, rethinking a little bit, I could split my "large" application into some "small" applications communicating between each other. Then the environment changes, the build process changes, integration changes. It's nice to see that there are several possibilities. Best regards, Flavio > > -- Flavio de Castro Alves Filho flavio.al...@gmail.com Twitter: http://twitter.com/#!/fraviofii LinkedIn profile: www.linkedin.com/in/flaviocastroalves
Re: (Standard | Recommended) way to create NuttX applications
In my application, I am not using nutshell. But I was wondering if is it the best, or correct or recommended way to do. I don't think there is a best or recommended in this case. You should do what is best for you and for the final product. Often people build NSH in their development builds, but omit it from final production build. Many embedded systems have no easily accessible to UI and carrying NSH is a waste of FLASH in that case. NSH can also be a security hole if you don't carefully check which commands are available or do not use a login. Other people like to keep NSH in FLASH for post-release debugging or for remote sessions. There is no one-size-fits-all answer.
Re: (Standard | Recommended) way to create NuttX applications
:-D In my application, I am not using nutshell. But I was wondering if is it the best, or correct or recommended way to do. Best regards, Flavio Em sáb., 22 de mai. de 2021 12:24, David Sidrane escreveu: > Yes you can, > > Just call the app. > > Create and app. Call it what you like. user_start etc. > > Set > > CONFIG_USERMAIN_STACKSIZE=1100 > CONFIG_USER_ENTRYPOINT="user_start" > > Int user_start(int argc, char *argv[]) > { > return ...; > } > > > CONFIG_USERMAIN_STACKSIZE=1100 > CONFIG_USER_ENTRYPOINT="pigs_can_fly " > > Int pigs_can_fly (int argc, char *argv[]) > { > return ...; > } > > -Original Message- > From: Gregory Nutt [mailto:spudan...@gmail.com] > Sent: Saturday, May 22, 2021 7:12 AM > To: dev@nuttx.apache.org > Subject: Re: (Standard | Recommended) way to create NuttX applications > > > > This question is more of a curiosity. Which is the most used, or > > recommended to implement and deploy an application in a NuttX > > environment? > > > > I saw that it is possible to have several applications to be called by > > NuttShell, and you can set applications to run when NuttShell starts. > > > > It is also possible to have a standalone application without NutShell. > > > > Is there any recommended approach? > > No, NuttX is an OS. You can setup your applications in any that you > would like. > > PX4 uses an NSH startup script to bring up their system. >
RE: (Standard | Recommended) way to create NuttX applications
Yes you can, Just call the app. Create and app. Call it what you like. user_start etc. Set CONFIG_USERMAIN_STACKSIZE=1100 CONFIG_USER_ENTRYPOINT="user_start" Int user_start(int argc, char *argv[]) { return ...; } CONFIG_USERMAIN_STACKSIZE=1100 CONFIG_USER_ENTRYPOINT="pigs_can_fly " Int pigs_can_fly (int argc, char *argv[]) { return ...; } -Original Message- From: Gregory Nutt [mailto:spudan...@gmail.com] Sent: Saturday, May 22, 2021 7:12 AM To: dev@nuttx.apache.org Subject: Re: (Standard | Recommended) way to create NuttX applications > This question is more of a curiosity. Which is the most used, or > recommended to implement and deploy an application in a NuttX > environment? > > I saw that it is possible to have several applications to be called by > NuttShell, and you can set applications to run when NuttShell starts. > > It is also possible to have a standalone application without NutShell. > > Is there any recommended approach? No, NuttX is an OS. You can setup your applications in any that you would like. PX4 uses an NSH startup script to bring up their system.
Re: (Standard | Recommended) way to create NuttX applications
This question is more of a curiosity. Which is the most used, or recommended to implement and deploy an application in a NuttX environment? I saw that it is possible to have several applications to be called by NuttShell, and you can set applications to run when NuttShell starts. It is also possible to have a standalone application without NutShell. Is there any recommended approach? No, NuttX is an OS. You can setup your applications in any that you would like. PX4 uses an NSH startup script to bring up their system.