Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EBlink as a terminal?
#11
(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
Reply
#12
(13-02-2021, 08:28 PM)dalbert Wrote:
(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
Hi, Dave,

I many years use the USB to TTL dongles and have a lot of completed projects with the embitz.  But,
1. For many embedded applications, there are no free UARTs in the MCU, especially in the low edge models, 030, etc.
2. There is not enough room on the PCB for a 6 pin connector, even 4 pins necessary for programming is sometimes
a problem to fit. EB monitor allows having only 4 or even 3 pin programmer/debugger connector for the STLink.
3. The EB monitor is very convenient to adjust by dialog some parameters of the application to store them in the MCU
flash or in onboard EEPROM, and call their values back with the EB monitor printf.  That is why I am looking for a possibility
to redirect the output to a file, without copy/paste.
But really I am happy with the current possibilities of the EB monitor.

I agree, that better to have the new 2.0 version.

Best regards,

Varuzhan
Reply
#13
(14-02-2021, 04:27 PM)vdaniel Wrote:
(13-02-2021, 08:28 PM)dalbert Wrote:
(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
Hi, Dave,

I many years use the USB to TTL dongles and have a lot of completed projects with the embitz.  But,
1. For many embedded applications, there are no free UARTs in the MCU, especially in the low edge models, 030, etc.
2. There is not enough room on the PCB for a 6 pin connector, even 4 pins necessary for programming is sometimes
a problem to fit. EB monitor allows having only 4 or even 3 pin programmer/debugger connector for the STLink.
3. The EB monitor is very convenient to adjust by dialog some parameters of the application to store them in the MCU
flash or in onboard EEPROM, and call their values back with the EB monitor printf.  That is why I am looking for a possibility
to redirect the output to a file, without copy/paste.
But really I am happy with the current possibilities of the EB monitor.

I agree, that better to have the new 2.0 version.

Best regards,

Varuzhan

Hi Varuzhan, I totally understand the low-pin-count I/O problem; I have used 6 and 8-pin AVRTiny uCs and been grateful for their 1-pin DebugWire interface (shared with the nReset pin!).  I realize you've probably considered it, but if it's just for configuration and logging, you could bit-bang a serial interface on PA13, PA14 (SWDIO, SWDCLK) without much effort.   ST app notes AN4457 and AN4655 discuss bit-banging a variety of protocols including asynch serial.
BR,
Dave
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)