- MATLAB Coder
- Simulink Coder
- Embedded Coder (optional)
How do I troubleshoot installation and licensing issues with Simulink Coder and Embedded Coder?
109 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 28 de Feb. de 2019
Editada: MathWorks Support Team
el 8 de Jul. de 2025
I would like to generate C/C++ code from a Simulink model. However, I encounter any of the following issues:
1. In the Configuration Parameters dialog box, the Code Generation tab is missing.
2. When I try to build my model, I errors such as:
This coder feature requires a "Simulink Coder" license.
This coder feature requires a "Embedded Coder" license.
Unable to check out the Simulink Coder license which is required to generate code.
3. Using R2019b or newer, in Simulink Toolstrip, I am unable to find the Simulink Coder app or Embedded Coder app.
4. Using R2019a or older, the Simulink menu Code > C/C++ Code > Code Generation Options... is unavailable or produces an error:
Page "Code Generation" is not a valid page.
Respuesta aceptada
MathWorks Support Team
el 8 de Jul. de 2025
Editada: MathWorks Support Team
el 8 de Jul. de 2025
C/C++ code generation features for Simulink models are only available if you have the following products installed and licensed for:
NOTE: Whether you need Embedded Coder depends on your use of its features and whether your system target file is based on ert.tlc or just grt.tlc. For third-party targets or tools, check with the vendor or see our Third-Party Products & Services page.
Please try out the following 5 troubleshooting steps if you encounter one of the symptoms above:
Check out the licenses by running the following commands in MATLAB:
>> [status,errmsg] = license('checkout','matlab_coder') % MATLAB Coder (required)
>> [status,errmsg] = license('checkout','real-time_workshop') % Simulink Coder (required)
>> [status,errmsg] = license('checkout','RTW_Embedded_Coder') % Embedded Coder (optional)
Each command should return 'status = 1' and "errmsg = 0×0 empty char array" if the license checkout is successful.
Note that Embedded Coder depends on Simulink Coder. This means that Embedded Coder only works if Simulink Coder is also installed and licensed for. Simulink Coder depends on MATLAB Coder in the same way.
If a license checkout fails, or the products are not listed as in use after checkout, contact your MATLAB License Administrator or MathWorks Installation Technical Support.
Execute the following command to get the full list of installed products and associated licenses per product:
>> ver -support
Check that MATLAB Coder and Simulink Coder are listed (additionally Embedded Coder if applicable).
If a product is missing from the above list, then add MATLAB Coder and Simulink Coder (and Embedded Coder if applicable) toolboxes to your existing installation as shown in the following link:
Restarting MATLAB and/or your PC may resolve the issue, especially if a MathWorks-related product was recently installed or updated.
Open the following model:
>> vdp
and check for the Code Generation option in Model Configuration Parameters (CTRL+E).
If the code generation options are available for the shipped model:
a. Check if the model without the options has any issues in the Upgrade Advisor.
b. Try to re-create the model in a fresh file by copying and pasting all blocks.
If the code generation options are available for the shipped model and the issue persists for your model after the above checks, contact MathWorks Technical Support.
Restore your MATLAB path and toolbox cache as explained in the following article:
https://www.mathworks.com/matlabcentral/answers/2052722-how-can-i-perform-initial-troubleshooting-of-matlab-or-simulink-errors
If the issue persists after going through all the above steps, contact MathWorks Technical Support. When contacting MathWorks Technical Support, please include the outcome of the above checks and your license information.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!