Continuing with the firmware for that itty-bitty board....
Suddenly this morning it wasn't working anymore.
I'd made some changes last night, in preparation for a restructuring of how commands get processed (breaking command execution out into a separate thread from command reception, for reasons related to the communication protocol), but hadn't actually done anything that should break the program just yet.
And yet: it was hitting DefaultISR during launch of the initial task. WTF????
So I commented out all the new code. Still DefaultISR.
Something to do with the new task I'd added?
Ah... here we go. I'd fiddled the task priorities. Using FreeRTOS, developing with KDS, and using Processor Expert to configure the tasks, it seems that the RTOS main task must have the highest (numerically lowest) priority, or critical system initialization doesn't happen.
Which is annoying, since I'd meant to have the main task do background stuff.
Guess I need to rearrange things again. Actually: I might just turn the main task into a debug/monitor thing, and add a fourth task to handle application background activities. That eats RAM, but I still have a fair amount available at this point.
Or maybe just have the main task nice itself after initialization.
Comments