6 years, 1 month ago.

Debug Console

Hi,

can anyone tell me, how to deselect the debug console in an mbed project. I am using actually a STM32L432 Nucleo board. This project has automatically the DEBUG console activated. But in my project I need the USART1 and USART 2. Debugging runs over ULINK

best regards

Josef

1 Answer

6 years, 1 month ago.

Hello Josef,

This info might help.

Hello Zoltan,

thank's for your answer. But I am using PA2 and PA3 Ports for serial USART2. The Problem is, that the debugger Software uses the USART2. I have to clear every Software using USART2. best Regards

posted by Josef Baumann 22 Oct 2018
  • I'm a bit confused by what you mean by debugger sofware. I think that if we turn off (open) solder bridges SB2 and SB3 then the virtual serial port is going to be disconnected but PA2 and PA3 remain connected to USART2 and can be used by the user program.
  • If your problem is that global printf is used for debugging messages then one could redirect it to oher Serial port as below:

FileHandle* mbed::mbed_override_console(int) {
    static UARTSerial my_serial(PA_9, PA_10);
    return &my_serial;
}

But the problem is that there are only two serial ports available on this board.

posted by Zoltan Hudak 22 Oct 2018

Thank's Zoltan I fixed the problem. In the original code the UART2 is set to PA2 and PA15. In the NUCLEO board I am using PA2 and PA3 as UART ports. If you don't reinit PA15 to a GPIO port you have a second Rx port into the USART2. So you don't get a serial signal on this port. But: why ist it not possible to switch off the DEBUG console function without changing the mbed code???? If you have a embedded project you don't need the DEBUG console function!!!!!

best regards

Josef

posted by Josef Baumann 23 Oct 2018