You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Pieter-Jan Dewitte <pi...@atmosuav.com> on 2021/02/16 12:09:30 UTC
CONFIG_NSH_CMDPARMS not working as expected
Hi all,
I'm looking for help and found on Github this is the best way.
In short, I don't understand why "set FOO `pwd`" gives me this error:
"nsh: pwd: open failed: No such file or directory"
I don't understand it because the documentation
<https://nuttx.apache.org/docs/latest/applications/nsh/config.html#nsh-specific-configuration-settings>suggests
this should work if CONFIG_NSH_CMDPARMS is enabled.
Context:
- I'm using Nuttx through PX4 with the "Cube Orange"
- In the configuration of that board I see "CONFIG_NSH_CMDPARMS" turned
on:
-
https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/console/defconfig
-
https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig
- I'm afraid that as an end user, I don't know what the
difference between these configurations is and how I can tell whether the
parameter is in fact enabled in the shell I'm accessing
For reference, I asked this question earlier also on the PX4 forum:
https://discuss.px4.io/t/nuttx-output-from-commands/21015
Any help or pointers are appreciated!
Best regards / Vriendelijke groet,
Pieter-Jan Dewitte
R&D Engineer
*ATMOS UAV B.V.*
Hangaargebied
Marinevliegkamp 356
2236ZZ Valkenburg ZH
The Netherlands
+31 (0) 15 744 0321
pieterjan.dewitte@atmosuav.com
www.atmosuav.com
Re: CONFIG_NSH_CMDPARMS not working as expected
Posted by Gregory Nutt <sp...@gmail.com>.
> I can't execute:
>
> echo ":-)" > /test.txt
> "nsh: echo: open failed: No such file or directory"
>
The root file system is not a "real" file system. It is a pseudo-file
system and you cannot create regular files there. See
https://cwiki.apache.org/confluence/display/NUTTX/Pseudo+File+System (a
little out of date).
Re: CONFIG_NSH_CMDPARMS not working as expected
Posted by Pieter-Jan Dewitte <pi...@atmosuav.com>.
Thanks for that pointer David.
I can't execute:
echo ":-)" > /test.txt
"nsh: echo: open failed: No such file or directory"
but I can:
echo ":-)" > /fs/microsd/test.txt
I tried setting CONFIG_LIBC_TMPDIR to /fs/microsd/tmp, in both
the defconfig files, and creating the directory /fs/microsd/tmp, but still
the same error.
I'll revisit this problem later, but thanks for the help so far!
Best regards / Vriendelijke groet,
Pieter-Jan Dewitte
R&D Engineer
*ATMOS UAV B.V.*
Hangaargebied
Marinevliegkamp 356
2236ZZ Valkenburg ZH
The Netherlands
+31 (0) 15 744 0321
pieterjan.dewitte@atmosuav.com
www.atmosuav.com
On Tue, 16 Feb 2021 at 15:15, David Sidrane <Da...@nscdg.com> wrote:
> Do you have a writeable /tmp? It would have to be /fs/microsd/tmp
>
> "interim output will be retained in a temporary file. Full path to a
> directory where temporary files can be created is taken from
> CONFIG_LIBC_TMPDIR and it defaults to /tmp if CONFIG_LIBC_TMPDIR is not
> set."
>
> David
>
> -----Original Message-----
> From: Pieter-Jan Dewitte [mailto:pieterjan.dewitte@atmosuav.com]
> Sent: Tuesday, February 16, 2021 4:09 AM
> To: dev@nuttx.apache.org
> Subject: CONFIG_NSH_CMDPARMS not working as expected
>
> Hi all,
>
> I'm looking for help and found on Github this is the best way.
>
> In short, I don't understand why "set FOO `pwd`" gives me this error:
>
> "nsh: pwd: open failed: No such file or directory"
>
>
> I don't understand it because the documentation
> <
> https://nuttx.apache.org/docs/latest/applications/nsh/config.html#nsh-specific-configuration-settings
> >suggests
> this should work if CONFIG_NSH_CMDPARMS is enabled.
>
> Context:
>
> - I'm using Nuttx through PX4 with the "Cube Orange"
> - In the configuration of that board I see "CONFIG_NSH_CMDPARMS" turned
> on:
> -
>
> https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/console/defconfig
> -
>
> https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig
> - I'm afraid that as an end user, I don't know what the
> difference between these configurations is and how I can tell whether
> the
> parameter is in fact enabled in the shell I'm accessing
>
> For reference, I asked this question earlier also on the PX4 forum:
> https://discuss.px4.io/t/nuttx-output-from-commands/21015
>
>
> Any help or pointers are appreciated!
>
>
> Best regards / Vriendelijke groet,
>
> Pieter-Jan Dewitte
> R&D Engineer
> *ATMOS UAV B.V.*
> Hangaargebied
> Marinevliegkamp 356
> 2236ZZ Valkenburg ZH
> The Netherlands
>
> +31 (0) 15 744 0321
> pieterjan.dewitte@atmosuav.com
> www.atmosuav.com
>
RE: CONFIG_NSH_CMDPARMS not working as expected
Posted by David Sidrane <Da...@nscdg.com>.
Do you have a writeable /tmp? It would have to be /fs/microsd/tmp
"interim output will be retained in a temporary file. Full path to a
directory where temporary files can be created is taken from
CONFIG_LIBC_TMPDIR and it defaults to /tmp if CONFIG_LIBC_TMPDIR is not
set."
David
-----Original Message-----
From: Pieter-Jan Dewitte [mailto:pieterjan.dewitte@atmosuav.com]
Sent: Tuesday, February 16, 2021 4:09 AM
To: dev@nuttx.apache.org
Subject: CONFIG_NSH_CMDPARMS not working as expected
Hi all,
I'm looking for help and found on Github this is the best way.
In short, I don't understand why "set FOO `pwd`" gives me this error:
"nsh: pwd: open failed: No such file or directory"
I don't understand it because the documentation
<https://nuttx.apache.org/docs/latest/applications/nsh/config.html#nsh-specific-configuration-settings>suggests
this should work if CONFIG_NSH_CMDPARMS is enabled.
Context:
- I'm using Nuttx through PX4 with the "Cube Orange"
- In the configuration of that board I see "CONFIG_NSH_CMDPARMS" turned
on:
-
https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/console/defconfig
-
https://github.com/PX4/PX4-Autopilot/blob/master/boards/cubepilot/cubeorange/nuttx-config/nsh/defconfig
- I'm afraid that as an end user, I don't know what the
difference between these configurations is and how I can tell whether
the
parameter is in fact enabled in the shell I'm accessing
For reference, I asked this question earlier also on the PX4 forum:
https://discuss.px4.io/t/nuttx-output-from-commands/21015
Any help or pointers are appreciated!
Best regards / Vriendelijke groet,
Pieter-Jan Dewitte
R&D Engineer
*ATMOS UAV B.V.*
Hangaargebied
Marinevliegkamp 356
2236ZZ Valkenburg ZH
The Netherlands
+31 (0) 15 744 0321
pieterjan.dewitte@atmosuav.com
www.atmosuav.com