Use the following command to launch the SDK associated to the used platform in order to be able to debug graphically by clicking the debug button:
If you use WSL you can not test the boards on Linux because it does not support USB. If you will try to load the binary into the target with the command make run, you will encounter the following error:
no targets found with “name =~ “APU*” && jtag_cable_name =~ “*$::jtagtarget*””. available targets: none while executing
“error “no targets found with \”$params(filter)\”. available targets:$target_list“”…
If you use WSL (Ubuntu) and want to connect to JTAG with a board, you have to switch the USB device from Windows to WSL.
To do this, the following steps must be followed:
To be able to see the kernel version, the WSL version, and other features, in WSL (Ubuntu) you can enter the command:
:~$ uname -a
Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
WSL should have a kernel version of 5.10.60.1 or later. You also need to run WSL2.Testing was done on version 22.4 of Ubuntu.
You need to install the
usbipd-win project. Installation can be done manually, with a few clicks.
You need to install from WSL, the user space tools for
USB/IP and a database of
USB hardware identifiers:
:~$ sudo apt upgrade
:~$ sudo apt update
:~$ sudo apt install linux-tools-virtual hwdata
:~$ sudo update-alternatives --install /usr/local/bin/usbip usbip $(command -v ls /usr/lib/linux-tools/*/usbip | tail -n1) 20
If the last command does not work, try:
:~$ sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20
If there is a device connected to the USB port, it can be checked from the Device Manager. When connecting via JTAG, in Device Manager, the device will appear in the Universal serial Bus controllers section as USB Serial Converter.
To attach the JTAG (or any USB device) from Windows to WSL we must do the following:
C:\Windows\system32> usbipd wsl list
BUSID VID:PID DEVICE STATE
2-6 0c45:6732 Integrated Webcam, Integrated IR Webcam Not attached
2-9 27c6:63ac Goodix MOC Fingerprint Not attached
2-10 8087:0033 Intel(R) Wireless Bluetooth(R) Not attached
5-4 0bda:8153 Realtek USB GbE Family Controller #2 Not attached
7-1 413c:4503 USB Input Device Not attached
7-2 413c:b080 Dell DA20 Adapter Not attached
9-5 413c:b06e USB Input Device Not attached
10-1 0403:6014 USB Serial Converter Not attached
10-2 045e:0837 Microsoft Modern USB Headset, USB Input Device Not attached
10-3 04b4:0008 USB Serial Device (COM17) Not attached
10-5 413c:b06f USB Input Device Not attached
For this command, a list of all connected USB devices will be displayed in Windows, a brief description of them and their status: If they are/are not attached to the WSL instance. The JTAG appears in the cmd list but is not attached to a WSL instance.
In WSL enter the following command:
:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
A list of all attached USB devices will be displayed here. At this moment we will only see roots hubs.
To attach a
USB device to WSL enter the following command in Command Prompt:
> usbipd wsl attach -b <BUSID>
BUSID represents the ID for the USB device for which we want to attach it in WSL.
> usbipd wsl attach -b 10-1
C:\Windows\system32> usbipd wsl list
BUSID VID:PID DEVICE STATE
2-6 0c45:6732 Integrated Webcam, Integrated IR Webcam Not attached
2-9 27c6:63ac Goodix MOC Fingerprint Not attached
2-10 8087:0033 Intel(R) Wireless Bluetooth(R) Not attached
5-4 0bda:8153 Realtek USB GbE Family Controller #2 Not attached
7-1 413c:4503 USB Input Device Not attached
7-2 413c:b080 Dell DA20 Adapter Not attached
9-5 413c:b06e USB Input Device Not attached
10-1 0403:6014 USB Serial Converter Attached - Ubuntu
10-2 045e:0837 Microsoft Modern USB Headset, USB Input Device Not attached
10-3 04b4:0008 USB Serial Device (COM17) Not attached
10-5 413c:b06f USB Input Device Not attached
After running usbipd wsl list, it can be seen that the JTAG is now attached in WSL.
In WSL if you run: lsusb we have:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\
If Device Manager checks the USB device attached in WSL, it will no longer appear in the list of devices.
If you want to return to the initial settings (the
USB device must be attached to Windows): The
USB device must be disconnected and connected to the computer or in Command Prompt, run the following command:
> usbipd wsl detach -b <BUSID>
For more information you can access the links: USB_devices_to_WSL , USB/IP_client_tools