Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB superspeed peripherals Forum Discussions

semi_4714331
Level 1
Level 1

I compiled cyusb_linux for the latest raspbian and when i execute it i get the error and the cyusb_linux window staye empty
pastedImage_0.png
The same device with the windows version of Fx3 SDK work well and allow me to see the endpoints

Thank you for your help

0 Likes
1 Solution

Hello Rashi,

I dont know what was wrong but i did it again from scratch using this time the raspberry Pi Os (32 bits) with desktop and recommended software then downloading only what was needed :

download FX3_SDK_linux_v1.3.4 from this page
extract cyusb_linux_1.0.5
sudo apt-get install libusb-1.0-0.dev
sudo apy-get install qt4-dev-tool
cd cyusb_linux_1.0.5
make
sudo ./install.sh
cd /usr/bin/local/
sudo chmod +x cyusb_linx
sudo cyusb_linux

and now it works perfectly
fx3_raspbian.png

Thank you!

View solution in original post

0 Likes
8 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know which OS and its version are you using

If you are using SDK 1.3.4 as per the cyusb_linux_user guide:

This version of the CyUSB Suite for Linux has been developed and tested on the following environment :

1. Linux Kernel - 3.13.0 ( stock kernel from http://www.kernel.org )

2. Fedora - 14 distribution, Ubuntu 11.04, Ubuntu 12.04, Ubuntu 14.04

3. Qt version 4.7

4. libusb-1.0.16

Regards,

Rashi

Regards,
Rashi
0 Likes

It is on a Raspbian /10 (buster)

Qt version 4.8.7

libusb 1.0.22

Should i use another image on raspberry Pi 4 ?

Best regards,
Sebastien

0 Likes

Hello Sebastien,

We have not tested the FX3 SDK with Raspbian os but we can try debugging the problem

- Please let me know which image are you trying to program to FX3 using cyusb_linux.

- Please let me know that the installation steps mentioned in the readme.txt are completely followed and is the installation done successfully.

After successful installation of cyusb_linux, the cyusb_linux executable file needs to be called  from this path  /home/user/cyusb_linux_1.0.5 as mentioned in readme file in the Installation path\FX3_SDK_Linux\cyusb_linux_1.0.5\cyusb_linux_1.0.5

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello Rashi,

Thank you for the help.

I am running Linux raspberrypi 4.19.118-v7l+
In order to compile correctly i had to rename the "errno" variable in gui_src/main.cpp

main.cpp: In function ‘void out_callback(libusb_transfer*)’:

main.cpp:1916:26: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’

   libusb_error(transfer->status, "Transfer not completed normally");

                ~~~~~~~~~~^~~~~~

In file included from /usr/include/c++/8/cerrno:42,

...

                 from main.cpp:11:

main.cpp:74:30: note:   initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’

static void libusb_error(int errno, const char *detailedText)

                             

After that only remains 2 warnings :

main.cpp: In function ‘void get_config_details()’:

main.cpp:565:15: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-                                                                                     Wformat-overflow=]

  sprintf(tval,"%d",desc->bNumInterfaces);

               ^~~~

main.cpp:565:9: note: ‘sprintf’ output between 2 and 4 bytes into a destination of size 3

  sprintf(tval,"%d",desc->bNumInterfaces);

  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

main.cpp: In function ‘void get_device_details()’:

main.cpp:706:15: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-                                                                                     Wformat-overflow=]

  sprintf(tval,"%d",config_desc->bNumInterfaces);

               ^~~~

main.cpp:706:9: note: ‘sprintf’ output between 2 and 4 bytes into a destination of size 3

  sprintf(tval,"%d",config_desc->bNumInterfaces);

  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -                                                                                     DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtN                                                                                     etwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o fx2_download.o fx2_download.cpp

fx2_download.cpp: In function ‘int fx2_load_vendax()’:

fx2_download.cpp:296:19: warning: ‘%s’ directive writing up to 255 bytes into a region of size bet                                                                                     ween 215 and 220 [-Wformat-overflow=]

  sprintf(finalbuf,"Download %02d bytes : address=%04x  : %s",num_bytes,address,tbuf);

                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                   ~~~~

fx2_download.cpp:296:9: note: ‘sprintf’ output between 37 and 297 bytes into a destination of size                                                                                      256

  sprintf(finalbuf,"Download %02d bytes : address=%04x  : %s",num_bytes,address,tbuf);

  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

but it does compile.

After that i checked that the  VID/PID is in the /etc/cyusb.conf file

4b4000F1        FX3 Streamer Example

then i launch a vnc server and execute cyusb_linux (the device is connected) and getpastedImage_2.png

i have same log when i run cyusb_linux with no device connected, then if i connect it while cyusb_linux is running i see in the logs "Signal 10 (=SIGUSR1) received !
pastedImage_3.png

Best regards,
Sebastien

0 Likes

Hello Sebastien,

You can try updating to the latest libusb version to 1.0.23

To narrow down the problem, please try using the download_fx3 command-line application given in the cyusb_linux folder

Path: SDK installation path\FX3_SDK_Linux\cyusb_linux_1.0.5\cyusb_linux_1.0.5\src

You can refer to the cyusb_linux_programmer_guide for using the download_fx3 command line application to download the firmware image  (.img) file to FX3. Connect the FX3 device before using the application

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello Rahi

I tried to install libusb 1.0.23 but didnt manage to.. i think it only comes as a source package and lot of dependencies are needed that are not up to date in debian buster.

The device im am trying to read is not something i want to write on, it is something i want to analyse.

Best regards,
Sebastien

0 Likes

Hello Sebastian,

I understand that you are not planning to program the FX3 device with a firmware. Is that right?

To narrow down the problem, can you please try using the console applications like 01_getdesc or 03_getconfig ( Path: SDK installation path\FX3_SDK_Linux\cyusb_linux_1.0.5\cyusb_linux_1.0.5\src ) after plugging the device and let me know the results. These applications will give the device descriptors and device configuration respectively.

You can refer to the cyusb_linux_programmer_guide for using the above-mentioned command-line application.

- Please let me know which Cypress device is being used in your application with its  (VID/PID)

Regards,

Rashi

Regards,
Rashi
0 Likes

Hello Rashi,

I dont know what was wrong but i did it again from scratch using this time the raspberry Pi Os (32 bits) with desktop and recommended software then downloading only what was needed :

download FX3_SDK_linux_v1.3.4 from this page
extract cyusb_linux_1.0.5
sudo apt-get install libusb-1.0-0.dev
sudo apy-get install qt4-dev-tool
cd cyusb_linux_1.0.5
make
sudo ./install.sh
cd /usr/bin/local/
sudo chmod +x cyusb_linx
sudo cyusb_linux

and now it works perfectly
fx3_raspbian.png

Thank you!

0 Likes