Cannot deploy Simulink Real-Time model that links to custom QNX shared object
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Situation:
1) Some simple custom test libraries (one static library and one shared object) written in C and cross-compiled for QNX using qcc toolchain included in the support packages that accompany a Speedgoat target machine
2) A cross-compiled for QNX test program that calls functions from the above libraries. When the program is manually copied to the target computer (and the shared object library copied to /lib on the target), I can run the program fine. (As expected it does throw an error if the shared object is not also copied over).
2) A C S-Function that also calls functions from the above libraries, successfully compilied into a MEX file.
3) A Simulink Real-Time model with an S-Function block referencing the above S-Function. The model builds successfully after specifying the locations of the custom headers and libraries in the Model Setting > Code Generation > Custom Code > Code Information.
4) When attempting to deploy the model to the Speedgoat, I get the following error (and no other information)
Error:Unable to load 'my_c_sfunc_model_rt' on target computer 'Speedgoat': Timed-out waiting for condition.
5) If I remove the references to the shared library from the S-Function C code and recompile everything (MEX and Simulink RT model), the model can be deployed and run successfully.
Question
Issue seems to be related to using the sharred object given (5) above. Would like to know what I am potentially not doing or doing wrong. Or at least some way to get a more helpful error message.
These pages did not help (i.e., I seem to already be doing everything they suggest)
2 comentarios
Francesco Sabbatini
el 22 de Feb. de 2024
Editada: Francesco Sabbatini
el 22 de Feb. de 2024
I have the same situation. Did you find a solution?
Respuestas (1)
Ninad
el 4 de Sept. de 2023
The error message, "Timed-out waiting for condition," suggests an issue with loading the shared object library on the target computer. To troubleshoot, follow these steps:
- Verify the shared object library: Ensure it is cross compiled for the QNX platform using the qcc toolchain. Check compatibility with the target machine's architecture and OS.
- Check library dependencies: Ensure all required dependencies are present on the target computer. Use tools like ‘ldd’ (List Down Dependencies) or ‘readelf’ to check library dependencies. Add any missing dependencies.
- Check library search path: Place the shared object library in the correct search path, typically ‘/lib’ or ‘/usr/lib’ directories. Set ‘LD_LIBRARY_PATH’ to include the library's directory.
- Enable verbose mode: Enable verbose mode during deployment to get detailed error messages. Consult your deployment tool's documentation for instructions.
- Check system logs: Review system logs on the target computer for relevant error messages related to loading shared libraries. Logs can provide insights into the specific issue causing the timeout.
- Contact support: Reach out to Speedgoat or QNX toolchain support for assistance and specific troubleshooting steps.
Following these steps will help identify the potential issue causing the timeout and provide more helpful error messages.
1 comentario
Francesco Sabbatini
el 22 de Feb. de 2024
Editada: Francesco Sabbatini
el 22 de Feb. de 2024
I have the same situation of Brandon. When i try to load the Simulink RT Application (on Speedgoat Target) with the dependency of a shared library I receive error:
"slrealtime load --AppName MainAppTestLib"
"[2024-02-22 10:57:15.504000] [0x00000001] [error] Load error: Time out waiting for the expected status"
1) yes, the shraed library was correctly created with the Simulink Rea Time toolchain
2) yes, I checked the list of dependencies with command "ldd". All the dependencies are satisfied.
3) yes, shared library is placed at "/usr/local/lib" with root access and the path is correctly set in env variable "LD_LIBRARY_PATH". The file permission of shared library is set to 755.
4) How I can enable verbose mode for "slrealtime load" command?
5) Where is located system logs for Speedgoat Real time target?
Ver también
Categorías
Más información sobre Target Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!