summaryrefslogtreecommitdiff
path: root/apps/examples/README.txt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-25 22:10:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-25 22:10:56 +0000
commitd6b30f6e49779b31617fad8e8daa06470145f909 (patch)
tree7123939c22af75fef3c7ace3aaa486afdaf4b6d7 /apps/examples/README.txt
parent5ae419f6845ff28bcbdb339cdfb66f6b2e46f9ab (diff)
downloadpx4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.tar.gz
px4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.tar.bz2
px4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.zip
More ELF loader changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5261 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/README.txt')
-rw-r--r--apps/examples/README.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 763427e32..fa97bd64e 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -297,6 +297,53 @@ examples/discover
CONFIG_EXAMPLES_DISCOVER_DRIPADDR - Router IP address
CONFIG_EXAMPLES_DISCOVER_NETMASK - Network Mask
+examples/elf
+^^^^^^^^^^^^
+
+ This example builds a small ELF loader test case. This includes several
+ test programs under examples/elf tests. These tests are build using
+ the relocatable ELF format and installed in a ROMFS file system. At run time,
+ each program in the ROMFS file system is executed. Requires CONFIG_ELF.
+ Other configuration options:
+
+ CONFIG_EXAMPLES_ELF_DEVMINOR - The minor device number of the ROMFS block.
+ For example, the N in /dev/ramN. Used for registering the RAM block driver
+ that will hold the ROMFS file system containing the ELF executables to be
+ tested. Default: 0
+
+ CONFIG_EXAMPLES_ELF_DEVPATH - The path to the ROMFS block driver device. This
+ must match EXAMPLES_ELF_DEVMINOR. Used for registering the RAM block driver
+ that will hold the ROMFS file system containing the ELF executables to be
+ tested. Default: "/dev/ram0"
+
+ NOTES:
+
+ 1. Your top-level nuttx/Make.defs file must include an approproate definition,
+ LDELFFLAGS, to generate a relocatable ELF object. With GNU LD, this should
+ include '-r' and '-e main' (or _main on some platforms).
+
+ LDELFFLAGS = -r -e main
+
+ If you use GCC to link, you make also need to include '-nostdlib' or
+ '-nostartfiles' and '-nodefaultlibs'.
+
+ 2. This example also requires genromfs. genromfs can be build as part of the
+ nuttx toolchain. Or can built from the genromfs sources that can be found
+ at misc/tools/genromfs-0.5.2.tar.gz. In any event, the PATH variable must
+ include the path to the genromfs executable.
+
+ 3. ELF size: The ELF files in this example are, be default, quite large
+ because they include a lot of "build garbage". You can greately reduce the
+ size of the ELF binaries are using the objcopy --strip-unneeded command to
+ remove un-necessary information from the ELF files.
+
+ 4. Simulator. You cannot use this example with the the NuttX simulator on
+ Cygwin. That is because the Cygwin GCC does not generate ELF file but
+ rather some Windows-native binary format.
+
+ If you really want to do this, you can create a NuttX x86 buildroot toolchain
+ and use that be build the ELF executables for the ROMFS file system.
+
examples/ftpc
^^^^^^^^^^^^^