Code generation information file does not exist

7 visualizaciones (últimos 30 días)
Luca
Luca el 5 de Oct. de 2024
Respondida: Umar el 6 de Oct. de 2024
Hello everyone
After I made the configuration of the matlab and simulink packages for Arduino,and when I connected my arduino to my laptop I got this error when I clicked on run in the simulink program in the part of hardware :

Starting build procedure for: ControlMotor Página de códigos activa: 1252 gmake: wrapper.mk: No such file or directory gmake: *** No rule to make target `wrapper.mk'. Stop. The make command returned an error of 2 ### Build procedure for ControlMotor aborted due to an error.

And also I got this last one:
Top model targets built: Model Action Rebuild Reason ======================================================================== ControlMotor Failed Code generation information file does not exist. 0 of 1 models built (0 models alr
Honestly I don't know how to fix those errors .
Best regards

Respuestas (1)

Umar
Umar el 6 de Oct. de 2024

Hi @Luca ,

It appears that you are facing issues with the build process in Simulink while working with Arduino hardware, specifically concerning missing files and code generation failures. Let me break down the steps to address these errors systematically.

Check Your Environment Setup

Ensure that your MATLAB and Simulink installations are correctly set up for Arduino support. This includes:

  • Confirming that the Simulink Support Package for Arduino Hardware is installed correctly.
  • Running the command ver in MATLAB to check if the necessary toolboxes are installed and up to date.

Verify File Paths

The error message gmake: wrapper.mk: No such file or directory indicates that the build system cannot locate a required makefile. Here is how to troubleshoot this:

  • Locate wrapper.mk: Ensure that it exists in your project directory or any relevant subdirectories. If it’s missing, it may indicate an incomplete installation or misconfiguration.
  • Set Correct Paths: You can check and set your environment paths using the following command in MATLAB:
set_param(gcs, 'SFunctionModules', 'your_module_name');

Generate Code without a Wrapper

Sometimes, generating code without a wrapper can help isolate issues:

1. Open your model in Simulink. 2. Navigate to *Code Generation* settings in the model configuration parameters. 3. Set Code Generation > Custom Code > Include files to point to any required header files or libraries.

Clean Build Files

To ensure there are no residual files causing conflicts:

  • Delete previous build files by clearing out folders such as `slprj` or any generated code directories.
  • Use slbuild('YourModelName', 'ForceTopModelBuild', true) to enforce a clean rebuild.

Consult Documentation and Examples

Referencing the documentation you provided about wrapping user code with TLC can be beneficial:

  • Follow the steps outlined in the wrapper tutorial carefully, especially ensuring that your TLC files are correctly configured and named.
  • Consider using example models provided within the support package as references for correct configurations.

If you continue to encounter issues, utilize MATLAB’s debugging features to step through your TLC code and S-functions. This can help identify where things might be going wrong.

Hope this helps.

Please let me know if you have any further questions.

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by