SEGGER - Martin Administrator

  • Member since Jul 1st 2014
Last Activity

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

  • fiopel -

    Hello Martin SEGGER

    I have a problem with the product embOS of SEGGER.

    Description error:
    The OS_Start() function does not work. When I go through main() with the IAR debugger step by step, the debugger gets stuck in the OS_Start() function.

    I copied the code from the Manual Real-Time Operating System User Guide & Reference Manual from SEGGER page 40. I suppose, that the code in this manual is working.

    Question:
    Do you have an explanation why the debugger gets stuck in the OS_Start() function?

    I have a ScreenShoot. But I don't know, how I can add it to this forum.

    Used HW: EFM32GG11 Giant Gecko Starter Kit

    Greetings
    Fiorenzo Peloso

    Fiorenzo.Peloso@altran.com

    Altran AG
    Zürich, Switzerland

    Code:

    #include "RTOS.h"

    static OS_STACKPTR int StackHP[128], StackLP[128]; // Task stacks
    static OS_TASK TCBHP, TCBLP; // Task control blocks

    static void HPTask(void) {
    while (1) {
    OS_TASK_Delay(50);
    }
    }

    static void LPTask(void) {
    while (1) {
    OS_TASK_Delay(200);
    }
    }

    /*********************************************************************
    *
    * main()
    */
    int main(void) {
    OS_Init(); // Initialize embOS
    OS_InitHW(); // Initialize required hardware
    OS_TASK_CREATE(&TCBHP, "HP Task", 100, HPTask, StackHP);
    OS_TASK_CREATE(&TCBLP, "LP Task", 50, LPTask, StackLP);
    OS_Start(); // Start embOS
    return 0;
    }

    • SEGGER - Martin -

      Hi Fiorenzo,

      Thank you for your inquiry.
      I will contact you via email in a few minutes.

      Best regards,
      Martin