View Single Post
  #1   Spotlight this post!  
Unread 11-01-2007, 11:56
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
How much memory is there really?

Hi

I just started trying some algorithms for our arm, and ran into some memory problems. I want a big lookup array.

The linker barfed when I tried to declare an 800 BYTE array. So I started poking around in the MAP file.

It seemed that there was a lot of code space to spare (I was only utilizing 12%), so I tried declaring the array as "rom" to see if I could use code space for my lookup table (since it will never change).

Woo-Hoo. I can seem to define SCADS of space there: eg:

rom BYTE Omega[20000][2] ;

The map file verifies that this allocation is OK and ending up in the code space... so my question is:

Does this memory really exist in the RC?
In other words will the linker protect me from over declaring space?

I want to be sure that I'm not just being fooled by the compiler/linker.

Any experiences with large const data in the code memory?
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor