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?
did you try to place a break point in your exception handlers? btw, the "while(1)" is redundant.
Yes. But the control is not coming to while(1) STATEMENT. the control is running in following statement of startup code.
PAbt_Handler B PAbt_Handler
any other info?
PAbt_Handler is the Prefetch Abort handler
The processor jumps to this location when you try to execute code from an invalid memory address.
Thanks for ur reply. But i have to solve it. can u help me? how do i solve this problem????
try to subtract 8 from the value of R14 when in the exception handler. that might tell you which instruction in the program caused the failure.
Thank u. I will try it out and come back to u.
tell me if any other solution is there..........
Executing code from the wrong location is a very vague failure and quite program specific. As Tamir says you need to identify the instruction that tries to call the invalid memory address to give yourself an idea as to the cause of the problem.
don't be surprised if you end up digging in 'rt_list.o' or something. that usually happens if a wild pointer has damaged kernel data. aren't you dieing to have a checksum computation for the RTX kernel data structures? if so, bother Keil support...!
I tried my level best. still problem is there. can u post some example code for lpc2468 rtx kernel.......
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.