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

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

[avr-gcc-list] RE: Strings in ROM


From: Weddington, Eric
Subject: [avr-gcc-list] RE: Strings in ROM
Date: Tue, 17 Mar 2009 21:55:14 -0600

 

> -----Original Message-----
> From: Robert von Knobloch [mailto:address@hidden 
> Sent: Tuesday, March 17, 2009 4:33 AM
> To: address@hidden; Weddington, Eric
> Subject: Re:Strings in ROM
> 
> From: Eric Weddington:
> 
> This sounds like a linker error. It would help if you could 
> post the actual output from the toolchain.
> 
> OK Eric, here goes. I have shortened everything to make it 
> more readable (and less boring).
> There are 10 sections of each type in fact.
> 
> The result of 'Make' is:
> 
> 
> address@hidden:~/Version 0.8> make
> avr-gcc -g -Wall -Os -mmcu=atmega644 -DF_CPU=20000000      -c 
> -o main.o
> main.c
> tests.c:227: error: press_button causes a section type conflict
> make: *** [main.o] Error 1
> address@hidden:~/Version 0.8>
> 
> Where the makefile contains:
> 
> PRG            = main
> OBJ            = $(PRG).o
> MCU_TARGET     = atmega644
> OPTIMIZE       = -Os
> 
> F_CPU        = 20000000   
> 
> DEFS           = -DF_CPU=$(F_CPU)
> LIBS           =
> 
> CC             = avr-gcc
> 
> CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
> LDFLAGS       = -Wl,-Map,$(PRG).map \
>         -Wl,--section-start=.test0=0x2600 \
>         -Wl,--section-start=.testparms0=0x2e80 \
>         -Wl,--section-start=.test1=0x2f00 \
>         -Wl,--section-start=.testparms1=0x3780 \
>         -Wl,--section-start=.flashimage=0x8000 \
>         -Wl,--section-start=.bootloader=0xe000 \
>         -Wl,--section-start=.functions=0xff00

I would suggest that you use a custom linker script instead of the above list 
of --section-start flags. The kind of stuff that you're doing in your code 
really warrants a custom linker script. 




reply via email to

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