Hello
I'm doing some experiments with RTX to investigate how quickly it switches between tasks and how much of the time I can make the processor (STM32F103 sleep.
Following the advice in this thread (http://www.keil.com/forum/18158/) I've implemented a function in my code with the signature:
void rt_post_taskswitch (U32 task_id)
As I understand it, RTX should call this after a task switch however this never happens (the break point I've set in the function is never hit). I had a quick poke around the RTX source and I can see where the function is weakly declared and where it's called. Everything looks fine except my implementation of the function never gets called.
I suspect this is because the project is linking against the RTX library and unless I recompile RTX along with my project it'll never know I've implemented the function.
What's the neatest way to go about making this work?
Many thanks in advance, Al
I rather doubt that. More likely, you put your function in a sourcefile of its own, and made no other reference to it. So the linker saw no need to actually keep in the build, so it's no longer visible at the point it goes looking for a potential definition of that function. In that case, the weak fall-back definition inside the library might win. If you need more details, I would expect there to be special switches to get the linker to document its every step, so you see what's going on.