Error(s) encountered while building arduino uno code
4 views (last 30 days)
Show older comments
after creating a model in simlink, I run the program it work fine, but when I run (generate code) on external hardware it shows error. I'm using Matlab 2016 in window 10
Simulation 3 1 Clear
10:49 PM Elapsed: 33 sec
### Starting build procedure for model: untitled
Code Generation 1
Elapsed: 25 sec
### Generating code into build folder: C:\Windows\System32\untitled_ert_rtw
### Invoking Target Language Compiler on untitled.rtw
### Using System Target File: C:\Program Files\MATLAB\R2016a\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.h
.
### Writing header file untitled_types.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing source file untitled.c
### Writing header file untitled_private.h
.
### Writing source file untitled_data.c
### 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 v1.6.1 | gmake (64-bit Windows)
### Creating 'C:\Windows\System32\untitled_ert_rtw\untitled.mk' ...
### Building 'untitled': C:\PROGRA~1\MATLAB\R2016a\bin\win64\gmake -f untitled.mk all
gmake: untitled.mk: No such file or directory
gmake: *** No rule to make target `untitled.mk'. Stop.
### Creating HTML report file untitled_codegen_rpt.html
### Build procedure for model: 'untitled' aborted due to an error.
Error(s) encountered while building "untitled":
### Failed to generate all binary outputs.
Component: Simulink | Category: Model error
0 Comments
Answers (1)
Naga
on 18 Dec 2024
Hello Harvinder,
This is caused by the Windows command processor (cmd.exe) being configured with an "Autorun" command that changes the current working directory. Normally, the command processor will inherit the working directory of the process that created it. This is the behavior that our build system expects. When the command processor automatically changes to a different directory, the build system is unable to find the files it needs.
To resolve this, open the Registry Editor, and navigate to these two locations:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
If a key named "Autorun" is present in either location, right-click and rename it to "Autorun_".
If this resolves the issue, please contact your system administrator to ensure you have a permanent solution.
0 Comments
See Also
Categories
Find more on Embedded Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!