Cannot upload to XIAO_MG24 on Linux Mint

I am trying to upload a simple examle blink.ino to XIAO_MG24 on Linux Mint 21.3 Ubuntu 22.04. It compiles successfully, but I get an error that the CMSIS-DAP device is not found and cannot upload.
On Windows I can upload with no problem.
Please give me some hints on how to solve this problem.

Hardware : XIAO MG24
Core version : Sillicon Labs 2.2.0, 2.3.0
Arduino IDE version : 1.8.19, 2.3.4
Operating system : Linux Mint 21.3 Ubuntu 22.04

........
........
/home/fujino/.arduino15/packages/SiliconLabs/tools/gcc-arm-none-eabi/12.2.rel1/bin/arm-none-eabi-size -A /home/fujino/.cache/arduino/sketches/304ADF8D97FD6B72C56EE1C996457FA0/Blink.ino.elf
Sketch uses 64160 bytes (4%) of program storage space. Maximum is 1572864 bytes.
Global variables use 26476 bytes (10%) of dynamic memory, leaving 235668 bytes for local variables. Maximum is 262144 bytes.
"/home/fujino/.arduino15/packages/SiliconLabs/tools/openocd/0.12.0-arduino1-static/bin/openocd" -d2 -s "/home/fujino/.arduino15/packages/SiliconLabs/tools/openocd/0.12.0-arduino1-static/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; program {/home/fujino/.cache/arduino/sketches/304ADF8D97FD6B72C56EE1C996457FA0/Blink.ino.hex}; reset; exit"
Open On-Chip Debugger 0.12.0+dev-01514-g21fa2de70 (2024-02-07-19:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
efm32s2_dci_read_se_status
Error: unable to open CMSIS-DAP device 0x2886:0x62
Error: unable to find a matching CMSIS-DAP device

Failed uploading: uploading error: exit status 1

Hi @msfujino. In order for the Arduino development software to upload to the Arduino board, your Linux user account must have write permission for that device.

Standard user accounts don't have this permission by default. This error can occur when you attempt an upload without the necessary permissions. So it is necessary to configure your system to allow the upload. This is done by creating a special file.

I'll provide instructions you can follow to create that udev rules file:

  1. Open a command line terminal.
  2. Type the following command:
    printf 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="0062", MODE="0660", TAG+="uaccess' | sudo tee --append /etc/udev/rules.d/60-XIAO-MG24.rules && sudo udevadm trigger && sudo udevadm control --reload-rules
    
  3. Press the Enter key.
  4. If prompted for it, enter your Linux account password and press the Enter key.

The command should complete successfully. Now try uploading again. Hopefully the error will no longer occur.

Thanks for the quick response.
I have tried but get the same error.

udev

What should be in 60-XIAO-MG24.rules?

In the lower right corner of the screen,
Seeed Studio XIAO MG24 (Sense) on /dev/ttyACM0
and I think it is connected to the port.

Oops. I made a typo (a missing double quote). Here are the corrected instructions:

  1. Open a command line terminal.
  2. Type the following command:
    printf 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="0062", MODE="0660", TAG+="uaccess"' | sudo tee --append /etc/udev/rules.d/60-XIAO-MG24.rules && sudo udevadm trigger && sudo udevadm control --reload-rules
    
  3. Press the Enter key.
  4. If prompted for it, enter your Linux account password and press the Enter key.

Uploaded successfully. Thank you.

You are welcome. I'm glad it is working now.

Regards, Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.