How to build a standalone MATLAB application that uses the xilinxsoc FPGA object from the AMD support package.

9 visualizzazioni (ultimi 30 giorni)
Using the HDL Coder Support Package for AMD FPGA and SoC Devices add-on package, I have a script that allows me to connect up to the embedded processor in the FPGA on the ZCU216 development board.
%% Setup FPGA Interface
IPAddress = '192.168.0.101';
hw = xilinxsoc(IPAddress,'root','root');
hFPGA = fpga(hw);
I'm then using the MATLAB App Designer to create a standalone application that will be able to do everything that my script currently does. When I build the app, I get the following warnings after the packing completes:
Warning: In "C:\Temp\...Capture_app.mlapp", "xilinxsoc" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
If I run the app on the PC that has the full MATLAB envionrment and support packages installed, everything works great, but if I try to install it on another machine with MATLAB Runtime R2024b installed, it does not work, and I'm fairly sure it's because of this warning I'm receiving.
QUESTION: Is there a way I can point the App Designer to pull in what it needs from this hardware support package?
I found this link: https://www.mathworks.com/help/compiler/manage-support-packages.html which is helpful, but I never get a list of suggested support packages that it finds when I go to compile it.
There's also talk of pointing the mcc compiler to the support package with the '-a' flag, but I don't know where to find the location of the support package.

Risposte (1)

Madheswaran
Madheswaran il 6 Ago 2025
Hello Richard,
The warning you are seeing is intended. The "xilinxsoc" function cannot be deployed in standalone applications because "HDL Coder" and "SoC Blockset" are explicitly listed as "Not Supported" for MATLAB Compiler according to the official MATLAB Compiler support documentation.
This explains the warning you are receiving:
Warning: In "C:\Temp...Capture_app.mlapp", "xilinxsoc" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license.
You can see the comprehensive list of MathWorks products and their support for MATLAB Compiler and Simulink Compiler here: https://mathworks.com/products/compiler/compiler_support.html
As a workaround to suppress the warning, you can use the isdeployed function to ensure the function is not invoked in the deployed component. However, you may need to implement your own logic to make your code work in the deployed application.
if ~isdeployed
% ... your code
IPAddress = '192.168.0.101';
hw = xilinxsoc(IPAddress,'root','root');
hFPGA = fpga(hw);
% ... rest of code
else
% Alternative implementation for deployed version
warning('Hardware interface not available in deployed application');
end
For more information about excluded functions, please see the official MathWorks documentation on functions not supported for compilation:
I hope this helps!

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by