mbed Device not migrated

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

mbed Device not migrated

1,417 Views
sheldonrubin
Contributor II

I appear to be having a Windows 10 problem. It appears that the FRDM-K22F composite USB device is not being migrated.

 

 

This is my first time using the FRDM-K22F and the Kinetis Design Studio. I followed the instructions in the online video to install and run the applications and everything worked well until I tried to download the Debug Configuration of hello_world_frdmk22f from GDB OpenOCD Debugging/hello_world_frdmk22f debug cmsis dap to the K22F flash. I get 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:

localhost:3333: The system tried to join a drive to a directory on a joined drive.

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

localhost:3333: The system tried to join a drive to a directory on a joined drive.

localhost:3333: The system tried to join a drive to a directory on a joined drive.

 

KDS never enters the debug mode. I tried using two different USB ports, two different USB cables and I tried resetting the K22F several times. I also tried restarting Kinetis Design Studio and I confirmed that -f kinetis.cfg is present. I then installed the software on a second computer that had a clean install of Windows 10 and only MS Office. I got the same error message.

 

This is what I installed.; I even reflashed the OpenSDA bootloader:

KSDK v1.3.0 Mainline release for Windows

Kinetis Design Studio 3.2.0

KSDK 1.3.0 Eclipse Update

Virtual COM Port Driver mbedWinSerial_16466

TeraTerm connected to mbed Serial Port (COM3) with the correct port settings (115200, 8N1, none)

Labels (1)
0 Kudos
8 Replies

878 Views
sheldonrubin
Contributor II

Alice,

I just realized that I didn't give you a copy of the console error message that results when the system is unable to connect to the Segger J-Link probe, here it is:

Contents of Console - Error Message for New Project

Create New Project for K22f, all drivwers +

SEGGER J-Link GDB Server V6.00 Command Line Version

  1. JLinkARM.dll V6.00 (DLL compiled Jul 22 2016 19:26:51)

-----GDB Server start settings-----

GDBInit file:                  none

GDB Server Listening port:     2331

SWO raw output listening port: 2332

Terminal I/O port:             2332

Accept remote connection:      localhost only

Generate logfile:              off

Verify download:               on

Init regs on start:            on

Silent mode:                   off

Single run mode:               on

Target connection timeout:     0 ms

------J-Link related settings------

J-Link Host interface:         USB

J-Link script:                 none

J-Link settings file:          none

------Target related settings------

Target device:                 MK22FN512xxx12

Target interface:              SWD

Target interface speed:        1000kHz

Target endian:                 little

Connecting to J-Link...

Connecting to J-Link failed. Connected correctly?

GDBServer will be closed...

Shutting down...

 
 

0 Kudos

878 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sheldon,

When connect the USB,  for the firmware on bootloader is J-link,

so when you download , it maybe select the j-link on OpenSDA prot .

You can update the bootlaoder to other firmware, for example PE .

Hope it helps!

Alice

0 Kudos

878 Views
sheldonrubin
Contributor II

Hi Alice,

Thank you for the help but I don't think the problem is the bootloader because the code successfully downloads to the K22f using OpenSDA as soon as I disable the Segger J-Link.

At any rate, I can't use the bootloader for the board we designed, it has to be a JTAG or SWD interface, so I need to get the J-Link to work.

Why would KDS be able to connect to the J-Link with a demo program but not with a new project created by KDS?

Sheldon

0 Kudos

878 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sheldon

If your j-link can download the demo project, it should be download new project also .

Please  restart your PC , when open KDS , switch to a new workspace , then create

one new project , try to download .

BR

Alice

0 Kudos

878 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sheldon ,

Please update the OpenSDA bootloader use the firmware of "0221_k20dx128_k22f_0x8000.bin"(the attachment),

then when debug the demo configure the debugger like this :

pastedImage_0.png

I test it on my side, it can work well :

pastedImage_1.png

Please have a try , if it still can not work ,please take a screenshot about it step by step .

BR

Alice

0 Kudos

878 Views
sheldonrubin
Contributor II

Hello Alice,

Thank you for your suggestions. Because of the issues reported when using a FRDM-K22F in a Windows 10 environment, I abandoned the OpenSDA v2.1 bootloader. It K22f eventually was corrupted so I had to use a Segger J-Link to reprogram the bootloader anyway. I used the Segger J-Link OpenSDA - Board-Specific Firmware for the FRDM-K22F 01_OpenSDA_FRDM-K22F.bin dated 2016-07-12.

I was then able to build and run the Hello World demo program successfully on a Windows10 computer. Yaay!! I'm using:

  1. Kinetis Design Studio 3.2.0
  2. J-Link V6.00
  3. Segger J-Link EDU debug probe

Now I'm having a new problem that may be because I'm not familiar with all of the Freescale tools. Without changing anything, I created a new project and I get the following error message:

          J-Link GDB Server failed:

          Could not connect to J-Link. Please check if plugged into USB port or Ethernet switch.

          For more details, see the JLinkGDBServerCL console.

