Debugging with breakpoint without stopping all interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging with breakpoint without stopping all interrupt

跳至解决方案
1,301 次查看
Davidino
Contributor IV

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!

 

标记 (2)
0 项奖励
回复
1 解答
1,247 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

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.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,257 次查看
Davidino
Contributor IV

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.

0 项奖励
回复
1,248 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

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.

0 项奖励
回复
1,278 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

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.

0 项奖励
回复