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) {
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
BOARD_InitDebugConsole();
printf("Hello World\n");
volatile static int i = 0 ;
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.
![[01] F6 from start to variable increment.jpg [01] F6 from start to variable increment.jpg](https://community.nxp.com/t5/image/serverpage/image-id/4752iDF73CF75AAB5C206/image-size/large?v=v2&px=999)
3) Now press F6 several times until the green line ( debugging cursor ) disappears.
![[02] Lost debugging cursor.jpg [02] Lost debugging cursor.jpg](https://community.nxp.com/t5/image/serverpage/image-id/4753iA9C8DC3584A8AD12/image-size/large?v=v2&px=999)
WHY THE DEBUGGER DOESN'T STOP ON THIS INSTRUCTION ?
4) Look at the debugging led on the evaluation board .... it's blinking ...endlessy!
![[03] Debugger Led blinking.jpg [03] Debugger Led blinking.jpg](https://community.nxp.com/t5/image/serverpage/image-id/4674iB358F23C795EDE80/image-size/large?v=v2&px=999)
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!
![[04] Disassembly window.jpg [04] Disassembly window.jpg](https://community.nxp.com/t5/image/serverpage/image-id/4754i0B3A892C86B024B8/image-size/large?v=v2&px=999)
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