diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-05-09 12:30:07 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-05-09 12:30:07 -0600 |
commit | 2992f82c56ff672531fd152c89e783c6fc2daec0 (patch) | |
tree | 9c640841e6e562f9e98e154ea68d97cb2c211f45 /nuttx/binfmt | |
parent | db7257ad4894df88a59100a8849b156029fbcf21 (diff) | |
download | px4-nuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.tar.gz px4-nuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.tar.bz2 px4-nuttx-2992f82c56ff672531fd152c89e783c6fc2daec0.zip |
Move prun from interpreters/ to system/; And an NSH built-in appliation that can be used to execute P-Code files from the NSH command line
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/libpcode/README.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nuttx/binfmt/libpcode/README.txt b/nuttx/binfmt/libpcode/README.txt index f42a4f54f..d8fcc7f32 100644 --- a/nuttx/binfmt/libpcode/README.txt +++ b/nuttx/binfmt/libpcode/README.txt @@ -120,3 +120,37 @@ Here is a simple test configuration using the NuttX simulator: world example like: nsh> hello.pex + +Issues +------ + +1. As implemented now, there is a tight coupling between the nuttx/directory + and the apps/ directory. That should not be the case; the nuttx/ logic + should be completely independent of apps/ logic (but not vice versa). + +2. The current implementation will not work in the CONFIG_KERNEL_BUILD. + This is because of the little proxy logic (function pcode_proxy() in the + file pcode.c). (a) That logic would attempt to link with P-code logic + that resides in user space. That will not work. And (2) that proxy + would be started in user mode but in the kernel address space which will + certainly crash immediately. + +The general idea to fix both of these problems is as follows: + +1. Eliminate the pcode_proxy. Instead start a P-Code execution program that + resides in the file system. That P-Code execution program already + exists. It is in apps/system/prun. This program should be built as, + say, an ELF binary and installed in a file system. + +2. Add a configuration setting that gives the full path to where the pexec + program is stored in the filesystem. + +3. Modify the logic so that the P-Code execution program runs (instead of + the requested program) an it received the full path the the P-Code file + on the command line. This might be accomplished by simply modifying the + argv[] structure in the struct binary_s instance. + +4. Add a task start hook to the program. Here is where we can setup up the + on_exit() function that will clean up after the P-Code program terminates. + +There are many other smaller issues to be resolved, but those are the main ones. |