Hello,
I'm wondering very much that I'm the only one having this problem (but I couldn't find any other posts in this forum):
- I use a simple simulink model, no changes made to the configuration
- Trying to build with Realtimeworkshop a executable (grt-target)
Matlab is 2009a, but the problem occurred also in earlier versions.
Trying to build it yields the error message:
'c:\Program' is not recognized as an internal or external command,
The problem is related to the batchfile untitled.bat, which is called to start the execution of the makefile:
set MATLAB=e:\Program Files\MATLAB\R2009a
c:\Program Files\MATLAB\R2009a\bin\win64\gmake -f untitled.mk .....
... GENERATE_REPORT=0
The second line tries to execute gmake, but the interpreter stops after the first space, trying to interprete c:\program as a program, which is not. Putting double quotes around it "c:\Program Files\MATLAB\R2009a\bin\win64\gmake" works fine. But the batchfile is rebuild everytime the build button is pressed. Not a feasible solution.
Any ideas how to solve this problem permanently ?
BR
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
1/25/2010 2:14:04 PM |
|
"Frank Maier" <frankm@dopedoo.de> wrote in message <hjk8vc$j4j$1@fred.mathworks.com>...
> Hello,
>
> I'm wondering very much that I'm the only one having this problem (but I couldn't find any other posts in this forum):
>
> - I use a simple simulink model, no changes made to the configuration
> - Trying to build with Realtimeworkshop a executable (grt-target)
>
> Matlab is 2009a, but the problem occurred also in earlier versions.
>
> Trying to build it yields the error message:
>
> 'c:\Program' is not recognized as an internal or external command,
>
> The problem is related to the batchfile untitled.bat, which is called to start the execution of the makefile:
>
> set MATLAB=e:\Program Files\MATLAB\R2009a
> c:\Program Files\MATLAB\R2009a\bin\win64\gmake -f untitled.mk .....
> ... GENERATE_REPORT=0
>
> The second line tries to execute gmake, but the interpreter stops after the first space, trying to interprete c:\program as a program, which is not. Putting double quotes around it "c:\Program Files\MATLAB\R2009a\bin\win64\gmake" works fine. But the batchfile is rebuild everytime the build button is pressed. Not a feasible solution.
> Any ideas how to solve this problem permanently ?
>
> BR
> Frank
This is a windows problem, not a matlab problem. If you put double quotes around the strings it might work:
set MATLAB="e:\Program Files\MATLAB\R2009a"
"c:\Program Files\MATLAB\R2009a\bin\win64\gmake" -f "untitled.mk"
hth
Jos
|
|
0
|
|
|
|
Reply
|
Jos
|
1/25/2010 3:21:02 PM
|
|
Frank:
You say that it works fine with the quotes . . . so why is this not a
feasible solution?
What do you mean by "But the batchfile is rebuild everytime the build
button is pressed."? And why would that be a problem?
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
1/25/2010 3:42:13 PM
|
|
> What do you mean by "But the batchfile is rebuild everytime the build
> button is pressed."? And why would that be a problem?
Well, I put quotes around the gmake call, and it works. Then I change model, I rebuild the code, and the batch file is recreated (from rtw, without quotes). So I have to add again quotes to the batchfile.
It can't be that all rtw users are everytime adding quotes after they hit strg-c (at least those who install the matlab software in a default location like c:\program files).
BR
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
1/25/2010 4:46:02 PM
|
|
> This is a windows problem, not a matlab problem. If you put double quotes around the strings it might work:
as I mentioned, it does work, but you have to do that every time after you hit strg-b or press the build button (because the batch is rebuild every time, too).
Who cares if it is a dos or matlab problem, I want a smooth procedure to generate and compile code without editing every time code or batch files.
I would expect that grt is creating a valid batch file. I wonder if the whole world is installing matlab always in c:\matlab.
BR
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
1/25/2010 4:50:21 PM
|
|
Frank Maier wrote:
....
> Well, I put quotes around the gmake call, and it works. Then I change
> model, I rebuild the code, and the batch file is recreated (from rtw,
> without quotes). So I have to add again quotes to the batchfile.
>
> It can't be that all rtw users are everytime adding quotes after they
> hit strg-c (at least those who install the matlab software in a default
> location like c:\program files).
>
> BR
> Frank
Seems like a formal contact/support issue to TMW. Not having Simulink
nor RTW, can't comment otherwise.
Altho a question...does the content of the batch file actually change?
Would seem that only the contents of the model files would change unless
added/subtracted a file from the project. So, can you save the batch
file after the correction w/ a different name and ignore the new one?
Or, could you write another higher level file that is invoked that makes
the fixup automagically perhaps as another possible workaround?
Have you looked for a bug report/workaround at TMW?
--
|
|
0
|
|
|
|
Reply
|
dpb
|
1/25/2010 9:52:21 PM
|
|
Finally solved.
Just in case someones runs into similar problems: I'm creating a target for a realtime linux machine. So I used the grt_unix.tmf, but as I'm using a crosscompiler on Win OS I mixed it up with grt_vcc.tmf.
The command of interest in the tmf file is
MAKECMD = |>ALT_MATLAB_BIN<|/|>ARCH<|/gmake
The batch file's second line will be created from this command. You must use the version with ALT_.... for the path, that are the old dos style paths.
And as I have bothered you for nothing another small tip: If you have a crosscompiler and you want to set a path to it, you can also use the MAKECMD. Simply set up the new path variable in front of the call to gmake:
MAKECMD = set PATH=%PATH%;|>MATLAB_ROOT<|\toolbox\xxxx\cygwin\bin& |>ALT_MATLAB_BIN<|/|>ARCH<|/gmake
be careful not to place a space after bin and before &, as this would be interpreted as part of the path (the & seperates multiple commands in dos).
BR
Frank
|
|
0
|
|
|
|
Reply
|
nospam6181 (3)
|
1/27/2010 8:12:04 AM
|
|
|
6 Replies
413 Views
(page loaded in 0.067 seconds)
Similiar Articles: How I can use RTW to generate embedded code for motor control with ...How I can use RTW to generate embedded code for motor control with ... 'c:\Program' is not recognized as an ... 6 284 Frank Unable to run scripts in current working directory - comp.soft-sys ...Error using ==> restoredefaultpath System error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Command executed: C ... MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ...... returned an error of 2 'An_error_occurred_during_the_call_to_make' is not recognized as ... That is, compiling CUDA extended mex c code files on Windows 7 64-bit, Matlab ... I am also getting this error - comp.soft-sys.matlabfatal error U1052: file 'ntwin32.mak' not found ... Bspatializer~\slprj\accel\Bspatializer>call "C:\Program ... An_error_occurred_during_the_call_to_make' is not recognized ... Problems opening Wordpad from java (but notepad works just fine ...... and Settings\Administrator>notepad C:\Documents and Settings\Administrator>wordpad 'wordpad' is not recognized as an internal or external command, operable program or ... if statement not recognized - comp.soft-sys.matlabThis is the working code: > > for n = 1: length(name)-1 ... if statement not recognized - comp.soft-sys.matlab name is a variable with 16 trials. the ... how to make calls to C library functions on Mac - comp.lang.asm ...'gcc' complains that those symbols (C function names) can not be recognized. I did compiled some C code on Mac OSX, using : gcc -S code.c to obtain the assembly ... Linking Gambit, Fluent with Matlab - comp.soft-sys.matlab ...I used a code to write the journal file in Matlab. I am using !gambit.exe ... call gambit, but Matlab is showing the following error, > 'gambit.exe' is not recognized ... sqlldr not recognizing a file without an extension on Solaris ...It should be the same code for all the "traditional" utilities (sqlldr ... report with headers and data in columns - comp.databases ..... that are not being recognized ... C:\Program is not recognized as an internal or external command...Hello, I'm trying to create a native library header file to run a DLL in Java NetBeans, but when I put the path to NetBeans, C:\Program Files (x86)\Net Swish-e :: 'C:\Program' is not recognized as an internal or ...From: Ted Smith <tedsmith28(at)not-real.yahoo.co.uk> Date: Wed May 03 2006 - 14:43:57 GMT Hi I am really sorry if this is a really daft question to ask. 7/23/2012 4:09:48 PM
|