This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SVC_Handler multiply defined

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

Parents
  • 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);
    }
    
    

Reply
  • 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);
    }
    
    

Children
  • 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

  • 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?

  • 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.

  • 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.

  • 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

  • "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?

  • Or using the timer services provided by the OS?

  • 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.