“NULL expression encountered” on FTDI's libMPSSE

落爺英雄遲暮 提交于 2019-12-10 21:11:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!