avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Re: [avr-gcc-list] Including a binary file as resource]


From: Bjarne Laursen
Subject: [Fwd: Re: [avr-gcc-list] Including a binary file as resource]
Date: Mon, 03 Jan 2005 15:47:14 +0100
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

Ebert, Rolf wrote:
[...]
You can try objcopy (part of binutils)

objcopy --input-target=binary --binary-architecture=i386
--output-target=elf32-i386 <inputfile> <output.o>

You then have to submit the generated object file to the linker.

I dunno about the i386 stuff, but:

avr-objcopy --input-target=binary --output-target=elf32-avr <input> <output.o>

seems to work just like the
........

The does file end up in the .data segment though. After some research I have 
added this rule to my makefile:

%.o: %.binres
        $(OBJCOPY) --rename-section 
.data=.text,alloc,load,readonly,code,contents \
      --input-target=binary --output-target=elf32-avr  $< $@

And then list the o-file with the other objectfiles.


I have not made code to read it yet, but it seems to link correct.
Thankyou for leading me on track,
Bjarne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]