data section start 0x60 -> 0x100

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The linker files have the start address for the data section set to start at 0x60 but some of the newer devices start at 0x100.

I was unable to determine the method used to corrected this during the linker stage. Could someone shed some light on this please.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think its passed as an option to the linker from gcc, which 'overrides' the default address of 0x800060 (if needed).

I haven't been able to find where in the gcc source this is coming from, though.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> I haven't been able to find where in the gcc
> source this is coming from, though.

Essentially, from the so-called "specs". They can be placed in an external
file, and if that file is missing, a builtin version of the specs will be
used. These specs define some kind of "option dispatcher" so certain backend
options will be matched with the frontend options (namely, the -mmcu option
here).

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, thanks for that info Jörg. I started looking around again and stumbled upon the 'C:\WinAVR\lib\gcc\avr\3.4.6\specs' file. Under '*link:' it lists all the avr's that need '-Tdata 0x800100' or '-Tdata 0x800200'.

One more piece of a big puzzle now in place.