Hey,
I understand that you are trying to generate C/C++ code using Embedded Coder, but MATLAB does not read your Embedded Coder License.
C/C++ code generation features for Simulink models are only available if you have the following products installed and licensed for:
- MATLAB Coder
- Simulink Coder
- Embedded Coder
Please try out the following troubleshooting steps:
- Check out the licenses by running the following commands in MATLAB:
>> [status,errmsg] = license('checkout','matlab_coder')
>> [status,errmsg] = license('checkout','real-time_workshop')
>> [status,errmsg] = license('checkout','RTW_Embedded_Coder')
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.
2. Execute the following command to get the full list of installed products and associated licenses per product:
Check that MATLAB Coder, Simulink Coder and Embedded Coder are listed.
If a product is missing from the above list, then add MATLAB Coder and Simulink Coder and Embedded Coder toolboxes to your existing installation as shown in the following link:
3. After following the steps mentioned above, restart MATLAB on your device. Restarting MATLAB and/or your PC may resolve the issue, especially if a MathWorks-related product was recently installed or updated.
Hope this helps!