This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Placing binary file into RAM on target


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]