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

why after deleting some functions, the IData Space overflow!

I got a demo sources from our chip vendor.
It can be compiled successfully!
However, after I comment out some functions, the compiler says that IData Space overflow. When I check the MAP file, I find that there is no ?STACK. Why?

I donot add any new file to the project, nor drop any file from the project. I only comment out several function calls in a file.

Why? Thanks a lot!

Parents
  • thanks! But can you tell me why this method can work?

    Suppose I donot define USE_FOO, then the call to function and the function implementation are not included, which is the same as that I delete the call to function and the function implementations.


    Because the linker assign space outside the call stack to functions that are not called. Thus a function called from main() only will typically not use any space for its variables (other functions have reserved the space) whareas, if it is not called the space for the variables will be added at the end of the call stack.

    Erik

Reply
  • thanks! But can you tell me why this method can work?

    Suppose I donot define USE_FOO, then the call to function and the function implementation are not included, which is the same as that I delete the call to function and the function implementations.


    Because the linker assign space outside the call stack to functions that are not called. Thus a function called from main() only will typically not use any space for its variables (other functions have reserved the space) whareas, if it is not called the space for the variables will be added at the end of the call stack.

    Erik

Children
No data