On Thu, Oct 12, 2023 at 9:52 AM Alin Jerpelea wrote:
> the patch has been backported for RC1
> Thanks for reporting it
> Best regards
> Alin
Perfect! Thank you Alin! :-)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
I will test too soon, well, gustavo can do it :)
Enviado do meu iPhone
> Em 12 de out. de 2023, à(s) 19:22, Alan C. Assis escreveu:
>
> Did you try popen() ?
>
> https://stackoverflow.com/questions/43116/how-can-i-run-an-external-program-from-c-and-parse-its-output
>
> Look the example at ap
Wow! Maybe sprintf, right ?
Enviado do meu iPhone
> Em 12 de out. de 2023, à(s) 18:31, Gregory Nutt
> escreveu:
>
>
>> On 10/12/2023 3:26 PM, MIGUEL ALEXANDRE WISINTAINER wrote:
>> Some idea how to capture the data returned by exec ?
>
> exec does really return any data other than an int st
Did you try popen() ?
https://stackoverflow.com/questions/43116/how-can-i-run-an-external-program-from-c-and-parse-its-output
Look the example at apps/examples/popen
BR,
Alan
On 10/12/23, MIGUEL ALEXANDRE WISINTAINER wrote:
> Some idea how to capture the data returned by exec ?
>
> Enviado do
Here is some history and justification for the naming.
Uros Platise created the built-in tasks in 2012 and provided the
naming. I would have preferred another name to avoid the conflicts.
The meaning of external only makes sense with respect what is internal.
If you are think from the persp
On 10/12/2023 3:26 PM, MIGUEL ALEXANDRE WISINTAINER wrote:
Some idea how to capture the data returned by exec ?
exec does really return any data other than an int status code which
only indicates if the task was correctly started.
If you want some text output, you would have to add instrum
Some idea how to capture the data returned by exec ?
Enviado do meu iPhone
> Em 12 de out. de 2023, à(s) 18:16, Alan C. Assis escreveu:
>
> Hi Greg,
>
>> On 10/12/23, Gregory Nutt wrote:
>>
>>> On 10/12/2023 2:18 PM, Alan C. Assis wrote:
>>> The execv on Linux also fails when we can an buil
Hi Greg,
On 10/12/23, Gregory Nutt wrote:
>
> On 10/12/2023 2:18 PM, Alan C. Assis wrote:
>> The execv on Linux also fails when we can an builtin program, try it:
>
> You are right, but the semantics are really confusing. In Bash,
> commands that are included inside of Bash are called built-in c
thank you Gregory
De: Gregory Nutt
Enviado: quinta-feira, 12 de outubro de 2023 21:06
Para: dev@nuttx.apache.org
Assunto: Re: execv obsolet ?
On 10/12/2023 2:18 PM, Alan C. Assis wrote:
> The execv on Linux also fails when we can an builtin program, try it:
You
On 10/12/2023 2:18 PM, Alan C. Assis wrote:
The execv on Linux also fails when we can an builtin program, try it:
You are right, but the semantics are really confusing. In Bash,
commands that are included inside of Bash are called built-in commands
and you cannot execute them. We ignore t
On 10/12/2023 2:05 PM, Alan C. Assis wrote:
Ah ok, I tested using the original code with "ls" instead "/bin/ls"
and the result as similar to NuttX: didn't print anything.
That is a different problem; it did not find ls. On linux, use /execvp/
instead of /execv //or //execve/. With execve, y
i just compiled i2c tools first...
De: Gregory Nutt
Enviado: quinta-feira, 12 de outubro de 2023 20:51
Para: dev@nuttx.apache.org
Assunto: Re: execv obsolet ?
On 10/12/2023 2:31 PM, MIGUEL ALEXANDRE WISINTAINER wrote:
> I can run (execv) i2c from hello 🙂
>
> wo
well, works using /bin/i2c
Like the Unix
nsh> help
help usage: help [-v] []
. cp exitmkrdset unset
[ cmp false mount sleep uptime
? dirname fdinfo mv source usleep
alia
On 10/12/2023 2:31 PM, MIGUEL ALEXANDRE WISINTAINER wrote:
I can run (execv) i2c from hello 🙂
works!
Now Gustavo can you this TIP to make work the PCA/PCF GPIO extender 🙂
Thanks!
nsh> hello
Executing 1 /bin/i2c
Usage: i2c [arguments]
Where is one of:
There are several
I can run (execv) i2c from hello 🙂
works!
Now Gustavo can you this TIP to make work the PCA/PCF GPIO extender 🙂
Thanks!
nsh> hello
Executing 1 /bin/i2c
Usage: i2c [arguments]
Where is one of:
Show help : ?
List buses: bus
List devices : dev [OPTIONS]
Re
The execv on Linux also fails when we can an builtin program, try it:
#include
#include
#include
int main(int argc, char *argv[])
{
int ret;
if (argc < 2)
{
static char * const args[2] =
{
"true",
NULL
};
ret = execv(args[0], args);
if (
Ah ok, I tested using the original code with "ls" instead "/bin/ls"
and the result as similar to NuttX: didn't print anything.
I discovered the issue: ls is not a buildin program, you need to call
a builtin program to get it working.
I modified apps/examples/null to print an incentive message !
when have time, test there Alan
De: Alan C. Assis
Enviado: quinta-feira, 12 de outubro de 2023 18:48
Para: dev@nuttx.apache.org
Assunto: Re: execv obsolet ?
Hi Miguel,
I suggest you to try first in the Linux.
NuttX should give you the same result ;-)
BR,
Alan
1 hour ago, not 1 year ago🙂
De: MIGUEL ALEXANDRE WISINTAINER
Enviado: quinta-feira, 12 de outubro de 2023 19:07
Para: dev@nuttx.apache.org
Assunto: RE: execv obsolet ?
yes, i already had done that 1 year ago
ubuntu@DESKTOP-GRCNLV8:~$ nano hello_main.c
ubuntu@DE
yes, i already had done that 1 year ago
ubuntu@DESKTOP-GRCNLV8:~$ nano hello_main.c
ubuntu@DESKTOP-GRCNLV8:~$ gcc hello_main.c -o hello_main
ubuntu@DESKTOP-GRCNLV8:~$ ./hello_main
Executing 1 /bin/ls
Espruino esp kitware-archive.sh.1
nuttxmbedrus
Hi Miguel,
I suggest you to try first in the Linux.
NuttX should give you the same result ;-)
BR,
Alan
On 10/12/23, MIGUEL ALEXANDRE WISINTAINER wrote:
> Now compiles 🙂
>
> in theory should show the files got from ls on terminal ?
>
> Builtin Apps:
> i2c sh hellonsh
> nsh>
Now compiles 🙂
in theory should show the files got from ls on terminal ?
Builtin Apps:
i2c sh hellonsh
nsh> hello
nsh>
=
#include
#include
#include
#include
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])
#else
int hello_main(int argc, char *
you need enable CONFIG_LIBC_EXECFUNCS:
https://github.com/apache/nuttx/blob/master/libs/libc/unistd/lib_execv.c#L29
On Fri, Oct 13, 2023 at 1:59 AM MIGUEL ALEXANDRE WISINTAINER <
tcpipc...@hotmail.com> wrote:
> #include
> #include
> #include
> #include
>
> #ifdef CONFIG_BUILD_KERNEL
> int mai
#include
#include
#include
#include
#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])
#else
int hello_main(int argc, char *argv[])
#endif
{
if (argc < 2)
{
static char * const args[2] =
{
"/bin/ls",
NULL
};
execv(args[0], args);
}
I think there was an option to specify custom drivers relative to board
level. This should remain third party as long as you go with
"CONFIG_ARCH_BOARD_CUSTOM"
BOARD_DRIVERS_DIR ?= $(wildcard $(BOARD_DIR)$(DELIM)..$(DELIM)drivers)
Personally I never used it that way, but do not see anything that
the patch has been backported for RC1
Thanks for reporting it
Best regards
Alin
On Thu, Oct 12, 2023 at 4:07 AM Xiang Xiao
wrote:
> A recent change limits c++20 requirement to libcxx:
> https://github.com/apache/nuttx/pull/10860
> The owner of libcxx decided not to support the build of libcxx
Hi all,
I wrote a device driver for a i2c device.
There is a software from third party which at this moment cannot be made
part of nuttx.
I can edit makefiles to include code, but I think this not a right way to do
that.
What is the way to add code to the driver to make it easier to switch f
27 matches
Mail list logo