I am assuming what I need to do to fix my problem is to "Disabling NMI before execution". But if in reading this you see my true problem, please do speak up!
I am using a KL17 in a situation where I need a GPIO pin more than the NMI. So I reconfigure pin PTA4 for GPIO. But when I enable all interrupts (and this only happens when I am debugging) my debugging session "goes south":
Wed Nov 04, 2015 11:18:57: The stack pointer for stack 'CSTACK' (currently 0x20000538) is outside the stack range (0x20002C00 to 0x20003000)
...why this (evidently) dose not happen when I am not debugging (the program sends messages to the UART port and communicates both ways over the SPI port) is a mystery to me.
So, I am assuming disabling NMI will fix this. Even though I think there is another problem lurking in the wings.
I suspect changes can be made to the startup_MKL17Z644.s file to do this. But after trying with no positive results (maybe a big endian problem?) we decided it a bit risky to continue with out understanding how this file is laid out.
Suggestions?
-thanks