Zynq workflow: Software interface model build fails due to error regarding missing "iio.h" file

14 views (last 30 days)
I use MATLAB/Simulink to do Hardware-Software Co-Design for the Xilinx Zynq platform (e.g. Zedboard). If I add an "AXI4-Stream IIO Read/Write" block from "Embedded Coder Support Package for Xilinx Zynq Platform" to my model and try to build it, I observe the build error below:
### Using toolchain: Linaro AArch32 Linux v6.3.1
### Build procedure for model: 'zynq_external_mode' aborted due to an error.
C:/ProgramData/MATLAB/SupportPackages/R2019b/toolbox/shared/libiio/base/src/iio_helper.c:2:17:
fatal error: iio.h: No such file or directory
#include "iio.h"
                 ^
compilation terminated.
gmake: *** [iio_helper.c.o] Error 1

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Apr 2022
The error messages indicate that the "Embedded Coder Support Package for Xilinx Zynq Platform" has not been set up correctly.
To resolve this, restart MATLAB as administrator (sudo on Linux). Then, re-run the "Embedded Coder Support Package for Xilinx Zynq Platform" setup. You can do this by clicking on Add-Ons > Manage Add-Ons and then clicking the Gear icon next to the support package. You should see the following panel:
Running the support package setup will register the "sysroot" folder with the toolchain and also regenerate the correct Linux image needed to boot the Xilinx board.
If re-running the setup alone does not resolve the issue, please re-install the support package as an administrator. Then, perform the setup steps with the fresh installation.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!