You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The benefit is that a developer would only need to connect the SWD port (and power), and have:
Debugging
Programming new firmware
Interactive Terminal
All through the single SWD connection.
This is not technically difficult. The firmware already has some basic concept to redirect the USB CDC to a UART. This would extend this concept.
At present, RTT Channel 0 exists and is setup for bi-directional communication, but no code checks for input from the host.
Adjust debug_rtt.h so that printf-style macro prints to a per-core buffer, prefixed with a non-zero virtual terminal indicator and ending with a zero virtual terminal indicator. (VT indicator is just byte 0xFF followed by a byte in range 0x00..0x0F to indicate the virtual terminal).
Hook the printf() style output to also output via RTT
Hook the getc() style input to also accept input from RTT
As an optimization / stretch goal:
Format strings once into the per-core buffer, with VTT prefix and postfix
Send the formatted string via RTT
Overwrite the postfix with NULL
Send the formatted string (starting at offset 2) to USB CDC and/or UART (per config)
The text was updated successfully, but these errors were encountered:
The benefit is that a developer would only need to connect the SWD port (and power), and have:
All through the single SWD connection.
This is not technically difficult. The firmware already has some basic concept to redirect the USB CDC to a UART. This would extend this concept.
At present, RTT Channel 0 exists and is setup for bi-directional communication, but no code checks for input from the host.
debug_rtt.h
so that printf-style macro prints to a per-core buffer, prefixed with a non-zero virtual terminal indicator and ending with a zero virtual terminal indicator. (VT indicator is just byte0xFF
followed by a byte in range0x00..0x0F
to indicate the virtual terminal).printf()
style output to also output via RTTgetc()
style input to also accept input from RTTAs an optimization / stretch goal:
The text was updated successfully, but these errors were encountered: