KDS 3.2 debug SIGTRAP

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

KDS 3.2 debug SIGTRAP

1,316 Views
Toe
Contributor IV

I have run into the exact same problem found in this thread: KDS 3.2 debug mode not working with KL03Z32M4 .

 

I was using KDS 3.2 with a few different MCUs.  Most recently the FRDM-KL27Z for proof of concept and a KL17 in implementation.

 

I created a basic app to poll a switch and turn on an LED (that is attached here).  This project uses KSDK 2.0 and the SDA from the FRMD-KL27Z for debugging.  This compiles fine and flashes correctly (with unnecessary NO RESET SCRIPT warning).  Letting the debugger go without any breakpoints causes the SIGTRAP issue:

155093_155093.pngpastedImage_1.png

 

When the trap occurs the MCU does continue to run and button presses will toggle LEDs.  Once the trap has triggered I can add a break-point in the main loop and after hitting Resume the debugger will reach it, but if the break requires some event to occur the trap will re-trigger.

 

Following Thomas's suggestion from the other thread, I installed KDS 3.1 (well, 3.0 and as much of the 3.1 zip as it could handle).  That did cause the PE drivers to re-install.  Load the same project and the debugger issue no longer occurs.

 

I did not uninstall KDS 3.2, so I can go back and forth to see that the project works with 3.1 and not with 3.2.

 

I created this post because the one linked is "assumed answered", but I don't feel that it really is.  Why is debugging for these MCUs not working in KDS 3.2?

Original Attachment has been moved to: frdmkl27.zip

Labels (1)
0 Kudos
5 Replies

956 Views
nicktuckett
Contributor I

I had exactly the same problem when I upgraded from KDS 2.0.0 to 3.2.0 with some KL26Z projects.

I upgraded the PEMicro SDA firmware on the board (FRDM-KL26Z) to v118, but that didn't help.

I then upgraded the PEMicro GDB plugin via the Eclipse updater site at:

http://www.pemicro.com/eclipse/updates

There was a newer version there (2.5.9.201609160049) - once that was installed and KDS restarted, the SIGTRAP issue went away.

0 Kudos

956 Views
DavidS
NXP Employee
NXP Employee

Hi Ryan,

Thank you for including the project.  It makes it easier to help.

A few observations.

First the Compiler Preprocessor Defined symbol for both "C" and "C++" was:

"CPU_MKL27Z64VMP4"

and needs to be:

"CPU_MKL27Z64VLH4" for the FRDM-KL27Z.

Second your code seems fine.  It seems the PEMicro debugger does not like debugging at slow frequencies.  In your case 1MHz.  If I left the default frequency then it debugged fine.

Switching to Segger JLink firmware allowed me to debug at the 1MHz clocking.

I've attached that firmware in ZIP file.

Regards,

David

0 Kudos

955 Views
Toe
Contributor IV

Thanks for the reply David.

I'm looking for where the PEMicro allows me to change the debugging frequency.  I have not intentionally changed it away from the default if it is doing that.

Under the debugger tab in the debug configurations the target communication speed only allows me to change the delay after reset; the debug shift frequency is grayed out.

I was also using the PEMicro SDA because it functions similarly to the PEMicro Universal Multilink BDM.  I have another project that I also cannot debug properly and I do not have a Segger JLink that I can use to work with it.

I can still debug this application with the older KDS, so maybe it is as simple as correcting a debugger option in 3.2?

0 Kudos

956 Views
Toe
Contributor IV

Another piece of information that may help here: I'm running in VLPR which sets up the clock to be 2MHz.  If the clock is running full speed (48MHz) this debug issue is not present.

0 Kudos

956 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

I also experienced P&E can't working well with low frequency. I use Jlink Opensda instead.

You can upload FRDM-KL27Z board to Jlink OpenSDA interface very easy:

Segger J-Link OpenSDA Firmware update procedure:

  1. Disconnect all power, external circuits and USB cables.
  2. Press and hold the button marked RESET
  3. Connect a USB cable with debug interface as shown in above picture
  4. The drive should mount named BOOTLOADER in windows explore.
  5. The reset button can now be released
  6. Drag and drop the file JLink_OpenSDA_V2_2015-04-23.bin onto the USB drive named BOOTLOADER
  7. Repower board normally
  8. Jlink CDC UART Port will show up in windows device manager.

pastedImage_2.png

  1. Then user can download and debug code via KDS3.0 debugger Segger J-Link OpenSDA interface.


Have a great day,
Jennie Zhang

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

0 Kudos