bloombloombloom / Bloom

A debug interface for AVR-based embedded systems development on GNU/Linux.
https://bloom.oscillate.io/
Other
64 stars 3 forks source link

Can't find Atmel-ICE Debugger when attached to USB hub #93

Closed Breinholm-coder closed 6 months ago

Breinholm-coder commented 8 months ago

Attaching my Atmel-Ice to the hub at my monitor results in this failure:

ubuntu@ubuntu:~$ bloom 2023-11-04 01:53:51.838 UTC [MT]: [INFO] Selected environment: "default" 2023-11-04 01:53:51.838 UTC [TC]: [INFO] Starting TargetController 2023-11-04 01:53:51.841 UTC [TC]: [INFO] Connecting to debug tool 2023-11-04 01:53:51.841 UTC [TC]: [ERROR] The TargetController encountered a fatal error. See below for errors: 2023-11-04 01:53:51.841 UTC [TC]: [ERROR] Failed to open USB device - error code -3 returned. 2023-11-04 01:53:51.841 UTC [TC]: [INFO] Shutting down TargetController 2023-11-04 01:53:51.841 UTC [MT]: [ERROR] TargetController failed to start up 2023-11-04 01:53:51.841 UTC [MT]: [INFO] Shutting down Bloom 2023-11-04 01:53:51.841 UTC [SH]: [INFO] Shutting down SignalHandler

Attaching it directly to my PC (Without any micro attached - so it will fail of course):

ubuntu@ubuntu:~$ bloom 2023-11-04 02:26:38.180 UTC [MT]: [INFO] Selected environment: "default" 2023-11-04 02:26:38.180 UTC [TC]: [INFO] Starting TargetController 2023-11-04 02:26:38.185 UTC [TC]: [INFO] Connecting to debug tool 2023-11-04 02:26:38.281 UTC [TC]: [INFO] Debug tool connected 2023-11-04 02:26:38.281 UTC [TC]: [INFO] Debug tool name: Atmel-ICE 2023-11-04 02:26:38.318 UTC [TC]: [INFO] Debug tool serial: J41800099298 2023-11-04 02:26:38.326 UTC [TC]: [INFO] Activating target 2023-11-04 02:26:39.140 UTC [TC]: [ERROR] The TargetController encountered a fatal error. See below for errors: 2023-11-04 02:26:39.140 UTC [TC]: [ERROR] AVR8 Activate physical interface command failed - Failure reason: Target power not detected 2023-11-04 02:26:39.140 UTC [TC]: [INFO] Shutting down TargetController 2023-11-04 02:26:39.140 UTC [TC]: [INFO] Deactivating target 2023-11-04 02:26:39.177 UTC [TC]: [ERROR] Failed to deactivate AVR8 target - AVR8 Stop target command failed - Failure reason: Target power not detected 2023-11-04 02:26:39.177 UTC [TC]: [INFO] Closing debug tool 2023-11-04 02:26:39.215 UTC [MT]: [ERROR] TargetController failed to start up 2023-11-04 02:26:39.215 UTC [MT]: [INFO] Shutting down Bloom 2023-11-04 02:26:39.215 UTC [SH]: [INFO] Shutting down SignalHandler

Listing the USB devices when on the monitor-Hub:

ubuntu@ubuntu:~$ lsusb Bus 009 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 009 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 005: ID 043e:9a39 LG Electronics USA, Inc. USB Controls Bus 007 Device 006: ID 03eb:2141 Atmel Corp. ICE debugger Bus 007 Device 003: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 003: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 003: ID 048d:5702 Integrated Technology Express, Inc. ITE Device Bus 003 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0032 Intel Corp. AX210 Bluetooth Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And when it's directly attached:

ubuntu@ubuntu:~$ lsusb Bus 009 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 009 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 005: ID 043e:9a39 LG Electronics USA, Inc. USB Controls Bus 007 Device 003: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 003: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 003: ID 048d:5702 Integrated Technology Express, Inc. ITE Device Bus 003 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0032 Intel Corp. AX210 Bluetooth Bus 001 Device 003: ID 03eb:2141 Atmel Corp. ICE debugger Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thanks / Peter

navnavnav commented 8 months ago

Hmm, that looks like a permissions issue, but I'd expect it to fail regardless of whether it's connected via a hub or not.

Can you try running as root? This isn't a long-term solution, but if it works, then it's likely a permissions issue. Let me know if running sudo bloom with the device connected to the hub works.