Replies: 5 comments 1 reply
-
What about a zero overhead C++ template solution:
You can then easily promote your function to a function with proxy by:
And then invoke them from anywhere with:
|
Beta Was this translation helpful? Give feedback.
-
I am still working on this, I will keep you posted, once it is ready to try. |
Beta Was this translation helpful? Give feedback.
-
Impressed that C++ features are or will be possible… maybe the bank switching via templates will be added to the easyflash library. Thank you |
Beta Was this translation helpful? Give feedback.
-
New release with template support for bank switch calls is up |
Beta Was this translation helpful? Give feedback.
-
Thank you, will try it … |
Beta Was this translation helpful? Give feedback.
-
Hello,
in my current project I'm using bank switching for easyflash quite intensive and it work well. If I have a function which need to be called from another bank I jump in the common memory via a proxy function and back. Example:
// Bank 1
void doSomething()
{
proxyCallSomethingFromBank2(1);
}
// Bank 2
void callSomethingFromBank2()
{
printf("Hello World");
}
// Main memory 0900-8000
__noinline void proxy callSomethingFromBank2(byte callBank)
{
eflash.bank=2;
callSomethingFromBank2();
eflash.bank=callBank;
}
Therefore I have to write a lot of proxy functions, to allow calls between easyflash banks. I think to compiler could already provide these proxy functions (or the main area) for me. i.e. I could simply "port" existing C code without writing proxy functions. This would help me a lot.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions