Model Error Code generation file does not exist SIMULINK and ARDUINO
Mostrar comentarios más antiguos
Deer all programmer,
Since last week, I can not continue my experience on simulink, du to an file error I suppose when I try to run any files on my arduino ardware (I use arduino uno and mega)
I try to re-upload Matlab and Simulink or create new files but failure perist.
thanks to your support
Baptiste
=== Simulation (Elapsed: 17 sec) ===
### Starting build procedure for: untitled
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /Users/baptistesalaun/Library/Application Support/MathWorks/MATLAB Add-Ons/Collections/Legacy MATLAB and Simulink Support for Arduino/untitled_ert_rtw
### Invoking Target Language Compiler on untitled.rtw
### Using System Target File: /Volumes/LaCie/MATLAB_R2020b.app/rtw/c/ert/ert.tlc
### Loading TLC function libraries
......
### Initial pass through model to cache user defined code
.
### Caching model source code
..............................
### Writing header file untitled_types.h
### Writing header file untitled.h
.
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing source file untitled.c
### Writing header file untitled_private.h
### Writing header file rtmodel.h
.
### Writing source file ert_main.c
### TLC code generation complete.
### Generating TLC interface API.
..
### Creating data type transition file untitled_dt.h
.### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Arduino AVR
### Creating '/Users/baptistesalaun/Library/Application Support/MathWorks/MATLAB Add-Ons/Collections/Legacy MATLAB and Simulink Support for Arduino/untitled_ert_rtw/untitled.mk' ...
### Building 'untitled': "/Volumes/LaCie/MATLAB_R2020b.app/bin/maci64/gmake" -f wrapper.mk all
### Generating static library.
"/Volumes/LaCie/MATLAB_R2020b.app/bin/maci64/gmake" -j3 -C "/Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/toolbox/target/supportpackages/arduinobase/staticmakefiles" SHELL="/bin/sh" -f avrcore.mk all
gmake[1]: Entering directory `/Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/toolbox/target/supportpackages/arduinobase/staticmakefiles'
gmake[1]: *** No rule to make target `/Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.S', needed by `/Users/baptistesalaun/Documents/MATLAB/R2020b/ArduinoStaticLibrary/ArduinoMega2560/FasterBuilds/wiring_pulse.S.o'. Stop.
gmake[1]: Leaving directory `/Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/toolbox/target/supportpackages/arduinobase/staticmakefiles'
gmake: *** [all] Error 2
### Build procedure for untitled aborted due to an error.
Top model targets built:
Model Action Rebuild Reason
====================================================================
untitled Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 15.781s
Error:Error(s) encountered while building "untitled"
14 comentarios
Walter Roberson
el 31 de En. de 2021
BAPTISTE SALAUN
el 31 de En. de 2021
Walter Roberson
el 31 de En. de 2021
However, if you are missing that file, chances are that you are missing others.
Yes, it is compatible with Simulink. All of the arduino details are loaded in directly from Arduino-supplied code.
BAPTISTE SALAUN
el 31 de En. de 2021
Walter Roberson
el 31 de En. de 2021
The cores directory would have to be installed to /Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/hardware/arduino/avr/cores
Alex Gaina
el 13 de Mzo. de 2021
Baptiste, did you get it to work? I have the same problem
BAPTISTE SALAUN
el 13 de Mzo. de 2021
Alex Gaina
el 14 de Mzo. de 2021
Thanks Baptiste, I'll keep digging...
ashwini
el 14 de Jun. de 2021
HI Alex, Baptiste , Have you got any solution for this problem?
I am also getting same error.
Matteo D'Onorio
el 5 de Ag. de 2021
Editada: Matteo D'Onorio
el 5 de Ag. de 2021
Same error on macOS, instead on windows the same script works.
Filip Poloczek
el 11 de En. de 2022
I get the same error and tried already the answer of Catalin Stefan Teodorescu, but I didn't work.
Aditya Chari
el 8 de Jun. de 2022
Has anyone got the solution for the problem? I am also getting the same error
Ernst Wierenga
el 20 de Jun. de 2022
Editada: Ernst Wierenga
el 20 de Jun. de 2022
Me too. I use macOS.
On windows it works fine?
prudhvi
el 29 de Oct. de 2025
Remove all the cache file .slxc, slprj folder and rtw folders
Respuestas (5)
Catalin Stefan Teodorescu
el 28 de Abr. de 2021
Editada: Catalin Stefan Teodorescu
el 28 de Abr. de 2021
3 votos
Hi, I got the same error an the problem was caused by a space in the folder location (e.g. C:\Users\stefa\New Folder\test, please note the space as in "New Folder"). Another thing you might want to try is to change the path to something short, as close to C: as possible (e.g. C:\test).
4 comentarios
LUIS ENRIQUE CONTRERAS PALOMINO
el 9 de Mayo de 2021
Catalin, after hours trying to find a solution your answer solved my problem. Thank you very much!
Po-Yen Lin
el 4 de Jun. de 2022
Hi, what file is this exactly? I have the same problem but I dont know which file I should move.
Jeffrey Darwish
el 23 de Jun. de 2022
I beliueve they mean to create a folder in the C drive and call it Test. That way you have a VERY short path for simulink to go to.
Rodrigo
el 13 de Sept. de 2024
Hi, the advice helped me. What I did was: I again made my blink with pin 13, in a new Simulink model and when I saved it I changed the folder path to c:\proyectosSIMULINK, I created the folder proyectosSIMULINK. Then I went to MATLAB and redirected the folder path where I saved my project in Simulink. I went back to Simulink and clicked built.
Gargi Patil
el 25 de Mzo. de 2021
0 votos
My understanding is that you are facing an error due to the gmake command with the error message as “No rule to make target”.
The following cases typically give rise to this error:
1. The file: `/Users/baptistesalaun/Documents/MATLAB/SupportPackages/R2020b/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.S' could be missing in the given directory
Verify the existence of the file through File Explorer.
2. The above-mentioned file could also be dependent on another file that has been updated making it necessary to regenerate the file: ‘wiring_pulse.S'.
3. The project or source/include file path contains white spaces that “make” cannot handle.
4. The compiler version used during run time is not correct. Use the correct version of the compiler used originally in the project.
abdullah
el 25 de Abr. de 2023
0 votos
I have the same error, did you solve it ?
Eric Hayes
el 29 de Jun. de 2023
0 votos
Simulink default hardware settings were set to the incorrect COM port for my micro controller. Hope it helps.
1 comentario
Tinotenda Ashley Mwarunzika
el 22 de Mayo de 2024
Did you manage to solve it?
Lars
el 9 de Jul. de 2024
0 votos
I finally resolved the issue by re-doing the 'Setup Hardware'.
I assume it is due to me manually moving the simulation file and messing up the file path.

Categorías
Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!