KDS debugger problem: Can not enter background mode

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

KDS debugger problem: Can not enter background mode

2,422 Views
kenholt
Contributor I

Hi -

I cannot get the debugger through the launch.

KDS 2.0

KL46Z

Windows 7

It is an imported project.

 

If anyone has any hints about what I should try, I would be very appreciative.

 

Thanks, Ken Holt

 

 

Here is the console report:

 

 

P&E GDB Server, Version 5.13.02.00

Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

 

Loading library

C:\Freescale\KDS_2.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.7.201410171532\win32\gdi\unit_ngs_arm_internal.dll

... Done.

 

Command line arguments: -device=KL46Z256M4 -startserver -singlesession

-serverport=7224 -interface=OPENSDA -speed=5000 -port=USB1

-USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0

Device selected is kl46z256m4

User Specified Hardware Selection : Interface=OPENSDA and Port=USB1

Connecting to target.

OpenSDA detected - Flash Version 1.14

 

Can not enter background mode  .

 

Unable to initialize PEDebug.

 

PE-ERROR: Failed to Initialize Target

Server running on 127.0.0.1:7224

Connection from "127.0.0.1" via 127.0.0.1

PE-ERROR: Target is not connected

Disconnected from "127.0.0.1" via 127.0.0.1

Target Disconnected.

Labels (1)
0 Kudos
14 Replies

1,256 Views
mjbcswitzerland
Specialist V

Hi Ken

Do you have the original mbed loader installed on the board? If not you need to update it to the P&E debugger version [ P&E Microcomputer Systems ]

If you have an important project and need to accelerate development check out:

http://www.utasker.com/kinetis/FRDM-KL46Z.html

http://www.utasker.com/kinetis/TWR-KL46Z48M.html

KDS project included and you can simulate the board/chip for project development, debugging and test using VisualStudio.

Regards

Mark

http://www.utasker.com/kinetis.html

0 Kudos

1,256 Views
kenholt
Contributor I

Hi Mark -

Thanks for your suggestion I did update the bootloader on the board, in

order to get past the last problem I had, which was a blank port select

window.

Should I try uninstalling KDS2.0, and re-install 1.1.1, just to see if it

makes a difference?

Ken

On Thu, Jan 22, 2015 at 1:18 PM, Mark Butcher <admin@community.freescale.com

0 Kudos

1,256 Views
mjbcswitzerland
Specialist V

Ken

I don't think that reinstalling KDS (or down-grading) will help. More likely you need to re-install the USB driver since possibly something has gone wrong there.

When you have the debugger correctly installed you should see something like

pastedImage_0.png

You can also check your device manager since it will show the debugger

pastedImage_2.png

Below is the console output during the download of a project to the board (I am assuming you are using a FRDM-KL46Z).

However I suspect that your problem is not with the debugger but with the chip since the debugger doesn't look to be able to communicate with it.

