View Single Post
  #34   Spotlight this post!  
Unread 22-01-2006, 19:58
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,861
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: 2006 CMUcam2 Code

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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-01-2006 at 20:13.