问题
My question is specific to the library libMPSSE from FTDI to work with USB to serial port (SPI, I2C, etc) adapters on Linux.
When I execute any program linked with the library, the method Init_libMPSSE() is called (without explicit invocation) and throws the following message.
../../Infra/src/ftdi_infra.c:243:Init_libMPSSE(): NULL expression encountered
Has anybody experienced this issue and found a workaround?.
Thanks.
回答1:
You get this error when libMPSSE can't open the libftd2xx.so shared library. You need to set LD_LIBRARY_PATH to the path where this library was installed. For example if the library is in /usr/local/lib you would run the SPI static example like this:
sudo LD_LIBRARY_PATH=/usr/local/lib ./sample-static.o
来源:https://stackoverflow.com/questions/20156099/null-expression-encountered-on-ftdis-libmpsse