You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Flavio Castro Alves Filho <fl...@gmail.com> on 2021/05/22 14:06:58 UTC

(Standard | Recommended) way to create NuttX applications

Hello,

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?

Best regards,

Flavio

-- 
Flavio de Castro Alves Filho

flavio.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Nimble on nrf52832 (u-blox) Matias

Posted by Miguel Wisintainer <tc...@hotmail.com>.
Sir

How are you ?

I compiled the SDC Nimble to run on NRF52832 but i am getting the following error

NuttShell (NSH) NuttX-10.1.0-RC1
nsh> ERROR: nrf52_sdc_initialize() failed: -45

Can you help me ?

Miguel Wisintainer

Re: (Standard | Recommended) way to create NuttX applications

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
Em sáb., 22 de mai. de 2021 às 18:01, Gregory Nutt
<sp...@gmail.com> 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.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Re: (Standard | Recommended) way to create NuttX applications

Posted by Gregory Nutt <sp...@gmail.com>.
> 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

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
:-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 <Da...@nscdg.com>
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:spudaneco@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

Posted by David Sidrane <Da...@nscdg.com>.
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:spudaneco@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

Posted by Gregory Nutt <sp...@gmail.com>.
> 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.