OpenSDAv2 for TWR-K65F180M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OpenSDAv2 for TWR-K65F180M

2,252 Views
paulb-sct
Contributor III

From what I have read in other documents and posts, this page should provide the binary bootloader for this board:

http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/ides-for...

I chose the TWR-K65 board and it gave a link to this file:

http://www.nxp.com/files/soft_dev_tools/software_tools/debuggers/k20dx128_twr_k65f_if_0x8000.bin

I dropped this onto the BOOTLOADER drive, USB-cycled the board, and it appears dead. No virtual COM port or any other new devices show up in Windows Device Manager. Forging ahead anyway, I tried initiating a debug session with KDS, following the instructions here:

https://community.freescale.com/docs/DOC-100720

The OpenOCD debugger is selected, as per the instructions here:

GDB Debugging with Kinetis Design Studio

I get "OpenOCD failed with code(1)." The console messages are:

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'

Error: unable to open CMSIS-DAP device

Error: unable to init CMSIS-DAP driver

Error: Error selecting 'cmsis-dap' as transport

Runtime Error: C:/Freescale/KDS_3.0.0/openocd/bin/..//scripts/kinetis.cfg:3:

in procedure 'script'

at file "embedded:startup.tcl", line 58

in procedure 'interface' called at file "C:/Freescale/KDS_3.0.0/openocd/bin/..//scripts/kinetis.cfg", line 3

The document "Getting Started with Kinetis SDK (KSDK) v.2.0" says a Windows driver is required, gives a link which provides this driver: mbedWinSerial_16466.exe

This driver did not install because "no mbed microcontrollers were found".

I have previously used this board with the P&E OpenSDA debug interface. Hopefully I can restore it back to the board.

Is OpenSDAv2 available and working correctly for the TWR-K65 board? Is there something wrong with the file k20dx128_twr_k65f_if_0x8000.bin?

Labels (1)
0 Kudos
7 Replies

942 Views
peterruesch
Contributor IV

I'm also having troubles using my twr-k65 board as CMSIS DAP debugger.

when I use the file from here, the debugger LED just starts to flash fast:
http://www.nxp.com/files/soft_dev_tools/software_tools/debuggers/k20dx128_twr_k65f_if_0x8000.bin

if I flash this file, there is at least a mbed cmsis device shown to me:

https://developer.mbed.org/media/uploads/sam_grove/0226_k20dx128_k64f_0x5000.bin

haven't managed to start a debug session with this setup yet.

is this problem known?

0 Kudos

942 Views
santiago_gonzal
NXP Employee
NXP Employee

Great, thanks for the clarification! Now I understand it, but I have no idea about what's going on. The only thing that comes to my mind is to reprogram the K20.

Do you have an external JTAG debugger? Do you need the OpenOCD for any reason or is the PEMicro interface good enough?

Regards,

Santiago

0 Kudos

942 Views
paulb-sct
Contributor III

I would have liked to use OpenOCDv2.0 / CMSIS-DAP because it seems it is

more widely supported (e.g. Rowley Crossworks). We do have a Segger J-Link

and I will try that once I get an adapter cable. The final target board

will only have JTAG, no K20, so using PEMicro will suffice for now. I

really just wanted to verify that I was using the right files to try out

CMSIS-DAP.

On Fri, Feb 26, 2016 at 1:32 AM, santiago.gonzalez <

0 Kudos

942 Views
santiago_gonzal
NXP Employee
NXP Employee

I don't understand your explanation.

The K20 can be in two states: Bootloader (Waiting for a .bin) or Application (Ennumerating itself as Segger,PEMicro or CMSIS-DAP)

- When it is acting as bootloader (This happens when you press the reset button before you connect the USB cable) you will see a BOOTLOADER MSD in your PC. You can drag and drop any binary (ended in .bin) and you will change the behavior of the device

- If you see a J-Link or MBED MSD in your PC, this means the K20 is acting as a debugger, and you can drag and drop a binary from any application you've created for the K65, and the K20 will program the K65 with that info (Instead of reprogramming itself)

I hope that this explanation helps you to understand what's going on.

Regards,

Santiago

0 Kudos

942 Views
paulb-sct
Contributor III

I'll try to make my description more clear.

I bring up the K20 in Bootloader state, drop in a file, unplug then plug in the USB cable without holding the Reset button.

If the file is DEBUG-FRDM-K64F_Pemicro_v108a_for_OpenSDA_v2.0.bin, 2 devices are added to Windows Device Manager: a Jungo PEMicro driver, and a virtual COM port. I can program and debug my application using KDS with the debug interface set to GDB PEMicro.

If the file is k20dx128_twr_k65f_if_0x8000.bin, no new devices show up in the Device Manager, and no new MSD shows up. I cannot program/debug my application using KDS with the debug interface set to GDB OpenOCD.

0 Kudos

942 Views
santiago_gonzal
NXP Employee
NXP Employee

Hello Paul,

I've just tried on my TWR-K65 and the binary is working properly, I can see the MBED Mass Storage Device and I can debug an application using CMSIS-DAP. Maybe you're having Windows Drivers issues, no idea.


Can you try to download the PEMicro_v114 or the Segger_V2_1 binaries to check that your board and OpenSDA are working properly?

Regards,

Santiago

0 Kudos

942 Views
paulb-sct
Contributor III

Thanks for your reply. I have previously successfully used the v108a bootloader and debugged it as a P&E Micro OpenSDA v1.0 debug interface. This is the file that I dropped:

DEBUG-FRDM-K64F_Pemicro_v108a_for_OpenSDA_v2.0.bin

This was from a reply by David Seymour in the thread https://community.freescale.com/message/533787#533787 .

The only v114 files I can see in the download from P&E Micro are .SDA files. They are all are too large for the BOOTLOADER drive, which is 144KB. There is a v118 file for the TWR-K65F180 but it is also too large. I will try the Segger J-Link but I'm waiting for a Cortex JTAG adapter cable.

When the board was new, it showed up (if I held Reset down while plugging in) as a drive called MBED. After I dropped the v108a file in, the drive shows up as BOOTLOADER. Could this have changed something so that the k20dx128_twr_k65f_if_0x8000.bin file doesn't work?

0 Kudos