How to program a LoRa-E5

SWO is on PB3 of the chip and this pin is available on the Lora-E5 module. I tried to get it working as a console output. I don’t recall how successful I was, but I don’t use it, which probably means it was not useful, in my case. I find I made notes on this, whcih I copy below. Note that I have not reviewed these note for accuracy etc - use at your own risk.

Console output using SWO pin

Start by looking at Console_Output.txt to see how APP_LOG and printf() work.
Redirecting printf() to the SWO pin sees possible and is documented in several places such as:

1 AN4989 Application note STM32 microcontroller debug toolbox section 7.3

2 Succinct summary: printf() using ST-Link debug interface (SWD, ITM View) - embedded communication

3 This video : https://www.youtube.com/watch?v=Efgp34LbkLU

4 This video - shows _write() code at 4: https://www.youtube.com/watch?v=JqrUAzjJ0tw
It starts with showing connecting a wire but does not explain why. The next link does.
(It connects target nRST to a St-Link v2)

5 SWD part 3 – SWO and nRST – Kudelski Security Research

6 Erich Styger Tutorial: Using Single Wire Output SWO
Tutorial: Using Single Wire Output SWO with ARM Cortex-M and Eclipse | MCU on Eclipse
Also: SWO | MCU on Eclipse

7 Using Printf Debugging, LIVE expressions and SWV Trace in CubeIDE || STM32 || ITM || SWV
https://www.youtube.com/watch?v=sPzQ5CniWtw

These examples extend the printf() direction documented in Console_Output.txt by changing the _write()
call to make calls to ITM_SendChar(); or as the ST App note AN4989 says:

int __io_putchar(int ch) {
ITM_SendChar(ch);
return(ch);
}