Hello everyone,
I have developed an application on the iMXRT-1064 without an operating system. Among its various features, the application includes an EtherCAT master, with communication maintained through a timer interrupt.
I would like to use breakpoints to pause the code execution in order to inspect variable values or verify the logical flow. However, when a breakpoint is hit, all interrupts and code execution are halted as well, causing the EtherCAT connection to drop.
Is there a way to set breakpoints that halt the main execution but still allow certain interrupts, such as the one handling the EtherCAT communication, to continue running?
Thank you for your help!
已解决! 转到解答。
Hi @Davidino,
I'm afraid this isn't possible either. As mentioned on the MCUXpresso IDE FreeRTOS Debug Guide: "If the execution of a user task is halted either through a user action (halt) or a debug event (breakpoint, watchpoint, fault, and so on), the stopped thread is current and no application thread executes in the background."
BR,
Edwin.
Hello @EdwinHz,
Thank you for your answer. One last question: if I start adopting FreeRTOS and enable the use of multiple threads, is it possible to pause one thread using the debugger while leaving the others running?
Thank you.
Hi @Davidino,
I'm afraid this isn't possible either. As mentioned on the MCUXpresso IDE FreeRTOS Debug Guide: "If the execution of a user task is halted either through a user action (halt) or a debug event (breakpoint, watchpoint, fault, and so on), the stopped thread is current and no application thread executes in the background."
BR,
Edwin.
Hi @Davidino,
I'm afraid there isn't an option to have breakpoints that halt execution of the MCU while allowing specific interrupts.
The most there is, is Debug Mode on your ENET module as described on section "41.3.9.3 Debug mode" of the RM.
BR,
Edwin.