How to start debugging with the GDB debugging in KDS. If you are coming from CodeWarrior, then debugging with KDS is somewhat different because of the nature of GDB, and because the debug configuration panels look different.
For OpenOCD, use "-f kinetis.cfg" which is the same for all Kinetis devices:
For P&E: select the interface, port and device:
For Segger, specify device name, interface (use JTAG only if you know the debug header supports JTAG. If in doubt, choose SWD):
SWO (Single Wire Output) is an extra pin to SWD/JTAG, and currently not supported on FRDM boards. So I disable that option for my FRDM boards, as otherwise the debugger will complain later about it:
Debugging and Debug Icon
To Debug, one way is to use the 'Debug' button from the Debug Configuration dialog:
You have to do this at least once.
Once you have done that, then you can use the drop down of the Debug icon:
Just pressing the 'Debug' Icon is in general NOT recommended if it does not show in the tooltip a launch configuration:
And if you get the dialog below:
DO NOT select either gdbserver or remote gdb/mi: it does not work that way :-(
Press Cancel, and select it from the list, or select it from the 'Debug Configurations...' dialog:
Although KDS V1.1.0 has improved in this area, it is possible that it will show you a selection of launch/debug configurations (then you are ok to choose one):
The recommended way is to use the drop down list and to select the desired debug/launch configuration:
If debugging does not work, here are a few trouble shooting tips:
Settings: verify that your launch configuration settiings are ok. That you are debugging the correct board with the correct connection (P&E, OpenOCD, Segger).
Power: Verify that your board has power and connected with the correct USB port on the board.
Not Debugging Twice: Make sure that you are *not* debugging the same application board twice, or you will get this:
Because the board is already running a debug session:
Always terminate an existing debug session before starting a new one:
Kill any Zombies: the gdb client and server are usually terminated after a debug session. After terminating a debug session, verify that these services are *not* present any more in your task manager (Windows):
arm-none-eabi-gdb.exe: this is the ARM GDB client, needed for the OpenOCD, Segger and P&E servers listed below
openocd.exe: this is the OpenOCD GDB server
pegdbserver_console.exe: this is the P&E GDB Server
JLinkGDBServerCL.exe: this is the Segger GDB Server
If you see multiple zombies/instances like this: kill them: