Uno Q 4GB - AppLab Upload Fails with "Cannot open LinuxGPIOD chip 1 for swdio"

Hi everyone,

I am working with the Arduino Uno Q (4GB) running the native Debian Trixie environment and trying to upload a sketch. The compilation finishes successfully, but the upload process crashes via OpenOCD with the following log snippet:

Starting app "Weather forecast on LED matrix"
Sketch profile configured: Name="default", Port=""
The library Arduino_RouterBridge has been added from sketch project.
The library Arduino_RPClite has been added from sketch project.
The library MsgPack has been added from sketch project.
The library DebugLog has been added from sketch project.
The library ArxTypeTraits has been added from sketch project.
The library ArxContainer has been added from sketch project.
Sketch uses 70528 bytes (8%) of program storage space. Maximum is 786432 bytes.
Global variables use 25476 bytes (9%) of dynamic memory, leaving 236668 bytes for local variables. Maximum is 262144 bytes.
Board platform: arduino:zephyr (0.56.0) in /home/arduino/.arduino15/packages/arduino/hardware/zephyr/0.56.0
Used library Arduino_LED_Matrix (0.1.3) in /home/arduino/.arduino15/packages/arduino/hardware/zephyr/0.56.0/libraries/Arduino_LED_Matrix
Used library Arduino_RouterBridge (0.4.3) in /home/arduino/.arduino15/internal/Arduino_RouterBridge_0.4.3_456a4ab6b378b066/Arduino_RouterBridge
Used library Arduino_RPClite (0.3.0) in /home/arduino/.arduino15/internal/Arduino_RPClite_0.3.0_66fefd6c76c3d010/Arduino_RPClite
Used library MsgPack (0.4.2) in /home/arduino/.arduino15/internal/MsgPack_0.4.2_a0d4adc5044d022c/MsgPack
Used library DebugLog (0.8.4) in /home/arduino/.arduino15/internal/DebugLog_0.8.4_c199e2cf6415ecc8/DebugLog
Used library ArxTypeTraits (0.3.2) in /home/arduino/.arduino15/internal/ArxTypeTraits_0.3.2_d65e2aabfeed7838/ArxTypeTraits
Used library ArxContainer (0.7.0) in /home/arduino/.arduino15/internal/ArxContainer_0.7.0_007f0bb2a1cdefe3/ArxContainer
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/zephyr-arduino_uno_q_stm32u585xx.elf
/tmp/remoteocd/zephyr-arduino_uno_q_stm32u585xx.elf
/tmp/remoteocd/sketch.ino.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
Info : Halt timed out, wake up GDB.
Error: error running OpenOCD: exit status 1
Error: timed out while waiting for target halted
Failed uploading: uploading error: exit status 1

Please help me. I am a participant in the Arduino Physical AI challenge. I want to solve this problem before 14 July.

Hi @anurag_121204. If you have a shield or any external circuitry or components connected to your UNO Q board, try this experiment:

  1. Disconnect the power supply from the board.
  2. Disconnect all shields, modules, external circuitry, etc. from your board.
  3. Power up the board the board.
  4. Attempt to start the App via Arduino App Lab once again, just as you did before when you encountered this upload error.

This experiment will determine whether the upload error was caused by interference from the external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

Nice!

Is this the challenge you are participating in?:

"@ptillisch thank for your responce . but I have tried your method without any shields or modules attached, but it's still not working.

The thing is, my UNO Q's Linux side is working perfectly, but it isn't connecting to the microcontroller side. Based on my research, I can tell there isn't a software issue because I reset it using the Arduino CLI, but it's still not working like it did the first time. As we know, the Arduino UNO Q usually boots up showing the Arduino company logo, but it isn't displaying that either!"

Have you tried connecting to the Arduino side using Arduino IDE instead of applab. Make sure you have the lasted firmware updated for the board though in the IDE.

yes i have you it but no use this happen
Sketch uses 117024 bytes (14%) of program storage space. Maximum is 786432 bytes.
Global variables use 30876 bytes (11%) of dynamic memory, leaving 231268 bytes for local variables. Maximum is 262144 bytes.
Error: failed to create SSH connection: failed to dial SSH: dial tcp [2409:4081:585:63ba:ce38:1843:65ca:a3ca]:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Failed uploading: uploading error: exit status 1

