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 <cmd> [arguments]
Where <cmd> is one of:

There are several confusing things here.

/bin/i2c is the I2C tool, obviously.  How did it get into /bin? Are you using binfs? binfs will allow you to mount a "fake" file system that exposes the so-called "built-in tasks" as executable files of a file system. execv() and friends will only work on executable files.

More typically, executable files would be ELF modules in a real file system in FLASH or on and SD card but binfs fakes a compatible environment.

ls, one the other hand is not a built-in task.  It is not a task at all and can't be executed from execv().  It is an NSH command that can be executed only from the command line.  Even if you have binfs, it should not exist under /bin.

Reply via email to