I am trying to debug on my Kinetis tower module without much success. My module currently shows up as an mbed Serial Port device so I am debugging with an OpenOCD configuration. Whenever I do, I receive the following error message:
"
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
Remote communication error. Target disconnected.: No error.
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
Remote communication error. Target disconnected.: No error.
Remote communication error. Target disconnected.: No error.
"
I've tried debugging with P&E/Segger and both time out.
How do I fix this problem?
Thanks,
Mitty
解決済! 解決策の投稿を見る。
I loaded Segger firmware (SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2) and am now able to debug.
If you want to use OpenSDA in CMSIS-DAP mode there is an additional step needed that is not yet well documented.
The FRDM-K64F needs this step - all other Freedom boards I have tested (so far) do not need this extra step. They can use the standard CMSIS-DAP app (is an S19 file that we use).
We are working on a Keil KnowledgeBase article for the FRDM K64F. Here is part of it:
*************************************************************************************************
The CMSIS-DAP Debugger in µVision needs the CMSIS-DAP driver for mbed installed on your PC to communicate to your CMSIS-DAP target board.
To install the CMSIS-DAP driver for mbed:
*************************************************************************************************
This is using Keil uVision but we suspect this is applicable for other tools vendors.
I am interested in hearing about any other experiences getting CMSIS-DAP working and other information we can use in our forthcoming article.
Email: bob.boys@arm.com
Thanks
Bob Boys
ARM/Keil
Here is the Knowledgebase article: µVISION: Using MDK-ARM with the TWR-K64F mbed Kit
Hi Mitty,
I just tried this on my FRDM-K64F Freedom board that has MBED firmware so I would use the OpenOCD configuration as well.
The first time I downloaded I got the same error you had.
I then disconnected the debugger USB cable and then re-connected it. Re-tried the download and it worked.
Here are my Debug Configuration settings:
Regards,
David
Thanks, David. I checked and I have all of the same settings, but I am still unable to debug.
Here is what my console is displaying every time I try to debug:
"
Open On-Chip Debugger 0.8.0-dev (2015-01-09-16:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'cmsis-dap'
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : add flash_bank kinetis kinetis.flash
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Started by GNU ARM Eclipse
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : DAP_SWJ Sequence (reset: 50+ '1' followed by 0)
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : IDCODE 0x2ba01477
Info : kinetis.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Error: Unsupported K-family FAMID
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
"
Hi Mitty,
Can you try to clear all breakpoints and watchpoints?
Failed to Debug with GDB: Breakpoints or Expressions on non-existing Locations | MCU on Eclipse
Regards,
David
Hi David,
There are no breakpoints or watchpoints.
Thanks,
Tim
Hi Mitty,
Are you connecting the USB cable to FRDM-k64F, wait 10 seconds, disconnect and quickly re-connect the USB?
I have found that initial USB connection will not work but after re-connecting the interface works.
Secondly, attached is ZIP with MBED and PEMicro firmware that works on my board so maybe switching back and forth will grease the wheels so to speak.
Have a look at this very good blogger's report on antivirus software that might affect things.
FRDM Board not responding? Check your Virus Scanner! | MCU on Eclipse
Segger JLink firmware for frdm-k64f at bottom of web page: SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2
Have you done online update of KDS by doing the Help->Install New Software... then in Wizaard select from pull-down the "Freescale KDS Update Site - http://freescale.com/lgfiles/updates/Eclipse/KDS" and Select All, Next, Finish...?
Regards,
David
Hi David,
Yes, I have tried that. Also, (just for clarification) I am trying to debug a kinetis tower module, not a freedom board. I also have a freedom board that I am able to debug.
I am currently updated to KDS 3.0.0.
Thanks,
Mitty
I loaded Segger firmware (SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2) and am now able to debug.