Full Version: Wow, v2 is here ! :-)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Could you share your project?
Which MCU are you using? Perhaps I can make an example project for you.

A possible small bug: 
if there is only a single line in the while(1) cycle, the single step doesn't stop, but keeps "auto stepping". :-)
You have a compiler warning, those warnings are important 
Your problem is not EBmonitor related but your C code, you have to include <stdio.h>

#include "main.h"
#include <stdio.h>

int a,b;
int main(void)
        printf("Hello World!\n");
The uC is an STM32F103C8T6. I have original and fake versions as well. The original STLink v3 and v3 mini doesn't like the counterfeit processors, but the v2 is working with them too.

I included, nothing changed except the warning.
Well, your project is working here without any problems if I include that <stdio.h>.
Unfortunately not working here. Live variables are working, but the EBMonitor window is empty.
Is it empty or is it showing the text how to enable it? That's a big difference.
In the first situation it can find the variables but doesn't get any data. In the second, the variables are not found (missing).
if there is only a single line in the while(1) cycle, the single step doesn't stop, but keeps "auto stepping". :-)

That's GDB related
EBMonitor is empty.

(To be on the safe side, I test with an original STLinkv3mini.)

If I run the program, EBMonitor works. But not in single step mode.

As I allways tested it in single step mode, didn't observed that until now. I added a breakpoint on EBmonitor_kbhit(), and observed, that single stepping that part, it wrotes to the EBMonitor window. 
Then I run the code, and it wrotes to EBMonitor. Single stepping in the Main() still not write to EBMonitor.
Single step is working but you are impatient, you have to step some more lines (in your case 1 line) till it become visible.

You are facing two different things here:

1) How printf in newlib is working
2) How EBmonitor is working

1) printf doesn not always flush out everything right away. But if you have a newline then most likely it will flush the line. This depends how the buffering is set.

2) EBmonitor normally stops when the debugger stops and will poll the pipe on a live time ticker. event.
    If you turn on "High-performance"  it will poll te pipe constantly instead of using the live time ticker.
    The latest consumes more bandwidth of the interface.
     With "High-performance" EBmonitor is still paused on debugger stop but you have more chance that it has pulled the data before it stops.

Normally when you are using printf you won't notice a time difference of 250ms.

If you need tight synchronisation between printf and output then you should use semihosting. Semihosting uses a breakpoint and hold the target till the info is taken by the host.
Pages: 1 2 3