Serial Print with STM32 on Linux Mint

Hello

I am trying to output something to the serial monitor with my STM32. I use PlatformIO in Visual Studio Code and Linux Mint.

When I upload my code, “Hello” is output to PA9. How can I output it to a serial monitor via USB?

Project: https://github.com/lorenzgeisser/SerialPrintSTM32

main.cpp:

#include <Arduino.h>

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    Serial.println("Hello");
    delay(1000);
}

platformio.ini:

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino

monitor_speed = 9600

debug_tool = jlink
upload_protocol = jlink

Duplicate of Difficulty with getting USB serial [USB CDC] working - #6 by maxgerhardt.

1 Like