OS_InitKern generate OS_Error 153

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

  • OS_InitKern generate OS_Error 153

    Hi,

    I use embos v320d and when I execute the function OS_InitKern(), an OS_Error occured (153 : OS_ERR_DICNT).

    I don't understand why? Any proposal to investigate?

    thanks
    Images
    • Functions execution history.GIF

      19.07 kB, 383×315, viewed 952 times
  • Hello,

    could you please check the value of OS_Counters before the call of OS_InitKern() and in OS_Error()?

    Are you sure that your startup code zeros your non initialized variables?

    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,

    thanks for you answer. To be sure that the OS_Counters variable is set to zero I add some code in the startup.

    Now I have in my main routine, on a OS_CreateRSema() call, the error 161 : "illegal call from a timer" raised but there is no timer??

    I notice also that OS_InitKern() turn the interupt flag on. Is it normal?

    I wonder if the version 3.20d that I use is compatible with the M16c65 or maybe recompilation of the library is necessary?

    Regards.
  • No, please ensure that not only OS_Counters is set to zero but all your not initialized variables must be set to zero by the startup code!!
    A standard startup code should do this, did you make any other modification to the startup code?

    This is C standard and is important for embOS, otherwise you will get more errors.

    Could please tell me which compiler do you use and if you have valid license.
    embOS V3.20d is very old, so you could think about to renew your license (which is not really expensive),
    which this you will get technical support and the latest M16C embOS version 3.80. We ware just working on
    M16C/IAR version 3.80 and it will be released in the next days, so a trial version will be available on our website soon.

    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.
  • Thanks, you are right! I have to investigate this way. In fact few day ago I remember that I have had to add some memory segment (UDATA0, IDATA0....) that the linker needs! OS_Variable are mapped in UDATA0 but that default cstartup that I use for the m16c65 do not initialize the segment that I have to add.

    I keep you informed.

    Regards

    PS : I use IAR compiler v3.40.1