Simulink, Arduino,
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm testing a Pulse Generator and Digital Output with the Arduino Uno/ simulink library. After clicking, "deploy to hardware," Under Code Generation, I get the error:
'D:\Program' is not recognized as an internal or external command, operable program or batch file.
### Build procedure for model: 'untitled' aborted due to an error. Error(s) encountered while building "untitled": ### Failed to generate all binary outputs.
1 comentario
Swarooph
el 4 de Oct. de 2016
What's your current folder? You can retrieve this using the command pwd. You need write permissions in the current directory for you to be able to deploy the model. I am suspecting you are in a 'Program Files' folder or some other system folder.. Try doing this from the Desktop or My Documents folder.
Respuestas (2)
Anusha Sridharan
el 6 de Oct. de 2016
This looks like it could be due to the way your environment variables might be set up. From your error message, it look like the path is being incorrectly read as 'D:\Program' instead of 'D:\Program Files\...'
You could try replacing the 'Program Files' part of the path with 'Progra~1' or 'Progra~1' if for Program Files (x86) such that the folder is looked up correctly. You could also restore your PATH and other environment variables to their initial values by entering the following in the MATLAB Command Window:
>> restoredefaultpath
>> rehash toolbox
>> save path
However, note that this would reset all of your environment variables to the default values and you would have to manually re-add the path to any custom/third-party toolboxes.
3 comentarios
Walter Roberson
el 16 de Oct. de 2016
You might have to set some Windows environment variables to get it to work; see http://www.computerhope.com/issues/ch000549.htm and http://windowsitpro.com/systems-management/what-environment-variables-are-available-windows
Walter Roberson
el 6 de Oct. de 2016
Some of the older Simulink releases were not able to handle spaces or non-ASCII characters in directory names or file names. Sometimes the problem was in third-party tools.
The easiest way to handle this is to create a new (series of) directories from the top of a drive filesystem, with no spaces or non-ASCII characters in the names, and to copy the models into there, and to build there.
Sometimes, though, you also ended up needing to install the tools themselves into safe directory names.
I think the last couple of releases have caught the majority of the problems. It would, however, not surprise me if some of the toolkits for something like Xilinx are not completely safe.
The problem has to do with the tools blindly substituting in full filenames (with directories) into scripts without putting double-quotes (") around the names. For example
mkdir %DESTINATION%
would fail if %DESTINATION% had a space in it; a safe tool would have used
mkdir "%DESTINATION%"
2 comentarios
Longhai ZHAO
el 18 de Oct. de 2016
Thank you very much for your answer in "https://cn.mathworks.com/matlabcentral/answers/305340#comment_398984"
I have replaced 'Program Files' part of the path with 'Progra~1', but the same error comes again. Would you please help me to handle this problem? Thank you very much.
Walter Roberson
el 18 de Oct. de 2016
Unfortunately I do not have an Arduino so I cannot completely install the Support Package or trigger a Deploy to Hardware.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!