View Single Post
  #6   Spotlight this post!  
Unread 13-03-2006, 19:03
ericand's Avatar
ericand ericand is offline
Registered User
AKA: Eric Anderson
FRC #3765 (Terrabots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: St. Paul, MN
Posts: 148
ericand is a jewel in the roughericand is a jewel in the roughericand is a jewel in the rough
Re: Please help: Memory allocation problem dealing with sections

Can't you have data bigger than 256 bytes if you edit the linker script to create some sections that are bigger? You might need
some pragma statements to allocate your data into a specific
memory location.

I think the compiler can generate code to address larger sections of data, it is just that it needs to know that the data structure does this, so it can do the right sort of addressing.

It seems to me that the linker script sets the sections to be 256 bytes since that will work for most people and it produces the quickest code since the data offsets fit into the instructions without the need to manipulate extra registers.