Hi Greg and Alan,
> > 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.. Then I just download and call renamed app (from hello to hello2), and the binary loader works fine: nsh> dmesg elf_initialize: Registering ELF exec_spawn: ERROR: Failed to load program 'ls': 2 exec_spawn: ERROR: Failed to load program 'ls': 2 exec_spawn: ERROR: Failed to load program 'dmesg': 2 nsh>ls /mnt/ramdisk: hello nsh>hello Hello, World!! nsh>dmesg exec_spawn: ERROR: Failed to load program 'ls': 2 exec_spawn: ERROR: Failed to load program 'dmesg': 2 nsh> nsh>wget http://192.168.1.115:8000/hello2 nsh>ls /mnt/ramdisk: hello hello2 nsh>hello2 Hello, World ELF!! nsh> dmesg exec_spawn: ERROR: Failed to load program 'wget': 2 exec_spawn: ERROR: Failed to load program 'ls': 2 load_absmodule: Loading /mnt/ramdisk/hello2 elf_loadbinary: Loading file: /mnt/ramdisk/hello2 ......... It seems something internally of the nsh is not configured right, something like symbol table (although I'm working without symbol tables..) Tried that with 9.0.0 release branch and also with the latest master branch.. using hello app to have the most simple case.. Using the original defconfig, just adding the elf and the debug stuff.. Will go on testing, maybe first make a shell script to automatize all those steps (make export, make elf, etc..), fatigue danger :-D This is something which has worked well before.. Thanks & BR, Florian > > > > > Funnily, it does try to load the nsh embedded tools: > > exec_spawn: ERROR: Failed to load program 'ls': > > -2 > yes, this is normal behavior. Se you can see from the steps above, > ALL > commands will try to load from the various locations and you will > see > the errors. But they are not "real" errors. > > > > If I do not compile the app as a built-in app, the binary loader > > will > > load it: > > load_absmodule: Loading > > /mnt/ramdisk/Neo_Ledtest > > elf_loadbinary: Loading file: > > /mnt/ramdisk/Neo_Ledtest > > elf_init: filename: /mnt/ramdisk/Neo_Ledtest loadinfo: 0x2000a4cc > > Which shows that the CONFIG_BINFMT_EXEPATH=y and > > CONFIG_PATH_INITIAL ar > > e correctly set, and the elf file is also working correctly.. > > I never had this situation before... > It shouldn't work that way