Hi,
I'm new to the STM32 and ChibiOS. I have successfully flashed the RT-STM32F407-DISCOVERY-MEMS demo project using st-util in one terminal, and arm-none-eabi-gdb in another terminal. The leds light up as expected, but I can't see any text printed in the console. In the main.c file I can see a lot of chprintf calls.
Am I looking in the wrong place for the chprintf output?
Thanks!
Where can i see the output of chprintf() ?
Moderator: RoccoMarco
Re: Where can i see the output of chprintf() ?
as far as i know chpritnt is justa lightweight versione of printf, and by default it write to nothing. You have to create a stream (to serial, usb, even tcp) and then write into that
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Where can i see the output of chprintf() ?
Hi,
The first parameter is the stream where the chprintf() writes on. If it is something like &SDx the it is a serial port, if you see &SDUx then it is a virtual COM port over USB.
The function can write on anything implementing a "stream interface".
Giovanni
The first parameter is the stream where the chprintf() writes on. If it is something like &SDx the it is a serial port, if you see &SDUx then it is a virtual COM port over USB.
The function can write on anything implementing a "stream interface".
Giovanni
Re: Where can i see the output of chprintf() ?
I found this in the code, so I guess it's using a virtual COM port over USB:
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
How can I acyually read the stream from a Linux terminal?
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
How can I acyually read the stream from a Linux terminal?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Where can i see the output of chprintf() ?
You need to plug the board on an USB port then a new TTY should be created, then you can use a terminal emulator and interact with the board.
Giovanni
Giovanni