- Find the template of the Arduino makefile that MATLAB uses. Mine was located in C:\MATLAB\Targets\R2012b\arduinouno\registry\defarduinogmake.mkt for the Arduino Uno board.
- Add the following line to the top of the template, right below the header: SHELL=C:/Windows/System32/cmd.exe
Problem with Simulink Realtime Target on Arduino UNO with Win 7 X64
31 views (last 30 days)
I keep getting the following error. I can't figure this one out.
The call to realtime_make_rtw_hook, during the after_make hook generated the following error: The build failed with the following message: "G:\MATLAB\Targets\R2012b\arduino-1.0\hardware\tools\avr\utils\bin\make": Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4217b3)
The build process will terminate as a result.
Caused by: The build failed with the following message: "G:\MATLAB\Targets\R2012b\arduino-1.0\hardware\tools\avr\utils\bin\make": Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4217b3)
Jorge on 22 May 2013
Another source of error appears to exist when parenthesis in the Windows PATH variable confuse the encoder. However, I've found a workaround:
So far, now it compiles flawlessly for me.
java python on 3 Oct 2013
"to the top of the template, right below the header:" . I don't know where that is ? Could you please clarify little bit ? i am able to open the defarduinogmake.mkt file .
Erdi Tac on 14 Aug 2014
I did what Jorge suggested and it works. But you need to do more than what is written in his answer. By the way the solution works for all arduino types. I will rewrite Jorge's answer with a few additions:
1) First of all close MATLAB.
2) For arduino uno find the file C:\MATLAB\Targets\R2012b\arduinouno\registry\defarduinogmake.mkt
For arduino nano find the file C:\MATLAB\Targets\R2012b\arduinonano\registry\defarduinogmake.mkt
For arduino mega2560 find the file C:\MATLAB\Targets\R2012b\arduinomega2560\registry\defarduinogmake.mkt
3) Add the following line to the top of the file, right below the header: SHELL=C:/Windows/System32/cmd.exe
The end of the header is where the lines with "#" ends.
By the way the file is read-only. You can edit the file by copying it to desktop for example. Then delete the one at the original location and copy the edited file back to that location.
4) After you do all these restart MATLAB and execute "rehash toolboxcache".
That's all. You're done.
I also had this problem, and have solved it. Please look at the picture. I changed the "arduino-1.0.5-r2" to "arduino-1.0.5",and then it worked well.
Sadan Arshad on 10 May 2015
Hi i tried everything you guys mentioned i am running R2015a on Win 8.1 and still getting the same error with arduino uno.
Rogelio Martínez on 18 Apr 2018
I had the same problem with MatlabR215a, but the problem was the name of my file. I named it servo and it caused conflicts, I just changed the name to controlpid and it worked.