Mystery solved.
It does not even try to load the elf file from file-system, it
directly
goes to the built-in app.
That means that it failed to load the app on the file system. It
should
check in this order"
- Load file from file system if possible
- If not, run built-in application if possible
- If not, run NSH command line command if possible
- If not, report that the command was not found
so if you are seeing the second action, it means that the first
failed. You can load FS and Binary loader error debug output to see.
Yes Greg, got that, I already enabled all binary loader debug output
(warnings+info).
I'll post my console output below, were you can see that the first call
of hello, there seems to be no attempt at all to call the elf file.. it
seems exec_builtin() is calling directly task_spawn() which calls the
built-in app..
The correct behavior of NSH was broken by this PR in apps:
commit 9a28ccf836c1b9f0eb5e1163964042eddc207697
Author: chao.an <anc...@xiaomi.com>
Date: Fri Feb 21 09:54:47 2020 +0800
nsh/parse: try the builtin configuration first
In the case of enable the BUILTIN_APPS/FILE_APPS at the same
time, try the builtin list first to ensure that the relevant
configuration(stacksize, priority) can be set normally.
Because of that bad change, you will no longer be able to replace built
in applications with applications on a file system. So sad. That
change ruined one of the most important features of the ELF loader.
You can back that out and try again. That really should be fixed. If
you get it working submit a PR for discussion.
Greg