Running batch script generated from embedded coder on command line gives error
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am using MATLAB R023b and using embedded coder on it (along with Arduino package)
When I 'build' using embedded coder, everything is fine and Arduino gets flashed with my Simulink model.
But when I say 'Generate code' and then try running the batch script that is generated, it gives error. If it runs on simulink, it should run using command line too. But this is strange.
Below is my generated batch script
cd .
if "%1"=="" ("C:\PROGRA~1\MATLAB\R2023b\bin\win64\gmake" -f wrapper.mk all) else ("C:\PROGRA~1\MATLAB\R2023b\bin\win64\gmake" -f wrapper.mk %1)
@if errorlevel 1 goto error_exit
exit /B 0
:error_exit
echo The make command returned an error of %errorlevel%
exit /B 1
And this is the error when run on command line(powershell)
if "" == "" ("C:\PROGRA~1\MATLAB\R2023b\bin\win64\gmake" -f wrapper.mk all ) else ("C:\PROGRA~1\MATLAB\R2023b\bin\win64\gmake" -f wrapper.mk )
"### Generating static library."
"C:/Program Files/MATLAB/R2023b/bin/win64/gmake" -j5 -C "C:/PROGRA~3/MATLAB/SUPPOR~1/R2023b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1" SHELL="%SystemRoot%/system32/cmd.exe" -f avrcore.mk all
gmake[1]: Entering directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2023b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1'
gmake[1]: *** No rule to make target `/hardware/arduino/avr/cores/arduino/wiring_pulse.S', needed by `C:/Users/IndiaEE1/DOCUME~1/MATLAB/R2023b/ARDUIN~1/ARDUIN~1/FASTER~1/wiring_pulse.S.o'. Stop.
gmake[1]: Leaving directory `C:/PROGRA~3/MATLAB/SUPPOR~1/R2023b/toolbox/target/SUPPOR~1/ARDUIN~2/STATIC~1'
gmake: *** [all] Error 2
0 commentaires
Réponses (1)
Mark McBroom
le 23 Mar 2024
Best guess is that MATLAB is adding some directories to the Windows PATH environment variable for the TI compiler. At the MATLAB prompt, type: getenv('PATH')
Then, open a powershell session and type: echo env:path
If you see TI or code composer studio folders in the PATH from MATLAB that aren't there for powershell, add the to the powershell path and then try running the batch script.
0 commentaires
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!