- Navigate to Configuration Parameters (Ctrl+E) > Code Generation > Build Process > Build Configuration and choose "Specify" from the dropdown list.
- Navigate to "Toolchain details" tab and specify the header file in the Linker section as: "-lwiringPI".
- Apply the changes.
How can i set Linker flags in an S-Function block
52 次查看(过去 30 天)
显示 更早的评论
I am using matlab 2024b and Simulink 24.2. In the S-function builder I wish to use wiringPi deployed to a Raspberry Pi. WiringPi is installed on the Raspberry Pi. How can I add the linker flags so the build process will link to libwiringPi.so located in /usr/lib?
0 个评论
回答(1 个)
Sumukh
2024-12-23,6:20
To use the wiringPI library installed on the hardware, the "wiringPI.h" header file can be specifically linked within the s-function during the "Build" process as follows:
Now the wiringPI library can be used when installed on the Raspberry PI hardware.
I hope this answers your query.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!