I have a program which works fine in small memory model. The program is growing beyond the 2K boundary and I want to switch to the Large model. When I switch to large model, the program stops working. I also tried it with a working code which is less than 2K. The only thing I do is set the memory model to large 64K code. Am I supposed to do anyting else? Thanks. -sam
You don't need to change the memory model as all this affects is the default memory space used for variables. Generally speaking you should always use the small model. You do need to change the 'code ROM size', however. I suspect the reason your code no longer works is because you have changed the memory model and your variables are now being located in non-existent external RAM.
Thanks Steffen, I will try this. I thought that if the code is larger than 2K, I can not use small model.
Or leave the model as small an break it up into 2 or more C modules.
View all questions in Keil forum