May 14, 2019 at 17:24 #26388
i ported micrum os to a NXP-LPC1768 MCU on a Landtiger V2.0 board, after the developing of the application and i noticed it works in debug mode while in free running mode it is stucked in an Hard fault infinite loop, what should i do? i think it is a memory problem, maybe the interrupts are mapped wrongly or something like that.
All suggestions are accepted
Thanks in advanceSeptember 6, 2019 at 14:57 #27291September 7, 2019 at 08:25 #27297
In the debug mode the system is able to work, the tasks are running. In the run mode the OS is apparently blocked in a task which causes an Application Hard Fault ( an infinite loop ).
There is no difference between the code of debug and run mode ( of course i would say ).
Perhaps the assumption we could do is that in the debug mode are introduced some traps software by the debbuger which don’t cause any kind of problemsSeptember 9, 2019 at 12:48 #27315
If the task you are speaking about gets blocked, what other tasks are associated with the blocked task? Make sure you have enough task stack allocation as this may trigger a hard fault a task stack overflows. Without viewing the hard fault status registers, you can reverse engineer the problem by disabling tasks and checking for the hard fault. Make sure the task create functions are setup properly.September 9, 2019 at 13:47 #27316
Apparently, all the task are blocked.
In addition i also tried to execute one task at time and there is always the same problem ( it works only in the debug mode ).
I also increased the stack allocation but it did not work, should i increase it more?
The task create fucntion seems correct.
I was thinking about a memory problem, could it be that i mapped wrongly the IVT? or even worse the main memory is not enough for containing all the RTOS + application?September 9, 2019 at 16:17 #27317
What existing Micrium port was used and what IDE are you using? If the application is working in debug mode, the IVT setup should be fine. Since this is a new port, you should perform a test running only the idle task.
The RTOS overhead is small, I would advise to setup a simple application running an idle task and another task that toggles an LED.
You must be logged in to reply to this topic.