James Millard

Constants in banked ROM

Discussion created by James Millard on Jun 1, 2010
Latest reply on Feb 10, 2011 by ROBERTO BERNER

I'm using the MC9S08QE128 with CodeWarrior (latest version), banked memory model -- I'm probably going to need most of the 128K.

 

There are a number of threads on constants in banked ROM.  Most, if not all, say that constants need to be in the non-banked ROM.  Is this true?  I am writing a program with a lot of constants (>30K -- lots of proprietary data) so I can't fit it all in non-banked ROM.  I only have about 1/3 of the data compiled in and I'm already getting a linker error:

 

L1102: Out of allocation space in segment ROM at address 0x7FC6

 

which I interpret as too much data since the code that I have in that space is minimal (the map file shows the code to be much less than a few K, but lots of constants).  Is that a correct assumption?

 

I have added ROM1 to the non-banked memory in the prm file which seems to have cleared the linker error, but I'm afraid this is a temporary fix and it will fail when I get the rest of the constants into the code.

 

Any help would be greatly appreciated.

 

Thanks!

 

Brad

Outcomes