Arduino Mega R3 and gLCD SH1106 SPI
Posted: Tue Jun 28, 2022 1:53 pm
Hello,
I wanted to test Flowcode 9 (trial version) using Arduino Mega 23560 and a OLED Waveshare 1.3" with SH1106 in SPI mode.
It works fine with the Arduino IDE enviroment, but I wanted to test it also with Flowcode.
And it does not work. It has errors.
The compiler gives the the list of messages below.
Can you help to find the problem?
"
Target folder: C:\Users\geomanfred\Documents\Flowcode Projects
Source name: C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.fcfx
Title: App Developer Project
Description:
Device: ARD.ATMEGA.ATMEGA2560
Generated by: Flowcode v9.3.0.35
Date: Tuesday, June 28, 2022 14:39:06
Users: 1
Registered to: geomanfred (geomanfred)
Licence key: urSim
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.elf" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.lst"
C:\Users\geomanfred\Documents\Flowcode Projects>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D7958998291880A09BBE74CF7BA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EEFF12703F3DAF67B119A5A5B069403B38249A6C4D8A1304B09A437E7E2D43FD26DF891DB3086C82D6
C:\Users\geomanfred\Documents\Flowcode Projects>REM REVISION: 1.0
C:\Users\geomanfred\Documents\Flowcode Projects>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B
C:\Users\geomanfred\Documents\Flowcode Projects>REM DATE: 29\03\2021
C:\Users\geomanfred\Documents\Flowcode Projects>REM DIR: FCD\AVR\batchfiles\avra.bat
C:\Users\geomanfred\Documents\Flowcode Projects>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.elf" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c" -lm -Wl,-gc-sections
In file included from C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:44:0:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Init_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: error: 'tris' undeclared (first use in this function)
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:44: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: note: each undeclared identifier is reported only once for each function it appears in
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:44: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:83:28: error: 'port' undeclared (first use in this function)
#define MX_SPI_MOSI_PORT_1 port
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:58:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_PORT_X CAL_APPEND(MX_SPI_MOSI_PORT_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:24: note: in expansion of macro 'MX_SPI_MOSI_PORT_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Uninit_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: error: 'tris' undeclared (first use in this function)
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:39: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:315:3: note: in expansion of macro 'FC_CAL_Bit_In_DDR'
FC_CAL_Bit_In_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X);
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:315:42: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_In_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X);
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Byte_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:83:28: error: 'port' undeclared (first use in this function)
#define MX_SPI_MOSI_PORT_1 port
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:343:6: note: in expansion of macro 'FC_CAL_Bit_High'
FC_CAL_Bit_High(MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_PIN_X); //Set SDO bit
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:58:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_PORT_X CAL_APPEND(MX_SPI_MOSI_PORT_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:343:22: note: in expansion of macro 'MX_SPI_MOSI_PORT_X'
FC_CAL_Bit_High(MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_PIN_X); //Set SDO bit
^
Error returned from [avr-gcc.exe]
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat reported error code 0x1
Autoclose turned off
FINISHED
"
I wanted to test Flowcode 9 (trial version) using Arduino Mega 23560 and a OLED Waveshare 1.3" with SH1106 in SPI mode.
It works fine with the Arduino IDE enviroment, but I wanted to test it also with Flowcode.
And it does not work. It has errors.
The compiler gives the the list of messages below.
Can you help to find the problem?
"
Target folder: C:\Users\geomanfred\Documents\Flowcode Projects
Source name: C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.fcfx
Title: App Developer Project
Description:
Device: ARD.ATMEGA.ATMEGA2560
Generated by: Flowcode v9.3.0.35
Date: Tuesday, June 28, 2022 14:39:06
Users: 1
Registered to: geomanfred (geomanfred)
Licence key: urSim
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.elf" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.lst"
C:\Users\geomanfred\Documents\Flowcode Projects>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D7958998291880A09BBE74CF7BA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EEFF12703F3DAF67B119A5A5B069403B38249A6C4D8A1304B09A437E7E2D43FD26DF891DB3086C82D6
C:\Users\geomanfred\Documents\Flowcode Projects>REM REVISION: 1.0
C:\Users\geomanfred\Documents\Flowcode Projects>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B
C:\Users\geomanfred\Documents\Flowcode Projects>REM DATE: 29\03\2021
C:\Users\geomanfred\Documents\Flowcode Projects>REM DIR: FCD\AVR\batchfiles\avra.bat
C:\Users\geomanfred\Documents\Flowcode Projects>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.elf" "C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c" -lm -Wl,-gc-sections
In file included from C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:44:0:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Init_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: error: 'tris' undeclared (first use in this function)
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:44: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: note: each undeclared identifier is reported only once for each function it appears in
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:44: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:83:28: error: 'port' undeclared (first use in this function)
#define MX_SPI_MOSI_PORT_1 port
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:3: note: in expansion of macro 'FC_CAL_Bit_High_DDR'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:58:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_PORT_X CAL_APPEND(MX_SPI_MOSI_PORT_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:163:24: note: in expansion of macro 'MX_SPI_MOSI_PORT_X'
FC_CAL_Bit_High_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X); // MOSI pin is default high
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Uninit_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:73:28: error: 'tris' undeclared (first use in this function)
#define MX_SPI_MOSI_TRIS_1 tris
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:412:39: note: in definition of macro 'clear_bit'
#define clear_bit( reg, bitNumb ) ((reg) &= ~(1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:315:3: note: in expansion of macro 'FC_CAL_Bit_In_DDR'
FC_CAL_Bit_In_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X);
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_TRIS_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:59:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_TRIS_X CAL_APPEND(MX_SPI_MOSI_TRIS_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:315:42: note: in expansion of macro 'MX_SPI_MOSI_TRIS_X'
FC_CAL_Bit_In_DDR (MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_TRIS_X, MX_SPI_MOSI_PIN_X);
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c: In function 'FC_CAL_SPI_Master_Byte_1':
C:\Users\geomanfred\Documents\Flowcode Projects\Arduino Mega R3 SH1106H.c:83:28: error: 'port' undeclared (first use in this function)
#define MX_SPI_MOSI_PORT_1 port
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:413:38: note: in definition of macro 'set_bit'
#define set_bit( reg, bitNumb ) ((reg) |= (1 << (bitNumb)))
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:343:6: note: in expansion of macro 'FC_CAL_Bit_High'
FC_CAL_Bit_High(MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_PIN_X); //Set SDO bit
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:75:26: note: in expansion of macro 'MX_SPI_MOSI_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\internals.c:76:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:58:29: note: in expansion of macro 'CAL_APPEND'
#define MX_SPI_MOSI_PORT_X CAL_APPEND(MX_SPI_MOSI_PORT_, MX_SPI_NUM)
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:343:22: note: in expansion of macro 'MX_SPI_MOSI_PORT_X'
FC_CAL_Bit_High(MX_SPI_MOSI_PORT_X, MX_SPI_MOSI_PIN_X); //Set SDO bit
^
Error returned from [avr-gcc.exe]
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat reported error code 0x1
Autoclose turned off
FINISHED
"