aboutsummaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-26 02:42:39 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-26 02:42:39 +0000
commit7f2512627e20e6b07ee2cd1f08e8ba9f07f3cb42 (patch)
tree0ffd14523bd45197f366cb232d8f05f3d91f5c35 /apps/examples
parent247e94d02aaac98b5e8007f8d47f68072cadc69d (diff)
downloadpx4-firmware-7f2512627e20e6b07ee2cd1f08e8ba9f07f3cb42.tar.gz
px4-firmware-7f2512627e20e6b07ee2cd1f08e8ba9f07f3cb42.tar.bz2
px4-firmware-7f2512627e20e6b07ee2cd1f08e8ba9f07f3cb42.zip
Rename elf.h to elf32.h; Additional ELF loader changes
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5263 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/README.txt8
-rw-r--r--apps/examples/elf/elf_main.c2
-rw-r--r--apps/examples/nxflat/nxflat_main.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index fa97bd64e..95d49a3fb 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -344,6 +344,14 @@ examples/elf
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.
+ 5. Linker scripts. You might also want to use a linker scripts to combine
+ sections better. An example linker script is at nuttx/binfmt/libelf/gnu-elf.ld.
+ That example might have to be tuned for your particular linker output to
+ position additional sections correctly. The GNU LD LDELFFLAGS then might
+ be:
+
+ LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/libelf/gnu-elf.ld
+
examples/ftpc
^^^^^^^^^^^^^
diff --git a/apps/examples/elf/elf_main.c b/apps/examples/elf/elf_main.c
index 5699dd284..3a6eae9d9 100644
--- a/apps/examples/elf/elf_main.c
+++ b/apps/examples/elf/elf_main.c
@@ -174,7 +174,7 @@ int elf_main(int argc, char *argv[])
/* Create a ROM disk for the ROMFS filesystem */
message("Registering romdisk at /dev/ram%d\n", CONFIG_EXAMPLES_ELF_DEVMINOR);
- ret = romdisk_register(CONFIG_EXAMPLES_ELF_DEVMINOR, romfs_img,
+ ret = romdisk_register(CONFIG_EXAMPLES_ELF_DEVMINOR, (FAR uint8_t *)romfs_img,
NSECTORS(romfs_img_len), SECTORSIZE);
if (ret < 0)
{
diff --git a/apps/examples/nxflat/nxflat_main.c b/apps/examples/nxflat/nxflat_main.c
index 2c0030c60..638e960a0 100644
--- a/apps/examples/nxflat/nxflat_main.c
+++ b/apps/examples/nxflat/nxflat_main.c
@@ -167,7 +167,7 @@ int nxflat_main(int argc, char *argv[])
/* Create a ROM disk for the ROMFS filesystem */
message("Registering romdisk\n");
- ret = romdisk_register(0, romfs_img, NSECTORS(romfs_img_len), SECTORSIZE);
+ ret = romdisk_register(0, (FAR uint8_t *)romfs_img, NSECTORS(romfs_img_len), SECTORSIZE);
if (ret < 0)
{
err("ERROR: romdisk_register failed: %d\n", ret);