Have you loaded any code to it before? (eg. with the the debugger's USB-MSD loader - dragging-and-dropping a file on its disk?). It is possible to lock out the debugger with bad code so check the forum for topics on unlocking the chip if that is the case.

Also try loading one of the binary files at µTasker FRDM-KL46Z support using the USB-MSD loading method to see whether the debugger can load using the other method. Maybe it can and then it will clear up the issue with the debugger (?)

Regards

Mark

http://www.utasker.com/kinetis.html

P&E GDB Server, Version 5.13.02.00

Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

Loading library C:\Freescale\KDS_2.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.7.201410171532\win32\gdi\unit_ngs_arm_internal.dll ... Done.

Command line arguments: -device=KL46Z256M4 -startserver -singlesession -serverport=7224 -interface=OPENSDA -speed=5000 -port=USB1 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=0

Device selected is kl46z256m4

User Specified Hardware Selection : Interface=OPENSDA and Port=USB1

Connecting to target.

OpenSDA detected - Flash Version 1.14

Device is KL46Z256M4.

Mode is In-Circuit Debug.

'Kinetis' is a registered trademark of Freescale.

(C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)

API version is 101

Server running on 127.0.0.1:7224

Connection from "127.0.0.1" via 127.0.0.1

Copyright 2012 P&E Microcomputer Systems,Inc.

Command Line :C:\Freescale\KDS_2.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.7.201410171532\win32\pegdbserver_console -device=KL46Z256M4 -startserver -singlesession -serverport=7224 -interface=OPENSDA -speed=5000 -port=USB1 -USE_CYCLONEPRO_RELA$

CMD>RE

Initializing.

Target has been RESET and is active.

CMD>CM C:\Freescale\KDS_2.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.7.201410171532\win32\gdi\P&E\kl46z256m4_pflash_pipeline.arp

Initializing.

Initialized.

;version 1.03, 07/17/2013, Copyright P&E Microcomputer Systems, www.pemicro.com  [mk_256k_n_pflash_m0]

;device freescale, kl46z256m4, 1x32x64k, desc=pflash_pipeline

;begin_cs device=$00000000, length=$00040000, ram=$20000000

Loading programming algorithm ...

Done.

CMD>EM

Erasing.

Module has been erased.

Initializing.

Initialized.

;version 1.03, 07/17/2013, Copyright P&E Microcomputer Systems, www.pemicro.com  [mk_256k_n_pflash_m0]

;device freescale, kl46z256m4, 1x32x64k, desc=pflash_pipeline

;begin_cs device=$00000000, length=$00040000, ram=$20000000

Loading programming algorithm ...

Done.

CMD>PM

Programming.

Processing Object File Data ...

                              

.

Programmed.

CMD>VC

Verifying object file CRC-16 to device ranges ...

   block 00000000-00000007 ...

Ok.

   block 00000400-00004A22 ...

Ok.

   Checksum Verification Successful. (Cumulative CRC-16=$A175)

CMD>RE

Initializing.

Target has been RESET and is active.

Preset breakpoint encountered.

0 Kudos

1,256 Views
kenholt
Contributor I

Hi Mark -

Thanks for your suggestions.

I do have the debugger and device manager looking like your screens.

I think the board may have the locked-out chip as you suggest - I did a

drag and drop of the uTasker .bin that you linked to; it did not seem to

load or run, although I'm not sure if I'm doing it correctly. Before now

with KDS we've always connected with the debugger.

I have some new boards coming tomorrow - I'll try one. I should update the

bootloader first?

Thanks,

Ken

On Thu, Jan 22, 2015 at 8:35 PM, Mark Butcher <admin@community.freescale.com

0 Kudos

1,256 Views
mjbcswitzerland
Specialist V

Ken

You can load via USB-MSD with whatever loader the board is supplied with, but there are no disadvantages of installing the P&E version immediately (it has the same features as the med version but allows KDS to debug).

Regards

Mark

µTasker Kinetis support

1,256 Views
kenholt
Contributor I

Thanks Mark

I did get 4 new boards today and have been trying them out.

On the first one, I was able to update the bootloader to 1.11 - the version that comes with the boards is 1.09.

It was difficult to get over the load failure (quick flashing LED); I finally tried turning off Windows Firewall and restarting the computer.

With 1.11 installed, I was then able to add the SDA and get the KDS debug connection working.

On a second board, I could not get 1.11 installed. Maybe something else is blocking.

I think my old board, which I was previously able to install 1.11 on, is locked out. This old board had an mbed program on it.

Thanks,

Ken

0 Kudos

1,256 Views
mjbcswitzerland
Specialist V

Ken

If a loader doesn't update make sure that you are not using WIndows 8.1 since, depending on the version of code doing the bootloader update, it may not be able to do so with Win 8.1. In this case upload using Windows 7, or earlier - after the update Windows 8.1 can be used again.

Regards

Mark

http://www.utasker.com/kinetis.html

0 Kudos

1,256 Views
kenholt
Contributor I

Thanks Mark,

I am using only Windows 7 Premium Home, which is on a new computer.

Are there different versions of the bootloader matched to different

operating systems?

Should I try dropping a utasker into a board with 1.11 or 1.09?

thanks,

Ken

On Sat, Jan 24, 2015 at 12:50 AM, Mark Butcher <

0 Kudos

1,256 Views
mjbcswitzerland
Specialist V

Ken

Windows 8.1 started writing a hidden system directory and some files in it to newly connected disks which confused eariler versions of the boot loader. If you have the newest version it will be usable with Windows 8.1 and previous OSs (backward compatible).

You can load uTasker (and other) binaries using any loader version.

Regards

Mark

Kinetis: µTasker Kinetis support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos

1,256 Views
kenholt
Contributor I

Mark - Thanks for the info - I might try to find out if Win 7 Home Premium

does anything like that.

I will try loading a uTasker.bin, but I am afraid of screwing something up.

I should just drop the .bin into the bare bootloader? Which of the uTaskers

is it easy to see if it got loaded and is running?

thanks,

Ken

On Sat, Jan 24, 2015 at 3:43 PM, Mark Butcher <admin@community.freescale.com

0 Kudos

1,256 Views
mjbcswitzerland
Specialist V

Ken

You can load either

uTaskerSerialBoot_FRDM-K22F_KBOOT_HID_UART_MSD.bin

or

uTaskerV1.4.8_FRDM-K22F.bin

On the KRDM-K22 you need to press the reset button after loading so that the application starts and in each case the green light will blink so it is clear that it is running correctly.

The SW operation is otherwise described at the link and allows a variety of things to be done on the board.

Regards

Mark

Kinetis: µTasker Kinetis support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos

1,256 Views
kenholt
Contributor I

Mark - thanks again for your help.

I've been using my old XP computer to successfully load the updated

bootloader, and then I use the boards with KDS on the new computer.

This will do for now - I'll try to watch out for any future references to

the Windows 7 problem.

Ken

On Sat, Jan 24, 2015 at 5:34 PM, Mark Butcher <admin@community.freescale.com

0 Kudos

1,256 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Ken,

0. I use attached SDA debug bootloader. It works perfect on my FRDM-KL46Z board.

1. first please make sure debugger is set as below:

debug config.png

2. after install bootloader, reconnect board, device manager shows like below:

device manager.png

hope this can help you.


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,256 Views
kenholt
Contributor I

Hi Zhang - Thanks for your suggestion.

My setup does match yours, except that I do not have the Jungo entry on the boards that do not have

bootloader 1.11 installed.

Ken H

0 Kudos