#80 Enabling SWO works and prints to Eclipse console, but not with every \n

Next release
closed-works-for-me
None
5
2014-02-14
2014-01-23
Philip Gruebele
No

I enable SWO and everything works as expected except that not every line gets printed out as it is received. When an incoming string has a \n character, this should force flushing of the SWO buffer to the console so it is visible. Currently every 4th line (or thereabouts) is printed together with the next line after it is logged.

This is with GNU ARM J-Link Debugging Support (Experimental) 1.3.1.201401221754 and Eclipse Kepler SR1 Under Win 8.1

Discussion

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • this sounds strange, since I use SWO a lot and never encountered it.

    could you do another test, start the gdb server manually, and telnet to port 2333 to check if this is from Eclipse or from the library?

    what toolchain do you use?

     
  • I checked again on windows, using a program generated with the F4 template, which counts seconds and displays this as

    printf("Second %d\n", seconds);
    

    and the output is flushed with each line.

    anyway, the plugin does nothing special, just passes the socket as a java stream to the Eclipse console, without any buffering, so any problem is most probably in the application.

     
    • status: open-accepted --> closed-works-for-me