Picoprobe debug cortex-debug how to get target Serial out

Hello,

I’m using VS Code, Platformio and picoprobe (newest software) to debug my RPi Pico(W)… Uploading and debugging works (SMSIS-DAP) fine for me, but now my question:

How I can fetch my Serial-Output from the target pico, when connected over picoprobe?

I searched the web, but don’t find any working hint. Who can help me?

Best regards
Svens
P.S.: Excuse my bad English, but I’m from Germany

If you’ve loaded a Pico with the Picoprobe firmware, it automatically has a serial port, too. As the official documentation for the Picoprobe says, GP4 and GP5 of the Picoprobe should be connected to GP1 and GP0 of the target board.

The next point is to make the Arduino firmware actually output something on that serial (UART0, GP1/GP0).

For Arduino-Pico, you’ll have to explicitly use Serial1 in your code, which is the hardware UART. This is documented. It may also help to completely disable the USB serial port (and the Serial object) so that any code that uses Serial fails to compile and stands out, as is again documented.

For ArduinoCore-mbed, also use Serial1.

Dear maxgerhardt,

many thanks for your quick answer to my question.

I’ve testet UART0 in the Arduino IDE 2.3.2 (with Serial.begin(115200), Serial1.println(“xxx”)) and I see the result on the terminal.

In VS code I use in platformio.ini following settings:

[env]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
framework = arduino
monitor_speed = 115200
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
lib_deps =
  adafruit/Adafruit SSD1306@^2.5.7
  adafruit/Adafruit GFX Library@^1.11.5
  majicdesigns/MD_AD9833@^1.2.2
  marlinfirmware/U8glib-HAL@^0.5.2

[env:pico]
board = pico
upload_protocol = cmsis-dap
debug_tool = cmsis-dap
build_type = debug
monitor_port = /dev/ttyUSB_picoprobe

[env:pico_debug]
board = pico
upload_protocol = cmsis-dap
debug_tool = cmsis-dap
debug_speed = 5000
build_type = debug
monitor_port = /dev/ttyUSB_picoprobe

In my main.cpp I also use:
Serial1.begin(115200);
Serial1.println(F(“TestText”));

But the “Test-Text” don’t appear on the opened Terminal.

Where is my mistake? Do I have to have special settings for the terminal and where I have to do this?

I hope, we can solve the problem. Any way upload and debugging is working very well.

Best regards from Germany
Svens

A serial monitor is not automatically started with the debug session.

Do you first of all see the regular print outputs when you upload + monitor the firmware that uses Serial1 regularly?

Thanks for your patience. But I’m very new with VS Code, PlatformIO & picoprobe.

I see in the opened terminal all prinouts when upload.

Do I’ve to change in my platformio.ini the entry “monitor_port”? My actual setting is “/dev/tinyUSB_picoprobe”. How can I after starting debugging open a termina/monitor listening on UART0/Serial1?

In the Arduino IDE 2.3.2 I can set the debug port to “Serial1” and all my Serial1.println-outputs can be seen on the opened terminal. I can’t find a way to listen on UART0 (Serial1) in VS Code/PlatformIO. Do you have a idea te make it work?

I don’t think PlatformIO can execute the “Monitor” task while doing the “Debug” tasks. I usually use a separate serial monitor program such as HTerm, PuTTY, etc.

Dear maxgerhardt,

many thanks again for your replay. I started a PuTTY-sesion and can now see the output on Serial1/UART0. So my problem is now solved and I can go on with my studies.

Have a nice weekend and best regards from Germany
Svens

Dear maxgerhardt,

here my update:

If I start first the debug(picoprobe) and later on a new terminal, this terminal show me the output of serial1.

Best reagrds
Svens