Context-Switch Time and every Task in a own File and

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Context-Switch Time and every Task in a own File and

    Hallo,

    I am student and compare different RTOS for a Cortex-M3 (LPC1768 from NXP) and Keil compiler. At the moment I'm checking the Segger embOS.

    To measure the context-switch-time I used the scope example comes with the evalversion of the embOS. My results are 4,66 µs with 72 MHz Core-Clock and 3,2 µs with 100 MHz Core-Clock. If I calculate correctly, they are round 320 CPU-Cycles. Is this a realistic time? What was the Core-Clock by your test for Cortex-M3 shown here?

    Furthermore, I want every task placed in an own C-File. But it doesn’t work. I have made a header with the prototype of every task (like I do for any C-function). But if I link the project the Keil linker reports: "Undefined symbol "Taskname" (referred from main.o)" and that for every task. In the main.c file I use just the OS_CREATETASK() with the "symbol" of the Taskname. If I put all tasks together with the main function in one C-File it works fine.
    What's my mistake? Do you have an example with the tasks in different files?

    Greetings
    Martin
  • Hello Martin,

    yes, this is a realistic time. We measured with 60 MHz a context switch time of 5.1 usec.

    Your second question seems to be more a problem with C language and it is not related to embOS.
    I don't have a sample right now but it should not be a problem to support you with a sample where the task functions are in their own C files.
    Maybe you want to contact us directly, so I will be able to send you a Keil project.

    Regards,
    Til
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Til,

    you are right, just a blunder in C. I used the task routines from your example and they are all "static" defined. With static that can't work in another C-File.

    Thank you for Help and Information

    Martin