Custom board ZCU104 fails to load in external mode
11 views (last 30 days)
I am trying to get my Xilinx ZCU104 FPGA board to work with SoC blockset for 3 months now. I had many issues getting the SD card image ready and the dtsi files ready which are explained in my previous posts in the Mathworks community:
Now, I have solved previous issues and able to upload a model to the board using SoC Builder. However the following test still fails:
In my debugging, I found the issue is in the test for load for external mode. When I try to manually redo the test as suggested by the test failure log, I get the following error log:
C:/ProgramData/MATLAB/SupportPackages/R2021b/toolbox/shared/libiio/base/src/iio_helper.c:2:17: fatal error: iio.h: No such file or directory
gmake: *** [iio_helper.c.o] Error 1
D:\Dropbox\8_Work\FPGA_Boards\ZCU104\SoCBuilder\ZCU104_Board_Creation\slprj\ert\mSoCRamp_arm>echo The make command returned an error of 2
The make command returned an error of 2
D:\Dropbox\8_Work\FPGA_Boards\ZCU104\SoCBuilder\ZCU104_Board_Creation\slprj\ert\mSoCRamp_arm>exit /B 1
### Creating HTML report file index.html
### Build procedure for mSoCRamp_arm aborted due to an error.
Code generation targets built:
Model Action Rebuild Reason
mSoCRamp_arm Failed Code generation information file does not exist.
0 of 2 models built (1 models already up to date)
Build duration: 0h 0m 35.392s
Error(s) encountered while building "mSoCRamp_arm_rtwlib"
It seems like IIO headers and libs are missing from the installation. I'm using Matlab 2021b Windows version and have installed all the toolboxes listed as requirements. Could someone help me resolve this issue? I also get the following warning during the test which might be relevant:
Warning: The chosen board "Zynq ZCU104 SoC Board" does not have a sysroot registered, cross-compilation may fail.
I'm following the "Using custom board with SoC Blockset" tutorial mentioned in below URL and modified the given script to suit my FPGA board:
How can I register a sysroot for my custom board and which path should I use for sysroot? Would it resolve this error of missing iio headers? I would really apprecieate it if someone can help me resolve this issue.
Thanks and Regards,
Sanjay Boorle on 1 Sep 2022
To register sysroot, run the following command. Make sure you provide the board support name you used during ZCU104 board support creation.
soc.sdk.setupSoftwareTools('Zynq ZCU104 SoC Board');
For more information refer page https://www.mathworks.com/help/supportpkg/xilinxsoc/ref/soc.sdk.setupsoftwaretools.html