AnsweredAssumed Answered

MCUXpresso 10.1.1 and MIMXRT1050-EVK debug

Question asked by Stefano Di Maio on Feb 9, 2018
Latest reply on Feb 12, 2018 by Stefano Di Maio

Dear Sirs,

                 I'm trying to debug a very simple application using MCUXpresso 10.1.1 and the evaluation board MIMXRT1050-EVK ( i.MX RT 1050 evaluation board ).

 

1) I've tested the project under Windows 7 32bit and Windows 10 x64 ( same result )

2) The SDK_2.3.0_EVK-MIMXRT1050 was built selecting all the available options

 

The attached project is a simple GNU C++ 11 autogenerated by the IDE.

int main(void) {

       /* Init board hardware. */
    BOARD_InitBootPins();
    BOARD_InitBootClocks();
    BOARD_InitBootPeripherals();
       /* Init FSL debug console. */
    BOARD_InitDebugConsole();

    printf("Hello World\n");

    /* Force the counter to be placed into memory. */
    volatile static int i = 0 ;
    /* Enter an infinite loop, just incrementing a counter. */
    while(1) {
        i++ ;
    }
    return 0 ;
}

 

[A] Test A - Using the onboard debug interface ( USB cable )

 

1)  Start debugging

2)  Press F6 until the debug cursor is over the i++ instruction.

 

 

3) Now press F6 several times until the green line ( debugging cursor ) disappears.

 

WHY THE DEBUGGER DOESN'T STOP ON THIS INSTRUCTION ?

 

4) Look at the debugging led on the evaluation board .... it's blinking ...endlessy!

 

 

5) The disassembly window shows that the i++ instruction hasn't been optimized everything should work properly!!!

If you force a breakpoint in the while loop the cursor reappears and the debugging is restored!

 

 

WHY THE DEBBUGGER DOESN'T STOP ON THIS INSTRUCTION AND SEEMS TO FREELY RUN ?

 

[B] Test B - Using the Segger J-Link Base version 9.3 drivers 6.30b ( last available version )

 

Unpredictable behaviour.

Sometimes the F6 key is not mapped on the right function, sometimes the debugger jumps in the hardware_handler routine.

[C] Test C - Using the J-Link 2 

 

Same behaviour as explained in [A].

 

 

 

Best regards

Attachments

Outcomes