MCUXpresso 11.7.1_9221 i.MX RT1172: Problems debugging w/ PEMicro Cyclone FX

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

MCUXpresso 11.7.1_9221 i.MX RT1172: Problems debugging w/ PEMicro Cyclone FX

Jump to solution
1,569 Views
mjosborne1
Contributor III

Hello,

we have a custom board with a RT1172; we have been using MCUXpresso 11.4.0_6224 and had no problems debugging.

I just updated to 11.7.1_9221 and am now having issues debugging, where the GDB connection shuts down. Pausing, or stepping over/in/out of functions seems to be the trigger; when I do this there is a noticeable delay before the IDE becomes active again.  I tried 11.5.0_7232 and have similar issues; then back to 11.4.0_6224 and no issues.

Sometimes, in the IDE console I see:
PE-ERROR: GDB Client Processing : Exception Occured : PROGRAM EXCEPTION!
EXCEPTION CLASS: EIDSOCKETERROR
MESSAGE: SOCKET ERROR # 10054
CONNECTION RESET BY PEER.
ADDRESS 0X005FC2BC

Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "61792" from 7224
Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "61790" from 6224
Target Disconnected.

 

And in the IDE Debugger Console
/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-338_20211018_1634516203/src/gdb/gdb/utils.c:671: internal-error: virtual memory exhausted: can't allocate 4064 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

In the Windows Resource Monitor I also see GDB memory usage increase quite a bit when pausing/stepping as mentioned above; still lots of memory available though.

UPDATE: I installed 11.4.1_6260 and didn't have any issues with that version either.

Thanks for the help,

Matt

0 Kudos
1 Solution
1,321 Views
lpcxpresso_supp
NXP Employee
NXP Employee

MCUXpresso IDE v11.7.0 has a newer GDB (ARM GNU Toolchain altogether) compared to IDE v11.4.x.

Also, if I understand correctly, you're trying to debug an MQX-based application. If LinkServer debug solution is used, MQX GDB thread awareness is currently available in IDE v11.7.x. Please take a look at the corresponding user guide.

Regarding the unwanted GDB behavior, I suggest you take a look at the following GDB bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28219. Make sure you recompile everything with "-g" (as mentioned in the comments) and report back the results.

Regards,
MCUXpresso IDE Support

View solution in original post

5 Replies
1,530 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @mjosborne1 

Between versions of MCUXpresso and SDKs could cause some drivers or projects/examples bugs, did you update both to the most recent version? (MCUXpresso and SDK) Since you are using custom board I recommend you to use the version that works for you in case updating the sdk does not resolve your issue.

Best Regards, Miguel.

0 Kudos
1,435 Views
mjosborne1
Contributor III

OK, sorry for the delay...

Yes the SDK is up to date and in sync, no issues there.

So we've been able to confirm this issue on the EVK as well, and also using MCU-Link and J-Link (in CMSIS-DAP) probes.

These are all MQX projects, although it doesn't seem to depend on the TAD plug-in being installed.

This issue sounds very similar to one here: 
https://community.nxp.com/t5/MCUXpresso-IDE-Knowledge-Base/MCUXpresso-IDE-v11-6-0-Now-Available/ta-p...

  • Fixed: [Debugger] "GDB crash - internal-error: virtual memory exhausted" debugger reported error. This was indirectly fixed by:
    • Fix FreeRTOS SP offset (LinkServer GDB thread awareness reported an incorrect value for the SP register with FreeRTOS applications);
    • Document the LR stack unwind issue on FreeRTOS.

Just got TAD working so we can see the threads, and when you expand the thread view to see the call stack GDB memory usage jumps up and eventually crashes.

0 Kudos
1,366 Views
mjosborne1
Contributor III

I've contacted Embedded Access and they have also been able to reproduce the issue using their MQX example projects and the EVK; they will be looking into this for us.

0 Kudos
1,322 Views
lpcxpresso_supp
NXP Employee
NXP Employee

MCUXpresso IDE v11.7.0 has a newer GDB (ARM GNU Toolchain altogether) compared to IDE v11.4.x.

Also, if I understand correctly, you're trying to debug an MQX-based application. If LinkServer debug solution is used, MQX GDB thread awareness is currently available in IDE v11.7.x. Please take a look at the corresponding user guide.

Regarding the unwanted GDB behavior, I suggest you take a look at the following GDB bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28219. Make sure you recompile everything with "-g" (as mentioned in the comments) and report back the results.

Regards,
MCUXpresso IDE Support

1,259 Views
mjosborne1
Contributor III

Thank you!

I changed the debug level in our MCUX projects from the default (-g3) to -g and it appears to have worked around the issue. 

In my initial attempt to try this workaround I missed adding this option to one of several libraries (PEG) being used, and the behaviour was improved (could debug longer) but not resolved.

I've confirmed a debug level of -g in the compilation args for all source/libraries being included and now it's looking good.

0 Kudos