With Arduino 1.0 there came some changes in naming and layout of the includes (see http://arduino.cc/en/Main/ReleaseNotes for details).
I made the following changes to the current version of the arduino target:
1. Edit boards.txt and delete lines 145 through 181 (as told in a previous post)
2. Substitute every occurence of "WProgram.h" with "Arduino.h".
3. Add an additonal include path in rtwmkcfg.m in order to find the "pins_arduino.h" header file (moved to the new variants dir).
4. Commented out line 33 in arduino_smain.tlc because __cxa_pure_virtual is now defined in the Arduino 1.0 libs (see new.h).
These changes allowed me to compile the blink demo without errors.
I needed two changes to get it working in my environment (Win 7, Matlab 2011b, Arduino-0023 Software, Arduino Uno):
- In Prefs.m I changed in the function searchForComPort the string of the device name to '\\Device\\USBSER000'
(Have a look in your registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM to identify the correct string)
- In runAvrDude.m I removed the baudrate option from the avrdude call. (Before it was set to 57600 and it doesn't work)
When you have message like "... does not exist", it looks that directory "blocks" is not on the MATLAB path. It should be, because it is done in function "setup_customtarget_arduino.m" on first functional line and next this path is saved:
result = savepath;
Try to run "setup_customtarget_arduino.m" again.
I have some trouble when I try to run simulate/build/flash any model from example (Error in S-function 'myarduino_blink/Digital Output': S-Function 'sfunar_digitalOutput' does not exist). But installation was successful (all path saved in matlab (2014/64). What do I do wrong?
This is strictly AVR-based Arduino with IDE version 1.0.5. This cannot be working with Due because of different MCU, different compiler and mainly, different internal structure of IDE 1.5.x.
If there will be more interest, we can consider port for Arduino Due.
I am trying to use the package with my arduino Due.
In the comments I read, the Arduino 1.5.x is not supported. So I installed 1.0.5 and set the path in the setup file correctly. When I try to build the demo "myarduino_blink.slx" I get the following error:
unknown MCU 'cortex-m3' specified
Known MCU names:
C:/Users/thomas/Desktop/arduino_ec_target/blocks/io_wrappers.cpp:1: error: MCU 'cortex-m3' supported for assembler only
In file included from c:/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/pgmspace.h:82,
c:/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/io.h:330:6: warning: #warning "device type not defined"
In file included from C:/Users/thomas/Desktop/arduino_ec_target/blocks/io_wrappers.cpp:10:
C:/Arduino/hardware/arduino/cores/arduino/Arduino.h:213:26: error: pins_arduino.h: No such file or directory
Did anybody use this package with the Arduino Due? Please help me on that.