Erich,
Thanks for the quick response.
For FRDM-K64F, I have tried three firmwares:
1. mbed/CMSIS-DAP firmware
2. P&E OpenSDA with GDB Server
3. Segger J-Link
Only #3 gave me consistent success debug connection.
#2 GDB Server gave me E17925 error all the time.
#1 debug connection is touchy. The first time I set it up, it would not work as described above. I play with mbed, reset, and disconnect/reconnect USB and it worked sometimes but not all the time. I have yet to find the pattern. I did read that k64.cfg is deprecated and tried kinetis.cfg but kinetis.cfg did not get me anywhere. I finally realized that I should replace
-f target/k64.cfg
with
-f kinetis.cfg
but I was using
-f target/kinetis.cfg
and that seemed to be the problem.
I could get my simple blinking LED program to work most of the time now.
I wrote a program trying to use printf through virtual COM port following the directions from
UART printf() for the FRDM-K64F Board and Kinetis Design Studio | MCU on Eclipse
but I could not get the debugger launched.
The Console said "monitor halt" and the Debug window said
<terminated, exit value: -1>openocd
<terminated, exit value: 1>arm-none-eabi-gdb
I would not be surprised I have some bugs in my code but without getting into the debugger, it is difficult to find the bugs.