Hello
You could make a C program, this program would be based on Linux commands.
execl takes the full path name of the command and variable length of arguments terminated by NULL:
execl(“/bin/ls”, “/bin/ls”, “-r”, “-t”, “-l”, NULL);
where the second argument is argv[0], but can be any string!
execlp will try to find the command from $PATH, so full path to command is not needed:
execl(“ls”, “ls”, “-r”, “-t”, “-l”, NULL);
execv is the equivalent of execl, except that the arguments are passed in as a NULL terminated array:
char *args[] = {“/bin/ls”, “-r”, “-t”, “-l”, NULL };
execv(“/bin/ls”, args);
execvp is the equivalent of execvl, excep that the arguments are passed in as a NULL terminated array:
char *args[] = {“ls”, “-r”, “-t”, “-l”, NULL };
execv(“ls”, args);
You could check the linux command “stty” to set the console to the serial port.
for example raw serial cominicacion:
stty -F / dev / raw ttyNS0 9600
You could check the other settings that allows linux command “stty” in case you need to change the port speed or remove different echo.
example:
stty -F / dev / raw ttyNS0 38400 -echo -echok
to view the current configuration of your console serial port you could use:
stty -a -f / dev / ttyNS0
to send to the serial port:
echo “hello world”> / dev / ttyNS0
for the serial port:
cat / dev / ttyNS0
DIGIESP in the project settings you must select “keep silent mode” for u-boot console, and also you must remove the serial console option in the kernel configuration. (Character devices)
it is necessary to run the first time in Cosola u-boot command:
setenv silent yes
saveenv
then the console will remain silent.