This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Placing binary file into RAM on target
- To: wjasper at tx dot ncsu dot edu
- Subject: Re: [ECOS] Placing binary file into RAM on target
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 26 Jul 2001 19:34:14 +0100
- Cc: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <200107261817.OAA24971@lx10.tx.ncsu.edu>
Warren Jasper wrote:
>
> Does anybody know of a way to place an arbitrary binary file into
> SDRAM on a target if one is running gdb stubs? I am running a
> Intel StrongARM SA1110, and would like to load a program into
> FLASH via eCos (as opposed to JTAG via a parallel port with JFLASH).
>
> gdb will only load elf type files, so I guess one option is to convert a
> file into "elf" and have the loader put it into memory. Is there an easy way
> to do this or a better way?
echo > foo.c
arm-elf-gcc -c foo.c
arm-elf-objcopy --add-section .loadme=mybinfile foo.o
arm-elf-objcopy --set-section-flags .loadme=alloc,contents,load,data foo.o
Probably anyway :). Close enough for you to work out the rest on your own.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine