2023-02-26 08:52 AM
Hello everybody!
I want to implement a simple UART debug/diagnose tool for my application, using UART on NUCLEO-U575ZI -> Termite or whatever other PC terminal program. Could please someone help me with a link to a list of escape sequences that I can use in order to manage the output text on the terminal? Such as cursor movements, text color changes etc.
Thank you guyz!
2023-02-26 09:47 AM
Search the net for ANSI terminal or VT-100 control codes.
2023-02-26 02:45 PM
2023-02-26 05:18 PM
Guys thank you very much for the answers. I have found several sources with the codes, however I am a bit confused. For example, one source states: "ESC [ <n> A Cursor up by <n>". Great! But this is not the way we right the program code in C, right? What is "ESC"? Turns out that "ESC" is "\u001b", so in the code the command will look something like "\u001b[{n}A" :( Oh my... So perhaps someone knows a reference for ANSI commands, written in C-code friendly way?
P.S. Seems to have found!!
https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
2023-02-27 12:07 PM
Normally the ESC is '\x1B'. And the GCC/Clang additionally support a non-standard '\e'.
2023-02-27 08:15 PM
I am puzzled, I don't think using a usart with a PC terminal such as Teraterm is mostly used to draw text in 2D screen. If you need pseudo graphical and not making a pong game, explore Android App "Bluetooth Electronics" which turns your phone into a remote bluetooth serial display with interactive widgets.
An example for STM32C031 with screen capture and source code can be found here.
Dig SIF.C (serial interface) and BTELxxx.c (Bluetooth Electronics) source file.
2023-02-28 03:41 PM
Thank you!