7 years, 9 months ago.

How to get debug output from NUCLEO F091RC

I'm used mbed to compile, and want to debug. How can I get printf or debug message output? Does mbed have a way to get printf direct from Nucleo's USB port?

Or, must I use Nucleo's STLINK RX/TX and to serial/USB cable, to Windows-7 terminal emulator (HyperTerminal, putty, etc)

I got it working with this:

Accel driver top page: https://developer.mbed.org/teams/ST/code/X_NUCLEO_IKS01A1/file/f507d4465c31/Components/lsm6ds3/lsm6ds3_class.h  HelloWord  Import to Compiler > Import Replace its main() with Serial pc(USBTX, USBRX);

DigitalOut myled(LED1);

int main() { int i = 1; pc.baud(9600); pc.printf("Hello World !\n"); while(1) { wait(1); pc.printf("Project HelloWord IKS: This program runs since %d seconds.\n\r", i++); myled = !myled; } }

 Compile > Save As > F:

posted by DOUG BELL 12 Aug 2016

1 Answer

7 years, 9 months ago.

I assume you have installed the st-link driver software since you can see the nucleo as removable memory and download a new bin file. The St-link hardware also provides a serial to USB interface that allows you to print messages on a windows terminal application such as hyperterminal. The st-link driver software provides a virtual com port that should now show up on the PC if you check the windows device panel. Select the appropriate com port number in hyperterm, set baudrate etc to 9600,8,n and the printf from the hello_world application that you have found should show on your screen.

Accepted Answer