(13-02-2021, 01:40 PM)vdaniel Wrote:(13-02-2021, 12:23 PM)dalbert Wrote:(18-01-2021, 01:37 PM)vdaniel Wrote: It is certainly possible to make a fully functional terminal (command line interface) using just the STLink and EBMonitor, I do it all the time.
I documented how to do it on my blog: https://www.dalbert.net/?p=921
The only issue is that if you want to support *both* UART (for non-developer use) *and* EBMonitor (for developer use), you need to unhook _write() for your debug builds since EBMonitor must hook it to do its thing. I add a define for USE_EBMONITOR to my Debug build options (Compiler Settings->#defines) and then wrap the _write() implementation for uart I/O in an #ifndef USE_EBMONITOR
I'll add some detail on this to my blog page soon, but maybe Gerard has a better idea for how to do this?
Hi, dalbert,
Thank you very much.
I know your post of 7 December 2020. With your recommrndations I
successfully made a project and even a geheric embitz project, which I placed
in this forum.
But I need a possibility to redirect the EB monitor printf results to a file.
And maybe, it is possible to have a standalone monitor (not from embitz IDE).
vdaniel
Hi vdaniel,
I have not tried redirecting the EB monitor output to a file. It would be nice to have an external EBMonitor application so you could use the STLinkV2 as a debug console without running EmBitz and the debugger, but that might be asking a big effort of Gerard for a fairly small return since there is an easy work-around (and personally, I'd rather he spend any time he's willing to put into this project on EmBitz 2.0). As I mentioned, it's pretty easy to have the same code build for EBmonitor output via STLinkV2 for Debug builds and via UART output for Release builds; that way you can use your release build with any USB-to-TTL serial dongle and any serial terminal software (e.g. TeraTerm, PuTTY, etc.) to interact with your target and capture output to a file. If it's not clear how to do that, let me know and I'll be happy to help. I've added a quick post to my blog about embedded CLI implementation using both UART and EBmonitor (see here: https://www.dalbert.net/?p=927). I'll fill it in with more detail later if there's interest and I have time.
BR,
Dave