AnsweredAssumed Answered

running out of ram (L1102) on MC9S08JM16CGT

Question asked by Gary Z on Apr 30, 2012
Latest reply on May 2, 2012 by Gary Z

So I am having some trouble updating a fairly old program onto this microprocessor.  Basically, what I have is a big list of #defines for some strings and #define integers. then, I have about 80 arrays (const char) ranging in sizes from 1 to 11, that use those #defines integers as well as some other numbers  Then, i have 4 sets of arrays of arrays that hold the previous arrays arranged, and 4 sets of arrays that hold the #defined strings (const char *)  Yes I am aware that this is a very bad way to do it, but I was instructed to maintain the structure of the original code as closely as possible.  All of these declarations are done at the top of my code.  I also have two variables.  Within my code, based on certain conditions, i set one variable to one of the 4 in the first set, and the other to one of the 4 in the second set, and work with it.  Having all 4 conditionals (tried both switch and if) causes me to have an out of ram error, taking 1 of the conditionals (doesnt matter which one) out lets the program compile.

 

In short, i think i just need to know how to make sure my consts are stored in program memory and not ram but i included all info in cases I am missing something else.

Outcomes