Writing to Serial works fine on the Uno Q. Serial is the STM32u585 UART connected to pins 0 Rx and 1 Tx. The other UART connected to the QRB processor is Serial1/Monitor/RouterBridge. Using RouterBridge is optional.
This is a valid hello.ino program on Uno Q.
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello");
delay(1000);
}
To see the output connect a USB serial cable to GND, 0 Rx, and 1 Tx. Plug the USB end into Uno Q via a USB hub.
In my case, using a DSD Tech SH-U09C5 jumpered for 3.3V logic levels, the serial port appears on Linux as /dev/ttyUSB0.
In the hello directory with hello.ino add sketch.yaml with default arduino-cli parameters. This saves repeating the parameters on every command.
profiles:
default:
fqbn: arduino:zephyr:unoq
platforms:
- platform: arduino:zephyr
libraries:
default_profile: default
default_port: /dev/ttyUSB0
default_port_config:
baudrate: 115200
The following appears in the terminal window for compile, upload, and monitor. I use arduino-cli instead of App Lab when building non App Lab Arduino code.
arduino@UnoKyu:~/hello$ ls
hello.ino sketch.yaml
arduino@UnoKyu:~/hello$ arduino-cli compile
Sketch uses 1524 bytes (0%) of program storage space. Maximum is 1966080 bytes.
Global variables use 472 bytes (0%) of dynamic memory, leaving 523152 bytes for local variables. Maximum is 523624 bytes.
Note upload uses SWD so it does not use /dev/ttyHS1 or /dev/ttyUSB0.
arduino@UnoKyu:~/hello$ arduino-cli upload
Open On-Chip Debugger 0.12.0+dev-ge6a2c12f4 (2025-05-22-15:51)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
clock_config
/tmp/remoteocd/sketch.elf-zsk.bin
Info : Linux GPIOD JTAG/SWD bitbang driver (libgpiod v2)
Info : Note: The adapter "linuxgpiod" doesn't support configurable speed
Info : SWD DPIDR 0x0be12477
Info : [stm32u5.ap0] Examination succeed
Info : [stm32u5.cpu] Cortex-M33 r0p4 processor detected
Info : [stm32u5.cpu] target has 8 breakpoints, 4 watchpoints
Info : [stm32u5.cpu] Examination succeed
Info : [stm32u5.ap0] gdb port disabled
Info : [stm32u5.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
CPU in Non-Secure state
[stm32u5.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x08019392 psp: 0x2002ccf8
Info : device idcode = 0x30076482 (STM32U57/U58xx - Rev U : 0x3007)
Info : TZEN = 0 : TrustZone disabled by option bytes
Info : RDP level 0 (0xAA)
Info : flash size = 2048 KiB
Info : flash mode : dual-bank
Info : Padding image section 0 at 0x080f1d74 with 12 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x080f1d80 .. 0x080f1fff
shutdown command invoked
New upload port: /dev/ttyUSB0 (serial)
Serial port monitor.
arduino@UnoKyu:~/hello$ arduino-cli monitor
Monitor port settings:
baudrate=115200
bits=8
dtr=on
parity=none
rts=on
stop_bits=1
Connecting to /dev/ttyUSB0. Press CTRL-C to exit.
Hello
Hello
Hello
Hello
Using arduino-cli results in a fast compile/test cycle for tasks like testing i2c code to use Wire1 instead of Wire. Using Serial can also be useful when using App Lab because debug goes out Serial instead of Monitor (Serial1). Excessive Monitor.print can clog up Serial1 and delay other bridge traffic.