Edmundajw
Aerospace
- Jan 29, 2014
- 2
Hi all,
I've been experimenting with creating an S-Function block which used some pre-written libraries to communicate with an LCD screen on an Arduino Mega 2560 board. I'm hoping that someone has done something similar as I've run into some problems.
I've used the S-Function generator block to create the custom block, and the block itself builds just fine- It's only when I come to compile the model and upload to the Arduino that it comes up with loads of compilation errors. The errors complain about things wrong with the syntax in the libraries- I din;t understand how these can be right as the libraries come from a reputable source, and I know they work. I've used the libraries from within the Arduino IDE fine, but there are problems in using them in Simulink.
I've added the libraries with #include, in the block generator like so;
The errors indicate that the libraries have been found just fine, but indicate syntax errors, saying that certain syntaxes are compatible with some languages but not this one. I don't understand this as Arduino code is supposed to work like this, and others have used Simulink in this way. I've found this exact same error on a couple of forum posts on the internet, from people trying to do very similar things, but then they've only posted that they've resolved it now, but not said how! So I know I'm definitely going along the right lines, but with a few weeks of struggling on this, I really don't know what I'm doing wrong.
I've asked people in the Arduino IRC help channel, but have been told on several occasions this is more of a Simulink problem.
Below are all the errors that come from compiling the model. Apologies about the length.
Thanks in advance if you have any ideas.
Regards,
Edmund.
I've been experimenting with creating an S-Function block which used some pre-written libraries to communicate with an LCD screen on an Arduino Mega 2560 board. I'm hoping that someone has done something similar as I've run into some problems.
I've used the S-Function generator block to create the custom block, and the block itself builds just fine- It's only when I come to compile the model and upload to the Arduino that it comes up with loads of compilation errors. The errors complain about things wrong with the syntax in the libraries- I din;t understand how these can be right as the libraries come from a reputable source, and I know they work. I've used the libraries from within the Arduino IDE fine, but there are problems in using them in Simulink.
I've added the libraries with #include, in the block generator like so;
The errors indicate that the libraries have been found just fine, but indicate syntax errors, saying that certain syntaxes are compatible with some languages but not this one. I don't understand this as Arduino code is supposed to work like this, and others have used Simulink in this way. I've found this exact same error on a couple of forum posts on the internet, from people trying to do very similar things, but then they've only posted that they've resolved it now, but not said how! So I know I'm definitely going along the right lines, but with a few weeks of struggling on this, I really don't know what I'm doing wrong.
I've asked people in the Arduino IRC help channel, but have been told on several occasions this is more of a Simulink problem.
Below are all the errors that come from compiling the model. Apologies about the length.
Code:
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: "C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/tools/avr/bin/avr-gcc" -I"C:/Users/Edmund/Documents/MATLAB/SimulinkScreen_Block_rtt" -I"C:/Users/Edmund/Documents/MATLAB" -I"C:/Users/Edmund/Documents/SimulinkScreenNew" -I"C:/Program Files/MATLAB/R2013a/extern/include" -I"C:/Program Files/MATLAB/R2013a/simulink/include" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2013a/rtw/c/ert" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/variants/mega" -I"C:/MATLAB/SupportPackages/R2013a/arduino/include" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/libraries/Servo" -mmcu=atmega2560 -std=gnu99 -Wall -Wstrict-prototypes -g -Os -D"MODEL=SimulinkScreen_Block" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"TID01EQ=0" -D"F_CPU=16000000" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_ROTH_MEGA2560_=" -D"_RTT_NUMSERVOS_=0" -c -x none ./HardwareSerial.cpp ./Print.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./new.cpp ./wiring.c ./wiring_analog.c ./wiring_digital.c ./io_wrappers.cpp ./Screen_Write_wrapper.c ./SimulinkScreen_Block.c ./SimulinkScreen_Block_data.c ./ert_main.c
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./io_wrappers.cpp: In function 'void Serial_read(int, int, uint8_t*, int*)':
./io_wrappers.cpp:40: warning: 'libFcnOutput' may be used uninitialized in this function
In file included from ./Screen_Write_wrapper.c:39:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:24:1: warning: "true" redefined
In file included from ./Screen_Write_wrapper.c:33:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./Screen_Write_wrapper.c:39:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:25:1: warning: "false" redefined
In file included from ./Screen_Write_wrapper.c:33:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
In file included from ./Screen_Write_wrapper.c:40:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:8:24: warning: extra tokens at end of #include directive
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:8:30: error: WProgram.h: No such file or directory
In file included from ./Screen_Write_wrapper.c:40:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_GFX'
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:34,
from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:35:22: error: glcdfont.c: No such file or directory
In file included from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:125: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:163: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:205: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:214: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:220: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:226: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:239: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:254: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:265: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:274: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:351: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:369: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:390: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:424: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:429: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:433: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:439: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:444: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:448: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:452: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:469: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:473: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:477: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
In file included from ./Screen_Write_wrapper.c:42:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:22:25: warning: extra tokens at end of #include directive
In file included from ./Screen_Write_wrapper.c:42:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_PCD8544'
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:29,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:30,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:22:25: warning: extra tokens at end of #include directive
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:30,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_PCD8544'
In file included from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:98: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:124: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:190: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:204: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:213: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:222: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:286: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
./Screen_Write_wrapper.c: In function 'Screen_Write_Outputs_wrapper':
./Screen_Write_wrapper.c:91: error: 'Adafruit_PCD8544' undeclared (first use in this function)
./Screen_Write_wrapper.c:91: error: (Each undeclared identifier is reported only once
./Screen_Write_wrapper.c:91: error: for each function it appears in.)
./Screen_Write_wrapper.c:91: error: expected ';' before 'display'
./Screen_Write_wrapper.c:105: warning: function declaration isn't a prototype
./Screen_Write_wrapper.c: In function 'setup':
./Screen_Write_wrapper.c:106: error: 'Serial' undeclared (first use in this function)
./Screen_Write_wrapper.c:108: error: 'display' undeclared (first use in this function)
./Screen_Write_wrapper.c: In function 'Screen_Write_Outputs_wrapper':
./Screen_Write_wrapper.c:120: error: 'display' undeclared (first use in this function)
./Screen_Write_wrapper.c:127: error: 'HEX' undeclared (first use in this function)
./Screen_Write_wrapper.c:142: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:146: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:153: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:163: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:167: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:174: warning: function declaration isn't a prototype
./Screen_Write_wrapper.c: In function 'Screen_Write_Update_wrapper':
./Screen_Write_wrapper.c:218: warning: function declaration isn't a prototype
In file included from ./ert_main.c:18:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:24:1: warning: "true" redefined
In file included from ./SimulinkScreen_Block.h:23,
from ./ert_main.c:17:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./ert_main.c:18:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:25:1: warning: "false" redefined
In file included from ./SimulinkScreen_Block.h:23,
from ./ert_main.c:17:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
make: *** [HardwareSerial.o] Error 1
The build process will terminate as a result.
Caused by:
The build failed with the following message: "C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/tools/avr/bin/avr-gcc" -I"C:/Users/Edmund/Documents/MATLAB/SimulinkScreen_Block_rtt" -I"C:/Users/Edmund/Documents/MATLAB" -I"C:/Users/Edmund/Documents/SimulinkScreenNew" -I"C:/Program Files/MATLAB/R2013a/extern/include" -I"C:/Program Files/MATLAB/R2013a/simulink/include" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src" -I"C:/Program Files/MATLAB/R2013a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2013a/rtw/c/ert" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/cores/arduino" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/hardware/arduino/variants/mega" -I"C:/MATLAB/SupportPackages/R2013a/arduino/include" -I"C:/MATLAB/SupportPackages/R2013a/arduino-1.0/libraries/Servo" -mmcu=atmega2560 -std=gnu99 -Wall -Wstrict-prototypes -g -Os -D"MODEL=SimulinkScreen_Block" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"TID01EQ=0" -D"F_CPU=16000000" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_ROTH_MEGA2560_=" -D"_RTT_NUMSERVOS_=0" -c -x none ./HardwareSerial.cpp ./Print.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./new.cpp ./wiring.c ./wiring_analog.c ./wiring_digital.c ./io_wrappers.cpp ./Screen_Write_wrapper.c ./SimulinkScreen_Block.c ./SimulinkScreen_Block_data.c ./ert_main.c
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./io_wrappers.cpp: In function 'void Serial_read(int, int, uint8_t*, int*)':
./io_wrappers.cpp:40: warning: 'libFcnOutput' may be used uninitialized in this function
In file included from ./Screen_Write_wrapper.c:39:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:24:1: warning: "true" redefined
In file included from ./Screen_Write_wrapper.c:33:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./Screen_Write_wrapper.c:39:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:25:1: warning: "false" redefined
In file included from ./Screen_Write_wrapper.c:33:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
In file included from ./Screen_Write_wrapper.c:40:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:8:24: warning: extra tokens at end of #include directive
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:8:30: error: WProgram.h: No such file or directory
In file included from ./Screen_Write_wrapper.c:40:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_GFX'
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:34,
from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:35:22: error: glcdfont.c: No such file or directory
In file included from ./Screen_Write_wrapper.c:41:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:125: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:163: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:205: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:214: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:220: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:226: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:239: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:254: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:265: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:274: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:351: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:369: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:390: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:424: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:429: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:433: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:439: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:444: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:448: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:452: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:469: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:473: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.cpp:477: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
In file included from ./Screen_Write_wrapper.c:42:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:22:25: warning: extra tokens at end of #include directive
In file included from ./Screen_Write_wrapper.c:42:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_PCD8544'
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:29,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_GFX.h:1:1: error: unterminated #ifndef
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:30,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:22:25: warning: extra tokens at end of #include directive
In file included from C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:30,
from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Adafruit_PCD8544'
In file included from ./Screen_Write_wrapper.c:43:
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:98: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:124: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:190: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:204: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:213: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:222: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
C:/Users/Edmund/Documents/SimulinkScreenNew/Adafruit_PCD8544.cpp:286: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
./Screen_Write_wrapper.c: In function 'Screen_Write_Outputs_wrapper':
./Screen_Write_wrapper.c:91: error: 'Adafruit_PCD8544' undeclared (first use in this function)
./Screen_Write_wrapper.c:91: error: (Each undeclared identifier is reported only once
./Screen_Write_wrapper.c:91: error: for each function it appears in.)
./Screen_Write_wrapper.c:91: error: expected ';' before 'display'
./Screen_Write_wrapper.c:105: warning: function declaration isn't a prototype
./Screen_Write_wrapper.c: In function 'setup':
./Screen_Write_wrapper.c:106: error: 'Serial' undeclared (first use in this function)
./Screen_Write_wrapper.c:108: error: 'display' undeclared (first use in this function)
./Screen_Write_wrapper.c: In function 'Screen_Write_Outputs_wrapper':
./Screen_Write_wrapper.c:120: error: 'display' undeclared (first use in this function)
./Screen_Write_wrapper.c:127: error: 'HEX' undeclared (first use in this function)
./Screen_Write_wrapper.c:142: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:146: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:153: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:163: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:167: warning: assignment makes integer from pointer without a cast
./Screen_Write_wrapper.c:174: warning: function declaration isn't a prototype
./Screen_Write_wrapper.c: In function 'Screen_Write_Update_wrapper':
./Screen_Write_wrapper.c:218: warning: function declaration isn't a prototype
In file included from ./ert_main.c:18:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:24:1: warning: "true" redefined
In file included from ./SimulinkScreen_Block.h:23,
from ./ert_main.c:17:
./rtwtypes.h:158:1: warning: this is the location of the previous definition
In file included from ./ert_main.c:18:
C:/Users/Edmund/Documents/SimulinkScreenNew/Arduino.h:25:1: warning: "false" redefined
In file included from ./SimulinkScreen_Block.h:23,
from ./ert_main.c:17:
./rtwtypes.h:154:1: warning: this is the location of the previous definition
make: *** [HardwareSerial.o] Error 1
Thanks in advance if you have any ideas.
Regards,
Edmund.