Hi all.

I'm new in embedded system world, especially avr.

When I tried to move data section to specific location like this,

avr-gcc -g -Os -o hello.elf hello.o arch/avr/uart.o -mmcu=atmega128
-Wl,-Map,hello.map,-Tdata=0x801100,--defsym=__heap_end=0x80ffff

It is built without any error.

But when I look into the hello.od file which made by avr-objdump, it says
data section is still on 0x800100.

To solve this, I even used link script. Like following,

.mysection 0x802000: AT (LOADADDR (.text) + SIZEOF (.text))
  {
     PROVIDE (__begin_mysection = .) ;
     *(.mysection)
     PROVIDE (__end_mysection = .);
  }  > data

  .data 0x801100: AT (LOADADDR (.mysection) + SIZEOF (.mysection))
  {
     PROVIDE (__data_start = .) ;
    *(.data)

....

But again, data section is still on 0x800100.
I really want to move data section to external memory, or internerl memory
but somewhere not the basic location 0x800100.

Is there something wrong with me?
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to