KDS3.1 GDB 94% blocking

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

KDS3.1 GDB 94% blocking

Jump to solution
3,421 Views
PO220
Contributor IV

Hi

 

I'm using a FRDM K64 board with PE multilink universal (the green one)

With CW10.6, all is working well.

 

With KDS3.1 an a new project KSDK2.0, I can not debug the target.

I choose GDB PEMicro Interface Debugging -> MyProj_Debug_PNE

Then the pegdbserver_console.exe process start and...blocking at 94%

 

141681_141681.JPGlaunching1.JPG

 

no alarm.

If I cancel the process nothing appens ; it remains grayed

141682_141682.JPGlaunching.JPG

 

I tried to uninstall KDS

Re download it

RE install it

...it's exactly the same.

It still works perfectly with CW10.6 (no hardware or pod problem)

 

thank you in advance

Labels (1)
Tags (3)
1 Solution
1,873 Views
PO220
Contributor IV

No explication but solution :

In debug configuration/ debugger/GDB Client settings

A have by default

set mem inaccessible-by-default off
set tcp auto-retry on
set tcp connect-timeout 30

whith

set mem inaccessible-by-default off

set tcp auto-retry on

set tcp connect-timeout 30

it's working now !

View solution in original post

13 Replies
1,873 Views
alexu
Contributor II

I've been struggling with the same issue for the past week and found the root cause:

When the Kinetis SDK 2.x Project Wizard creates a new project, it generates launch configuration files which contain the following entry:

<stringAttribute key="com.pemicro.debug.gdbjtag.pne.gdbClientOtherCommands" value="set mem inaccessible-by-default off&amp;#13;&amp;#10;set tcp auto-retry on&amp;#13;&amp;#10;set tcp connect-timeout 30"/>

However, the value field should be:

<stringAttribute key="com.pemicro.debug.gdbjtag.pne.gdbClientOtherCommands" value="set mem inaccessible-by-default off&#13;&#10;set tcp auto-retry on&#13;&#10;set tcp connect-timeout 30"/>

If you compare the two strings, you'll see that the wizard has taken the '&' of the numeric character reference and re-encoded it as a character entity reference. Eclipse decodes the character entity when it reads in the configuration file, but the result is the numeric character reference is not decoded. When the command string containing these numeric references is passed to pegdbserver, it crashes.

So there are two bugs at play here:

1. The KSDK Project Wizard is generating launch files with invalid strings.

2. The pegdbserver doesn't handle unexpected input gracefully.

As others have noted, the workaround is to go to the Debugger tab of the "Debug Configurations..." dialog and edit the Command string to replace the numeric references with a newline.

Alex

0 Kudos
1,873 Views
BlackNight
NXP Employee
NXP Employee

Hi Alex,

what is your host machine? I'm wondering because on my end I have not seen these strings in the debug configuration (used Windows 7). I'm wondering what is causing this.

Thanks,

Erich

0 Kudos
1,873 Views
alexu
Contributor II

Erich,

I have an I7 running Win7 Pro, KDS 3.1.0.201512141710 with "New Kinetis

SDK 2.x Project Wizard" 1.0.0201601260925. The full configuration is

attached.

When I create a project using the wizard (File->New->Kinetis SDK 2.x

Project), it has the bad strings.

Alex

0 Kudos
1,874 Views
PO220
Contributor IV

No explication but solution :

In debug configuration/ debugger/GDB Client settings

A have by default

set mem inaccessible-by-default off&#13;&#10;set tcp auto-retry on&#13;&#10;set tcp connect-timeout 30

whith

set mem inaccessible-by-default off

set tcp auto-retry on

set tcp connect-timeout 30

it's working now !

1,873 Views
guoht
Contributor II

It does not work when I debug S32K148 in S32 Design Studio for ARM , Version: 2018.R1.

pastedImage_1.png

0 Kudos
1,873 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

very interesting finding, thanks for sharing!

