Im having some problems with code banking, regarding to passing functions adresses as parameters. for example:
void func ( void(*ret_func1)(void), void(*ret_func2)(void))
Imagine that several functions (placed on all banks) call the function "func" and pass the 2 return adresses, that are on diferent banks that "func".
It makes my program halt or reset(depending on the situation).
How can i make this work?
Im using c51 v7.03, and a silabs 8051F120 processor.
thanks for any help,
thanks Oleg, but I,ve already readed this article, and it does not answer my question.
My system is already working with code banking, my only problem is passing functions adresses as parameters to other functions in different banks.
Sorry about my english, I'm not sure if i've been clear.
By default, the linker creates intra-bank entries for all functions called thru a function pointer. So, the only thing you need to consider are the standard ramifications of using function pointers.
Refer to Application Note 129 (http://www.keil.com/appnotes/docs/apnt_129.asp) for complete details.
This answers your question:
View all questions in Keil forum