i can still use it on! by connecting uno Q with monitor ,keyboard,mouse so if anybody have commands to check this there any connection or pipeline busses between cpu and microcontroller then plaz give mi

I don't know what you mean by "reset it using the Arduino CLI". What was the specific command you ran to do that?

@ptillisch i mean i use aeduino cli on arduino UNO Q to delete any data inside it and set it to factory setup

Are you referring to Arduino Flasher CLI?:

https://docs.arduino.cc/software/app-lab/configure/flash/#use-the-arduino-flasher-cli

"Arduino CLI" is something completely different.

yes i tried it


same result

Thanks for the clarification. It was definitely a good idea to reflash the operating system image using Arduino Flasher CLI, in order to get a fresh system and thus eliminate some problem with your system as a possible factor.

However, you should note that Arduino Flasher CLI only affects the microprocessor on the board. It doesn't have any effect on the microcontroller. So if the error is being caused by a problem with the microcontroller instead of the operating system, then reflashing the operating system won't necessarily be an effective method for restoring the board.

Please try performing a "burn bootloader" operation to reflash the Zephyr OS loader to the microcontroller on the UNO Q. I'll provide instructions you can follow to do that:

  1. Open a shell terminal on the UNO Q's Linux machine.
    • If you are using the board in "PC hosted mode": Start Arduino App Lab, connect it to the UNO Q board, then click the >_ ("Connect to the board's shell") icon near the bottom left hand corner of the Arduino App Lab window.
    • If you are using the board in "single-board computer (SBC) mode": Open the terminal by selecting Applications > Terminal Emulator from the desktop.
  2. A terminal window will open. Type the following command in the window:
    arduino-cli burn-bootloader --fqbn arduino:zephyr:unoq --programmer openocd
    
  3. Press the Enter key.

You should now see the output from the "Burn Bootloader" operation. It is expected to look something like this:

$ arduino-cli burn-bootloader --fqbn arduino:zephyr:unoq --programmer openocd

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/zephyr-arduino_uno_q_stm32u585xx.elf
/tmp/remoteocd/zephyr-arduino_uno_q_stm32u585xx.elf
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: 0x080170b8 psp: 0x20042918
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 2 at 0x08037724 with 12 bytes (bank write end alignment)
shutdown command invoked

If the "burn bootloader" operation completes successfully, then try starting an App again, just as you did when you encountered that "error running OpenOCD: exit status 1" error before. Hopefully this time it will be successful.

If the "burn bootloader" operation fails, please provide the full and exact output from the arduino-cli burn-bootloader command in a reply here on this forum topic.


Please let me know if you have any problems or questions while following those instructions.

thank you for help but it fails this is the out :

arduino@anurag12:~$ arduino-cli burn-bootloader --fqbn arduino:zephyr:unoq --programmer openocd
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/zephyr-arduino_uno_q_stm32u585xx.elf
/tmp/remoteocd/zephyr-arduino_uno_q_stm32u585xx.elf
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
Error: [stm32u5.cpu] clearing lockup after double fault
CPU in Non-Secure state
[stm32u5.cpu] halted due to debug-request, current mode: Handler NMI
xPSR: 0x29000002 pc: 0xeffffffe psp: 0x2002a948
Error: [stm32u5.cpu] Polling failed, trying to reexamine
Info : [stm32u5.cpu] Cortex-M33 r0p4 processor detected
Info : [stm32u5.cpu] target has 8 breakpoints, 4 watchpoints
Info : [stm32u5.cpu] Examination succeed
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 2 at 0x08037724 with 12 bytes (bank write end alignment)
Error: verify failed in bank at 0x08000000 starting at 0x00000000
Info : Padding image section 2 at 0x08037724 with 12 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x08037730 .. 0x08037fff
Error: timed out waiting for flash
Error: error running OpenOCD: exit status 1
Error: failed erasing sectors 0 to 27
auto erase enabled
Error during Upload: Failed to burn bootloader: uploading error: exit status 1
arduino@anurag12:~$

Unfortunately I don't have any ideas about how the board can be recovered from this state.

I would suggest contacting the customer service of the seller you purchased the board from. If you purchased the board directly from Arduino (either via the Arduino Store, or the official Arduino seller account on Amazon), then you can use this contact form:

https://www.arduino.cc/en/contact-us

is robo.in is official Arduino seller

That is correct:

https://store.arduino.cc/pages/distributors#distributor-group-2