rtel wrote on Wednesday, July 17, 2013:
While all the newer ports maintain a separate interrupt stack, unfortunately being one of the older ports, the ColdFire port does not. Also, with Freescale spending many more dollars on Kinetis marketing over ColdFire marketing, it is unlikely the Coldfire port will get updated to do the same.
That said, I think it would be simple enough to implement the change (?). You would need to keep an interrupt nesting count. On interrupt entry (before interrupts are enabled), if the nest count is 0 then switch to a statically allocated system stack after the task context is saved. On exit, after decremented the count, if it is zero again, switch back to the task stack - which would probably happen anyway. Of course, it is always easier to say than do - I would have to refamiliarise myself with the Coldfire port to know for sure. You can re-use the stack that is already allocated by your linker for use by the main() function as the system stack.
The PIC32 does do this, but most is done in assembly so maybe not so easy to follow. The new A9 port goes a step further and only saves the task context if a context switch is actually needed.