V8.0.0 ITM Console

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

V8.0.0 ITM Console

205 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mubes on Thu Jan 07 06:51:48 MST 2016
Folks,

Last night, having finally (with some greatly appreciated help from support!) gotten 8.0.0 up and running in my configuration, I thought I'd have a play with the ITM Console before returning to doing 'real work'.

First things first; in my by now well-established awkward process, I'm building from a makefile, so I haven't used the low-level _read/_write routines provided, but rather added the --specs=rdimon.specs option to my linker command line.

I'm very happy to report that, with this in place, printf and scanf both work correctly for me to the SWO ITM Console window.  There are, however, a couple of observations that might be down to the way I'm implementing it, or might be system limitations. I'd be interested to know which;

[list]
  [*] The 'rest' of the (very very useful) additional functionality (specifically, profiling) seems to be broken when the ITM Console is in use....or at least I can't get it to work.
  [*] Output appears to be line-buffered, which makes it a bit difficult to output prompts and get nice responses back. fflush(stdout) and setbuf(stdout,NULL) both fix this problem but, interestingly, fflush seems to result in faster output than setbuf....that's a client side, not LPCXpresso side, issue though.
  [*] Cursor handling is a little strange in the ITM Console output window - it doesn't always keep up with 'point'.
[/list]

....none of these are showstoppers, and i/o functionality without the pain of setting up serial links is hugely useful, so please keep up the good work!

Regards

DAVE
0 Kudos
2 Replies

173 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mubes on Mon Jan 11 10:31:52 MST 2016
Hi there,

I do indeed start it from the script, not directly, because I often use the profiling functionality (which I confess to being somewhat addicted to now).  There is no problem with the ITM Debug output until I've used some of the 'other' ITM functions, such as the profiling, then it doesn't seem to work thereafter until I restart the debug session. 

I'm aware of the stdio buffering issues, I mostly mentioned them 'cos they're a good 'gotchya' when you're expecting output that never arrives.

None of this is a big deal to me...it's mostly just to provide documentation for others. I can provide more detailed reports on exactly what behaviours trigger the ITM Debug output failing if that's useful, but since I'm the arkward sod who uses Makefiles, it only really matters/has any benefit if the problems are on the host side of the equation and not the target side....please let me know.

Regards

DAVE
0 Kudos

173 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jan 11 09:11:10 MST 2016
With regards to some SWO functionality not working - from another thread, I think you are using Mac OS X. Can you confirm if your started the IDE by running the lpcxpresso.app file directly, or did you use the "open lpcxpresso" script, as mentioned in:

https://www.lpcware.com/content/faq/lpcxpresso/trace-overview

With regards to the buffering - from what your description - this is the way that we have always delivered the stdio functionality in the C library, historically using semihosting, but the ITM i/o just sits underneath the same C library code.

Regards,
LPCXpresso Support

0 Kudos