Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wow, v2 is here ! :-)
#11
Could you share your project?
Which MCU are you using? Perhaps I can make an example project for you.
Reply
#12
Sure.
https://drive.google.com/file/d/1FgYnFTH...sp=sharing

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". :-)
Reply
#13
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>

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

int a,b;
int main(void)
{
    printf("\f");
    while(1)
    {
        a++;
        b=a*a;
        printf("Hello World!\n");
    }
}
Reply
#14
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.
Reply
#15
Well, your project is working here without any problems if I include that <stdio.h>.
Reply
#16
Unfortunately not working here. Live variables are working, but the EBMonitor window is empty.
Reply
#17
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).
Reply
#18
About:
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
Reply
#19
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.
Reply
#20
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.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)