Here's how I created and built the new project:

          Project Name: New_Project__SDK_2.0_FRDM-K22f__Segger_J-Link_6.0

          Select Kinetis SDK folder: C:\Freescale\SDK_2.0_FRDM-K22F

          Boards > New FRDM-K22F project

          Build

          Debug Configurations: GDB SEGGER J-Link Debugging > New_Project__SDK_2.0_FRDM-K22f__Segger_J-Link_6.0_Debug_Segger

Is a new, unmodified project missing something required to connect to the Segger J-Link debug Probe?

Here's the content of console after the failure:

SEGGER J-Link GDB Server V6.00 Command Line Version

        JLinkARM.dll V6.00 (DLL compiled Jul 22 2016 19:26:51)

-----GDB Server start settings-----

GDBInit file:                  none

GDB Server Listening port:     2331

SWO raw output listening port: 2332

Terminal I/O port:             2333

Accept remote connection:      localhost only

Generate logfile:              off

Verify download:               on

Init regs on start:            on

Silent mode:                   off

Single run mode:               on

Target connection timeout:     0 ms

------J-Link related settings------

J-Link Host interface:         USB

J-Link script:                 none

J-Link settings file:          none

------Target related settings------

Target device:                 MK22FN512xxx12

Target interface:              SWD

Target interface speed:        30kHz

Target endian:                 little

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link V9 compiled Jul 14 2016 14:25:35

Hardware: V9.40

S/N: 269400492

OEM: SEGGER-EDU

Feature(s): FlashBP, GDB

Checking target voltage...

Target voltage: 3.31 V

Listening on TCP/IP port 2331

Connecting to target...Connected to target

Waiting for GDB connection...Connected to 127.0.0.1

Reading all registers

Read 4 bytes @ address 0x00000000 (Data = 0x20010000)

Target interface speed set to 30 kHz

Resetting target

Halting target CPU...

...Target halted (PC = 0x000004D8)

R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000

R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000

R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000

R12= 00000000, R13= 20010000, MSP= 20010000, PSP= 00000000

R14(LR) = FFFFFFFF, R15(PC) = 000004D8

XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Select auto target interface speed (2000 kHz)

Flash breakpoints enabled

Semi-hosting enabled (Handle on BKPT)

Wrong client mask. Semihosting I/O not changed.

SWO disabled succesfully.

SWO enabled succesfully.

Downloading 1024 bytes @ address 0x00000000 - Verified OK

Downloading 16 bytes @ address 0x00000400 - Verified OK

Downloading 16080 bytes @ address 0x00000410 - Verified OK

Downloading 3528 bytes @ address 0x000042E0 - Verified OK

Downloading 8 bytes @ address 0x000050A8 - Verified OK

Downloading 4 bytes @ address 0x000050B0 - Verified OK

Downloading 4 bytes @ address 0x000050B4 - Verified OK

Downloading 164 bytes @ address 0x000050B8 - Verified OK

Read 4 bytes @ address 0x000004D8 (Data = 0xF000B672)

Read 2 bytes @ address 0x00001316 (Data = 0x2300)

Read 2 bytes @ address 0x00001316 (Data = 0x2300)

Resetting target

Halting target CPU...

...Target halted (PC = 0x000004D8)

Read 2 bytes @ address 0x00001316 (Data = 0x2300)

Read 2 bytes @ address 0x00001316 (Data = 0x2300)

Read 2 bytes @ address 0x00001316 (Data = 0x2300)

R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000

R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000

R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000

R12= 00000000, R13= 20010000, MSP= 20010000, PSP= 00000000

R14(LR) = FFFFFFFF, R15(PC) = 000004D8

XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Reading all registers

Read 4 bytes @ address 0x000004D8 (Data = 0xF000B672)

Setting breakpoint @ address 0x00001316, Size = 2, BPHandle = 0x0001

Starting target CPU...

...Breakpoint reached @ address 0x00001316

Reading all registers

Removing breakpoint @ address 0x00001316, Size = 2

Read 4 bytes @ address 0x00001316 (Data = 0x60FB2300)

Reading 64 bytes @ address 0x2000FFC0

Starting target CPU...

Any help would be very much appreciated.

Sheldon

0 Kudos

878 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sheldon,

From the console message,  it seems it download the project and start to run ,

pastedImage_1.png

pastedImage_0.png

so could you please take a screenshot about the error which you think it can not work well .

BR

Alice

0 Kudos

878 Views
sheldonrubin
Contributor II

Hello Alice,

I just discovered that if I unplug the USB cable from the Segger J-Link I can apparently download the program to the K22f with no error messages and KDS enters debug mode. Here's the screenshot of the error message that results when I have the USB cable connected to the Segger J-Link:

pastedImage_0.png

Here's the screenshot with no error message for when I disconnect the USB cable:

pastedImage_1.png

Thank your for your help!

Sheldon

0 Kudos