I've created a K10 BSP based on the existing K60. I have an project I'm running on it that does three main things: 1) It starts up sdcard and mfs services. 2) It starts up WiFi services using a RedPine radio. 3) It opens a connection to UART3 and listens for serial data coming over it. One or two of these tasks seem to work fine on their own, but when I run all three, I experience random task crashes. One of the tasks will crash but the other two will continue running. When the task crashes, the debugger will break and stop in dispatch.s in the kernel interrupt handler (_int_kernel_isr).
The crash seems to happen only when one of the tasks makes a function call that generates multiple stack frames, so my suspicion is that I am over-running the stack. I've increased and played with the stack allocations for each task and even tried consolidated everything into one task. I've managed to reduce the frequency of the crashes, but they still occur. I even tried increasing various values in the .lcf linker file without any luck.
My attempt to figure out what exactly is happening is hampered by the development environment not working as expected. I've recompiled the PSP, BSP, and application with MQX_KERNEL_LOGGING defined to 1, and I've installed the MQX tools that should allow me to examine the stack etc... but they remain disabled when pause execution the as they would if kernel logging was not turned on.
Does anyone have any suggestions. Why might the kernel logging / debugging not work as expected? Any suggestions on why the crash is happening or how I might tackle it?