Dear Keil,
We are using the STM32F3 discovery board, and used the RTX with the demo code. When we compile, it says SVC_Handler multiply defined; Systick multiply defined etc.
I was wondering if you have met this problem before and know how to solve. Many of us have this problem.
Thanks. Jack
The fundamental problem seems to be the insistence on taking some bare-metal code which was never designed for an RTOS, and just dumping RTX onto it.
Even if SysTick can be kludged, there is a high risk that (as Per hinted) there will be other issues where this code is simply not right for RTOS use.
Or using the timer services provided by the OS?
"agree 100% would rather just trust what I am given and only resort to this if I cant get around it any other way"
If you have a library designed for use with a busy-loop. And you want to make use of this library together with an RTOS. Then it really is quite likely that you have to do something about the (now incorrect) assumptions in that library.
And you still haven't told us what issues you have with using other timer interrupts?
Modifying the OS MAY work, but it is not always or often the best way.
agree 100% would rather just trust what I am given and only resort to this if I cant get around it any other way
Rebuild the RTX library and call a function that you write from the rt_systick routine in rt_System.c. Place it just after the os_time++ line.
There are MANY ways to solve a problem. Some are better than others. Ones that do not work should not be considered. Modifying the OS MAY work, but it is not always or often the best way.
with out knowing about your system it looks like your trying to debounce a USB plugin event
so would ask the questions about your software design
Do you need to be systicks accurate (why not have a seperate RTX task that monitors and debounces IO states and sends events to tasks when the debounce events have occured)
If there are no other ways around it you can ( if you have the right Keil license) modify and change the RTX source and build you own RTX lib. I did before the os_get_time function was included in the RTX.
I can't see that you have given any reason why not any other timer interrupt can be used.
What we want, and what we have to do aren't always the same thing. What is stopping you from just fixing a working solution?
Hi Danny,
Cheers, at least someone has listening skills.
I want to use the systick handler routine (but it is built into RTX and cannot be accessed by user). Your method is along the lines but it's not an interrupt handler and I might miss ticks.
Is there a function to do that?
Many thanks, Jack
if your looking for something similar to a tick count why not use the something like the example in the online manuals for rtx e.g.
#include <rtl.h> BOOL init_io (void) { U32 ticks; ticks = os_time_get (); do { process_io (); if (io_ready()) { /* Success, IO initialized. */ return (__TRUE); } } while ((os_time_get () - ticks) < 10); /* Timeout, 10 ticks expired. */ return (__FALSE); }
Our vast team of experts have confirmed this.
I am underwhelmed with your leet skillz
I use the RTX and ST library on the Discovery board and they work fine together. The article you posted with the fix is the EXACT answer to your issue (as well as the first answer you received from the forum). It tells you how to use the RTX with the ST library. You are not following their explicit instructions. RTX MUST own the SVC, PendSV and SysTick Vectors. You cannot use other code that tries to use them. Some how you suggested that your "vast team of experts" confirmed that you cannot use the RTX with the ST library, yet we continue to do it every day. What are field are these people experts in? Or maybe your team HAS confirmed that YOU cannot use RTX with the ST library (meaning you are not capable of writing working code) That is not a Keil or ST issue. Write your code correctly and you will have no problem using RTX and the ST library on the Discovery board.
The "compiler engineer" is most probably not reading this forum. It's an end-user forum.
Besides - it isn't any "compiler engineer" who should be responsible for trying to get an RTOS implmenentation to be compatible with another company's code framework. The compiler is the program that processes source code. It doesn't care what that source code is actually intended to do.
Are you sure you don't mean that your usage of the ST libraries is not compatible with RTX?
Again, you can't take arbitrary, bare-metal code and just dump an RTOS onto it - the code has to be properly designed & structured to work within the chosen RTOS.
In other words, if you want to use the ST libraries with RTX then you have to do it in the way which is compatible with RTX.
Most processors have quite a number of timers. So it isn't a problem to use another timer to create tick handlers etc - things that should happen outside the domain of the RTOS task switching.
DearKeil,
When using the rtx, is there a way to access the systick handler function built inside the rtx? I need to increase a counter each time systick ticks.
Thanks, Jack
View all questions in Keil forum