I'm not sure if this was the problem on my side. But I can confirm that if I have the same my side (with the wrong line endings), I see indeed the same problem. I report this to P&E so they coudl get this fixed.

Thanks!

Erich

0 Kudos
1,873 Views
dmarks_ls
Senior Contributor I

Erich, unless there's a P&E component generating the launch files when the project is created, this is primarily an NXP bug.

I don't know whether this is ultimately a KDS or KSDK issue, but it is a bug in your software.  The problem is that dot-launch files are being created with invalid debugger command strings, and this is compounded by the fact that the GDB server hangs when given these strings, and KDS hangs as well.

I'm using KDS 3.1, with a Kinetis Expert KSDK 2.0 build for the MKL17Z128.  I made a brand new KSDK 2.x project, didn't even build it, and opened the launch configuration.  Here's what it looks like as created by KDS/KSDK:

kds3_ksdk2_debug_config_broken.png

Look at the GDB Client Settings / Commands field.  Whatever tool or component is generating the launch file, isn't escaping CR-LF correctly, and they're being put in there as literal escaped characters.  Now here's all I have to do to make this launch configuration work:

kds3_ksdk2_debug_config_fixed.png

The solution is exactly as PO220 explained; just replace the badly escaped CR-LF pairs with actual newlines, and the launch configuration works.  This can be done in KDS as shown above; it's not necessary to use a text editor on the raw launch file.

I'm not sure how NXP didn't catch this during testing prior to release of the tools.  Please fix this in the next release of your tools; this burned an hour of my time, and I suspect it's burning dozens of other engineers' hours as they try to work around this, and eventually find this forum post.

0 Kudos
1,873 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

Yes, it is confirmed now that this is a bug in the Wizard plugin to create Kinetis SDK v2.0 projects. An update of this wizard shall be rolled out in the next days if not today on the Eclipse update site.

Thanks, and got assured that they follow up why this one had not been found during testing :-(,

Erich

0 Kudos
1,873 Views
PO220
Contributor IV

It's exactly the same with OpenSDA !

bootloader mode

pemicro bin here P&E Microcomputer Systems: Over 30 years as an Industry leader in Embedded Systems Development Tools...

change selected interface in debug configuration

GDB blocked at 94%....

:-(

reboot -> same

0 Kudos
1,873 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

I had the exact same problem, and it has been discussed here: Configuring GDB Aborting

I don't know what has caused this problem, but somehow it disappeared and now it is working. Same for someone else I know, plus the report in the above thread. I suspect there is some kind of problems between GDB and the USB drivers. As for you, the non-GDB way of talking to the device was workign fine.

The only suggestion I have right now is to try a different USB port (this helped in one case).

I have contacted P&E so hopefully we could nail down this one. To help investigating the issue on your machine, could attach the following file to this discussion?

C:\windows\inf\setupapi.dev.log

I hope this helps,

Erich

1,873 Views
PO220
Contributor IV

Hi

Thank you for your answer

No changes with an other usb port...

Attached is the requested file

I friend just test it ; it's the same  (with universal FX (black) and universal green)

This is amazing. Are we the only ones to use pod pemicro with KDS ?

Thanks. Blocked, your solution is expected as the messiah

0 Kudos
1,873 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

thanks for the file, I have P&E look at it.

As for using P&E: I'm using it a lot (and others do). As indicated in that thread: the reason is not known yet, and at least for me and a few others it disappeared. I hope it can be identified with your log file.

Erich

0 Kudos
1,873 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello David,

- Please check the debug configuration , which interface do you select :

pastedImage_0.png

- Could you please try the OpenSDA (j26) port to download,check whether it can work well ?

About use this method , please first copy and paste the file of "JLink_OpenSDA_V2.bin" to the bootloader mode,

refer to the RM of  ""FRDM-K64F Freedom Development Platform -Quick Start Guide.pdf"

pastedImage_0.png

BR

Alice

0 Kudos