[ECOS] Load a file into memory
Jesper Skov
jskov@redhat.com
Wed Feb 20 00:15:00 GMT 2002
On Wed, 2002-02-20 at 05:16, Cristiano Ligieri Pereira wrote:
>
> Hi all,
>
> I have an application which needs to read some data previously written
> into RAM memory. For example, lets say I have an image decompression
> application but I can't read the image file from anywher on the fly. I
> have to read it from some specific memory position and them process it.
>
> Can I load a data file (image, for instance) into my RAM memory using gdb
> and them load and run the ecos application, which will in turn read the
> file from memory and decode it?
Create an ELF file from the binary data:
echo > foo.c
arm-elf-gcc -c -o foo.o foo.c
arm-elf-objcopy --remove-section=.text foo.o
arm-elf-objcopy --add-section=.text=thebinfile foo.o
arm-elf-objcopy --set-section-flags=.text=alloc,load,code,contents,readonly foo.o
then use objcopy with --change-address to change the data's location.
Finally, load it with GDB (file + load commands), load the app (file +
load), and start the application.
Jesper
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list