Hi,
I have a STM32F4 discovery board and am using it on linux with command line tools (st-util, gdb). I'm wondering what the easiest way to print debug messages in the st-util terminals is? I saw chprintf, but i wasn't 100% clear on how to create a stream linked to the terminal.
Is this easy / feasible, am i going about things completely the wrong way...??
Any help would be much appreciated!
Simplest way to print messages in terminal
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Simplest way to print messages in terminal
Hi,
I never did that, if you are able to implement a stream then you could use chprintf() for that. What I usually do is to have a terminal connected to some serial port or USB virtual serial port and use a shell with custom commands over that.
Giovanni
I never did that, if you are able to implement a stream then you could use chprintf() for that. What I usually do is to have a terminal connected to some serial port or USB virtual serial port and use a shell with custom commands over that.
Giovanni
Re: Simplest way to print messages in terminal
I usually have two separate files (usb_shell.[ch]) which handle all the USB streaming part. There are a lot of demos in the ChibiOS repository (/demos) which show how to create a USB-CDC device. Then I use minicom as the linux serial terminal of my choice to communicate with the USB-CDC device (/dev/ttyACMx).
~ Tectu
~ Tectu