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

LPC2468 RTX KERNEL

I am using rtx kernel and mdk 3.50 with LPC2468. i am facing a problem in my software. The Main function is keep on called by somewhere or it is keep on resetting.

control is always coming to os_sys_init() and it is runnig in disassembly. the main function is given below

int main (void) { os_sys_init (job1); while (1);
}

can anyone help me regarding this issue?

Parents Reply Children
  • In the RTX every task has its stack, that used to keep local variables and save task context (registers) in task switching.
    If any task get overflow from its stack, probably data in other task's stack will damage, and when RTX will restore context in task switching you will got bad values in your PC register (R15) and you will go into PAbt (or DAbt if stack register (R13) got damage.

    Look at Call graph to estimate task's stack needs (.htm file in the project's Object directory), but take into account that some function does not calculate there (for example - calling to printf family function take much more stack space from Call graph estimation, sometimes more then 200 bytes).

    According to this information, change task's stack size - either by changing the default for all tasks in RTX_Config.c or allocating user stack to task with os_tsk_create_user function.

  • thank u. i will try and come back to u.