I have been recently trying to make the Atmel ICE debugger work with openOCD under ubuntu 20.04 running on WSL2.
When running the openOCD with the atmel debugger config below
source [find interface/cmsis-dap.cfg]
set CHIPNAME atsame54p20a
source [find target/atsame5x.cfg]
i get this Error :
Error: 75 70 cmsis_dap.c:259 cmsis_dap_open(): unable to find a matching CMSIS-DAP device
Full openOCD output here:
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 0 options.c:63 configuration_output_handler(): debug_level: 3
User : 14 0 options.c:63 configuration_output_handler():
Debug: 15 0 options.c:244 add_default_dirs(): bindir=/usr/bin
Debug: 16 0 options.c:245 add_default_dirs(): pkgdatadir=/usr/share/openocd
Debug: 17 0 options.c:246 add_default_dirs(): exepath=/usr/bin
Debug: 18 0 options.c:247 add_default_dirs(): bin2data=../share/openocd
Debug: 19 0 configuration.c:42 add_script_search_dir(): adding /home/iwahdan/.config/openocd
Debug: 20 0 configuration.c:42 add_script_search_dir(): adding /home/iwahdan/.openocd
Debug: 21 0 configuration.c:42 add_script_search_dir(): adding /usr/bin/../share/openocd/site
Debug: 22 0 configuration.c:42 add_script_search_dir(): adding /usr/bin/../share/openocd/scripts
Debug: 23 0 configuration.c:97 find_file(): found openocd.cfg
Debug: 24 0 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/interface/cmsis-dap.cfg
Debug: 25 1 command.c:146 script_debug(): command - adapter driver cmsis-dap
Debug: 27 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/target/atsame5x.cfg
Debug: 28 1 configuration.c:97 find_file(): found /usr/bin/../share/openocd/scripts/target/swj-dp.tcl
Debug: 29 1 command.c:146 script_debug(): command - transport select
Info : 30 1 transport.c:275 jim_transport_select(): auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Debug: 31 1 command.c:146 script_debug(): command - transport select
Debug: 32 1 command.c:146 script_debug(): command - transport select
Debug: 33 1 command.c:146 script_debug(): command - swd newdap atsame54p20a cpu -irlen 4 -expected-id 0x4ba00477
Debug: 34 1 tcl.c:571 jim_newtap_cmd(): Creating New Tap, Chip: atsame54p20a, Tap: cpu, Dotted: atsame54p20a.cpu, 4 params
Debug: 35 1 core.c:1484 jtag_tap_init(): Created Tap: atsame54p20a.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 36 1 command.c:146 script_debug(): command - dap create atsame54p20a.dap -chain-position atsame54p20a.cpu
Debug: 37 1 command.c:146 script_debug(): command - target create atsame54p20a.cpu cortex_m -endian little -dap atsame54p20a.dap
Debug: 38 1 command.c:375 register_command(): command 'rtt' is already registered in '<global>' context
Debug: 39 1 command.c:146 script_debug(): command - atsame54p20a.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000 -work-area-backup 0
Debug: 40 1 target.c:2172 target_free_all_working_areas_restore(): freeing all working areas
Debug: 41 1 target.c:2172 target_free_all_working_areas_restore(): freeing all working areas
Debug: 42 1 target.c:2172 target_free_all_working_areas_restore(): freeing all working areas
Debug: 43 1 command.c:146 script_debug(): command - atsame54p20a.cpu configure -event reset-deassert-post
atsame5 dsu_reset_deassert
Debug: 44 1 command.c:146 script_debug(): command - reset_config srst_gates_jtag
Debug: 46 1 command.c:146 script_debug(): command - adapter speed 2000
Debug: 48 1 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 49 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 50 1 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 51 1 command.c:146 script_debug(): command - transport select
Debug: 52 1 command.c:146 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 54 1 command.c:146 script_debug(): command - flash bank atsame54p20a.flash atsame5 0x00000000 0 1 1 atsame54p20a.cpu
Debug: 56 1 tcl.c:1319 handle_flash_bank_command(): 'atsame5' driver usage field missing
Info : 57 1 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 58 1 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 59 1 command.c:146 script_debug(): command - init
Debug: 61 1 command.c:146 script_debug(): command - target init
Debug: 63 1 command.c:146 script_debug(): command - target names
Debug: 64 1 command.c:146 script_debug(): command - atsame54p20a.cpu cget -event gdb-flash-erase-start
Debug: 65 1 command.c:146 script_debug(): command - atsame54p20a.cpu configure -event gdb-flash-erase-start reset init
Debug: 66 1 command.c:146 script_debug(): command - atsame54p20a.cpu cget -event gdb-flash-write-end
Debug: 67 1 command.c:146 script_debug(): command - atsame54p20a.cpu configure -event gdb-flash-write-end reset halt
Debug: 68 1 command.c:146 script_debug(): command - atsame54p20a.cpu cget -event gdb-attach
Debug: 69 1 command.c:146 script_debug(): command - atsame54p20a.cpu configure -event gdb-attach halt 1000
Debug: 70 1 target.c:1639 handle_target_init_command(): Initializing targets...
Debug: 71 1 semihosting_common.c:99 semihosting_common_init():
Debug: 72 3 cmsis_dap_usb_bulk.c:111 cmsis_dap_usb_open(): could not open device 0x1d6b:0x0003: Access denied (insufficient permissions)
Debug: 73 6 cmsis_dap_usb_bulk.c:156 cmsis_dap_usb_open(): found product string of 0x03eb:0x2141 'Atmel-ICE CMSIS-DAP'
Debug: 74 6 cmsis_dap_usb_bulk.c:176 cmsis_dap_usb_open(): enumerating interfaces of 0x03eb:0x2141
Debug: 75 7 cmsis_dap_usb_bulk.c:223 cmsis_dap_usb_open(): found interface 0 string 'Atmel-ICE CMSIS-DAP'
Debug: 76 7 cmsis_dap_usb_bulk.c:243 cmsis_dap_usb_open(): skipping interface 0, endpoint[0] is not bulk out
Debug: 77 8 cmsis_dap_usb_bulk.c:243 cmsis_dap_usb_open(): skipping interface 1, endpoint[0] is not bulk out
Debug: 78 24 cmsis_dap_usb_bulk.c:176 cmsis_dap_usb_open(): enumerating interfaces of 0x0483:0x3753
Debug: 79 72 cmsis_dap_usb_bulk.c:111 cmsis_dap_usb_open(): could not open device 0x1d6b:0x0002: Access denied (insufficient permissions)
Error: 80 72 cmsis_dap.c:259 cmsis_dap_open(): unable to find a matching CMSIS-DAP device
Debug: 81 72 command.c:628 run_command(): Command 'init' failed with error code -4
User : 82 72 command.c:694 command_run_line():
Debug: 83 72 target.c:2172 target_free_all_working_areas_restore(): freeing all working areas
pulling up the dmesg log i found:
[ 1588.445948] usb 1-2: new high-speed USB device number 3 using vhci_hcd
[ 1588.605960] usb 1-2: SetAddress Request (3) to port 1
[ 1588.639106] usb 1-2: New USB device found, idVendor=03eb, idProduct=2141, bcdDevice=
1.01
[ 1588.639529] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1588.639913] usb 1-2: Product: Atmel-ICE CMSIS-DAP
[ 1588.640129] usb 1-2: Manufacturer: Atmel Corp.
[ 1588.640308] usb 1-2: SerialNumber: J42700004736
[ 1588.646303] hid-generic 0003:03EB:2141.0001: device has no listeners, quitting
As you can see there seems to be a problem:
hid-generic 0003:03EB:2141.0001: device has no listeners, quitting
below is the output of the lsusb :
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 480M
ID 03eb:2141 Atmel Corp. ICE debugger
|__ Port 2: Dev 3, If 1, Class=Vendor Specific Class, Driver=, 480M
ID 03eb:2141 Atmel Corp. ICE debugger
Any Idea what might be wrong here?