[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Missing Section
From: |
Erik Christiansen |
Subject: |
Re: [avr-gcc-list] Missing Section |
Date: |
Fri, 5 Oct 2007 12:22:13 +1000 |
User-agent: |
Mutt/1.5.9i |
On Thu, Oct 04, 2007 at 09:05:00AM -0700, Gre7g Luterman wrote:
> --- Erik Christiansen <address@hidden> wrote:
>
> > What does "avr-objdump -h" say about .update?
>
> $ avr-objdump.exe -h RIO-15C/RIO-15C.elf | grep update
> 0 .update 000001a6 00001e40 00001e40 00001f24 2**0
Err, I was hoping to see the next line too, 'cos the section attributes
might just provide the clue. ;-)
> > The linker script snippet for .update would be
> > useful too.
>
> /* Default linker script, for normal executables */
[snip]
OK, your linker script doesn't differ in substance from mine.
> Were the sections created with just a .S file? Custom
> sections work fine for me also... as long as there is
> one or more .c files in that section.
With a bunch of .s files. My makefile just did:
CC = avr-gcc
CFLAGS = -g -x assembler-with-cpp -mmcu=atmega64 -DMCU=atmega64
AS = avr-as
ASFLAGS = -gstabs -mmcu=atmega64
LD = avr-ld
LDFLAGS = -M -T ../ld.lnk
%.o: %.s
$(AS) -I$(INC_DIR) $(ASFLAGS) -o $(OBJDIR)/$@ $<
%.o: %.c
$(CC) -I$(INC_DIR) $(CFLAGS) -c -o $(OBJDIR)/$@ $<
( cd $(OBJDIR) ; $(LD) $(LDFLAGS) -o all.elf app.elf bootloader.elf >
all.map)
avr-objcopy -O binary obj/address@hidden obj/address@hidden
avr-objdump -D obj/all.elf > obj/all.lst
avr-objcopy -O srec obj/address@hidden obj/address@hidden
avr-objcopy -O ihex obj/all.elf obj/all.hex
But that project has no .c files, so avr-gcc is not invoked at any
stage. avr-as and avr-ld are used directly. Everything cruised smoothly,
including my .boot section. (I've also used .elephant for various
experiments.)
Erik