As I can see, the keil compiler doesnt use regular stack for functions, and all the local variables inside functions are mapped in global memory. Is there a way, to make it behaive like a normal program should? I.E - create a local variables in ram,and destroy them, when the function ends? Thank you.
Ok, from the appnote: * If you use function pointers, you must adjust the calling tree manually. Exception: * If you only use an array of constant function pointers stored in code memory (which is pretty much a fancy way of implementing a jump table), the compiler and linker are usually smart enough to figure things out on their own. However, I think there's plenty of ways that will mess up the exception. Some clever person might, for example, modify the array of function pointers in code memory and still expect their code to work properly. Or they use the array in several different functions all over the place and still expect the compiler/linker to be able to follow their train of thought.
it seems to be time for the old one the '51 ain't no PC that should settle it. a footnote: this is about the '51, not about Keil. Whatever Keil does, the compiler can not change the architecture of the microcontroller Erik