This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IDATA overflow

Hello!

I am using a 80C537 which has 256 bytes of IDATA memory. Now, if the software "tries" to allocate more than 256 bytes of IDATA through nested function calls, the program hangs up... which is understandable.

But is there a way to get a warning or any kind of information about these situations?
I guess it's almost impossible for C51 to determine how functions are called in every situation.
What's a good way to prevent this, besides putting everything in XDATA and forget about IDATA?

Thank you!
Holger

Parents
  • I guess it's almost impossible for C51 to determine how functions are called in every situation.

    It's actually the Linker which does this; and it makes a pretty good job - search the knowledgebase for articles on Overlaying.

    The big problem is with functions called via interrupts and pointers (function pointers is covered in a couple of articles/app notes).
    There are linker controls to "manually" tell the linker about these situations - see the manual & those articles.

Reply
  • I guess it's almost impossible for C51 to determine how functions are called in every situation.

    It's actually the Linker which does this; and it makes a pretty good job - search the knowledgebase for articles on Overlaying.

    The big problem is with functions called via interrupts and pointers (function pointers is covered in a couple of articles/app notes).
    There are linker controls to "manually" tell the linker about these situations - see the manual & those articles.

Children
No data