|
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.
|