How to build a standalone MATLAB application that uses the xilinxsoc FPGA object from the AMD support package.
    10 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
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.
1 commentaire
  Walter Roberson
      
      
 le 2 Mai 2025
				It is common for the support packages to not be supported by standalone applications.
Réponses (1)
  Madheswaran
 le 6 Août 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:
- List of Unsupported Functions: https://www.mathworks.com/help/compiler/unsupported-functions.html
- MATLAB Compiler Support by Toolbox: https://www.mathworks.com/products/compiler/compiler_support.html
I hope this helps!
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


