Microchip c18 placing rom data in idata

28 views Asked by At

I have a project that was released as a product, last code update about 4 years ago. Compiled with MicroChip C18 (I also have XC18 available but that's another story). I am attempting to get it to recompile to the same working executable preparatory to making some upgrades. I have a large fixed data structure, declared with the rom keyword, but C18 keeps trying to put it in iData, where it obviously cannot fit. I have checked for bogus redefines of the rom keyword, and the compiler manual is very clear that this should be placed in rom only, vs. initialized data which would have space allocated in ram, with initialization values in rom. I've been tearing my hair out on this one for a couple weeks now. Any hints welcome!

I have tried #undef ROM (which is in fact defined as rom) and redefining it locally, as well as various combinations of rom and const. Also played with memory models; this application clearly requires large model for both program and data.

0

There are 0 answers