How to build a simple simulink standalone execution file?
9 次查看(过去 30 天)
显示 更早的评论
First of all i seen the video in http://www.mathworks.com.au/products/simulink-coder/examples.html on how build the code.
I try build a code myself, so I simply build a simulink model with a source sin wave and output of scope. Then i set the configuration\code generation\system file to rsim.tlc and then i started to build.
I got some error like
Cannot CD to C:\Users\KELVIN~1\AppData\Local\Temp (Name is nonexistent or not a directory). similar to this one http://www.mathworks.com.au/matlabcentral/answers/16478-error-using-cd. I think this is not the real problem, the real problem, the real problem is i think i don't think my procedure it right, or maybe something is missing on the model.
It will be best if you record a video on making a simple exe file. Or can you help me to look on this problem.
4 个评论
Kaustubha Govind
2013-1-3
If you want to generate standalone C/C++ code from your model, grt.tlc or ert.tlc are more appropriate - what happens when you pick one of them?
Ryan G
2013-1-3
编辑:Ryan G
2013-1-3
Agree with Suneesh. Try to simplify the issue by using a simpler directory structure. There may be an issue somewhere between MATLAB and Windows trying to shorten the directory name (KELVIN~1).
Also agree with Kaustubha, grt.tlc is likely the most appropriate simulation target file if you only want to generate the fastest running EXE from Simulink.
采纳的回答
更多回答(2 个)
Kaustubha Govind
2013-1-9
I suspect your TEMP environment variable is set to C:\Users\KELVIN~1\AppData\Local\Temp which Simulink Coder is trying to use. You can verify this either from the Windows Environment Variable window, or from the MATLAB prompt using the command "getenv TEMP". If this is the case, try changing it to a path that exists, restart MATLAB and try again.
PS: I think you get email notifications only if someone posts an answer. All of our notes were comments, not answers, which is probably why you did not get a notification.
4 个评论
Gentian Licenji
2014-6-6
I agree with Shady N. The solution is only temporary. I am having the same issue. I am also using R2014a, Windows 8.1 64bit
Kaustubha Govind
2014-6-9
Also, I would recommend setting the environment in the shell (Linux) or System Settings (Windows) - when you use the SETENV command in MATLAB, it only applies to that session of MATLAB.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!