multilink probe causes hang when debugging in freertos

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

multilink probe causes hang when debugging in freertos

Jump to solution
1,533 Views
tfont
Contributor I

I have a multilink probe connected to a KL17Z64.  When I'm debugging a customized version of the freertos_hello example, the probe causes a jump to an endless loop in the bootrom address space (0x1c002224) shortly after vTaskStartScheduler is called.  The Debug window shows: (Tmr Svc) (Suspended : Signal : SIGINT:Interrupt). If the same build is run without the probe, the program runs correctly.

How do I fix this?

0 Kudos
1 Solution
1,288 Views
edisontam
Contributor I

Hi Anthony,

Try unchecking the "Enable Streaming" option in your debug Configurations. Based on the error message, it seems like port 8080 may already be used on your PC. If this solves the problem and you do want to re-enable the Streaming features in the future, you can specify a different port number.

DisableStreaming.png

View solution in original post

0 Kudos
4 Replies
1,288 Views
lpcxpresso_supp
NXP Employee
NXP Employee

What version of MCUXpresso IDE, and what version of the P&E Micro plugins are you using?

I presume that if you debug a standard out-of-the-box FreeRTOS demo project, you don't see any issues?

Does turning off the P&E Micro rtos awareness cause any improvement in behaviour (though that will loose you your thread awareness) : using the "-kernel=none" option as per : P&E ARM Cortex-M Debugging with FreeRTOS Thread Awareness and Real Time Expressions for GDB and Ecli... 

 

Might also be worth running through : Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse | MCU on Eclipse 

Regards,

MCUXpresso IDE Support

0 Kudos
1,288 Views
tfont
Contributor I

I’m using V10.2.1 for the IDE and V3.7.8 for the plugin.

 

I’m specifically using the MKL17Z64FM4 on a custom board.  There’s no exact demo project for the KL17 but I have tried the frdmKl27z_freertos_hello without modifications and the same problem occurs.  Here’s the debug trace:

 

frdmkl27z_freertos_hello PE Debug [GDB PEMicro Interface Debugging]    
    frdmkl27z_freertos_hello.axf    
        Thread #1 536868992 (Tmr Svc) (Suspended : Signal : SIGINT:Interrupt)    
            0x1c002224    
            <signal handler called>() at 0xfffffffd    
            ucHeap() at 0x20000520    
            0x0    
        Thread #2 536867888 (IDLE) (Suspended : Container)    
        Thread #3 536867392 (Hello_task\020\032P\002P\375D\006@\362\377\037\310\313P\002P\375D\006\257\240H) (Suspended : Container)    
    C:\nxp\MCUXpressoIDE_10.2.1_795\ide\plugins\com.pemicro.debug.gdbjtag.pne.expansion_3.7.8.201810122006\win32\pegdbserver_console    
    arm-none-eabi-gdb    

 

I also tried starting with frdmKl27z_freertos_hello and changing the MCU to MKL17Z64xxx4 and this crashes as well using the debugger.

 

My modified version that works WITHOUT the debugger is the frdmKl27z_freertos_hello with the MCU changed to MKL17Z64xxx4 and the appropriate pin muxing set up to direct the console output out LPUART0.  I have two tasks running both continuously outputting printf statements so I have some way to confirm tasks are running.

 

When single-stepping from the beginning of main(), I get as far as the prvProcessReceivedCommands() call in prvTimerTask().  At the moment I step into prvProcessReceivedCommands, I end up in the endless loop at 0x1c002224.

 

Setting "-kernel=none" is no improvement.  The troubleshooting link you provided says: “The P&E debug connection has no special setting for FreeRTOS thread aware debugging and does it automatically, so there is no option to turn it on or off.” 

 

The troubleshooting link also says the console output should indicate: “Successfully initialized kernel symbols.”, which I do see but I also see an exception:

Exception : Could not bind socket.  Address and port are already in use. at special_features(4000005e)

Warning – Exception Occurred. (PE.438)

Exception Message : Could not bind socket.. Address and port are already in use

Connection from “127.0.0.1" via 127.0.0.1

0 Kudos
1,289 Views
edisontam
Contributor I

Hi Anthony,

Try unchecking the "Enable Streaming" option in your debug Configurations. Based on the error message, it seems like port 8080 may already be used on your PC. If this solves the problem and you do want to re-enable the Streaming features in the future, you can specify a different port number.

DisableStreaming.png

0 Kudos
1,288 Views
tfont
Contributor I

Thank you Edison.  This has solved my problem.  I didn't really need the streaming, it was enabled by default.

0 Kudos