cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
viggy
Observer
Observer
243 Views
Registered: ‎11-28-2018

Setting a breakpoint in Vitis

Hi,

I'm trying to debug a bare metal application running on a 4 core MicroBlaze design. I set a breakpoint in my source code (in Vitis), but when I launch the debugger, the breakpoint changes to a warning, with "Line breakpoint: helloworld.cpp [line: 138] failed to plant: End of file"

What does this mean, and why can't I step through my code?

Thanks!
Viggy

0 Kudos
2 Replies
florentw
Moderator
Moderator
186 Views
Registered: ‎11-09-2015

HI @viggy 

This is probably because your code (and this particular line) is getting optimized by the compiler. You can try to change the optimization level to prevent optimizations


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
viggy
Observer
Observer
167 Views
Registered: ‎11-28-2018

Hmm, I found that if I comment out this section of code, setting breakpoints suddenly works:

u32 uart_tx_empty = 0;
while (uart_tx_empty != 1) {
// Note: sleeping for 0.2 seconds would be better...
// Note: sleep doesn't work on MB it messes up the debugger
// https://forums.xilinx.com/t5/Embedded-Development-Tools/microblaze-sleep/td-p/47196
//sleep(0.25);
 uart_tx_empty = (Xil_In32(ADDR_UART_STAT) >> 2) & 1;
}

Viggy

0 Kudos