View Single Post
  #35   Spotlight this post!  
Unread 22-01-2006, 21:10
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Mark McLeod
The linker will only allow you to define a total of 256 bytes of global (or static) variables within any single project file. Individual routines within a file, such as user_routines.c, are each limited to 120 bytes of local variables.

If you want to create lookupTable[256], it'll need to be defined in another file off by itself and referenced from user_routines.c as an extern.

Or as you implied define all the values up front and make it a rom const, then you can be as large as you have program space for.
Thanks very much for the help, Kevin and Mark.

making it this

Code:
final unsigned char lookTable[255] = {1,2,3,4,5,6...254};
Is probably what I want, as I have no reason to want to modify those values.

I wish I weren't taking Java, I get confused. in Java class I write printf s and in FRC I write System.out.println s.

Anyway, thanks again for all the help and valuable instruction (and timely responses!)

Paul