Quote:
|
Originally Posted by dcbrown
Our real lookup table could be a couple kbytes in size, having this replicated in the system a bunch of times might not be a good thing.
Looking for additional guidance.
Thanks,
DCBrown
|
My explanation was kind of unclear. You're right, that each time the include file with the variable definition is listed, it will be included in your output file.
There is a new version of EasyC that will be availble shortly (by next week, I'd think) that will let you link your programs with an external object file. Then the idea is to create a C source file in MPLab with your table, compile it, and add that object file into the build in EasyC (next version). The table will only be allocated once, since the definition of the table only appears in that object file.
Then make your include file only contain an extern for that table and whatever types you need to make it work. That file won't generate any memory since there is only an extern declaration and not the table itself.