The program compiles to C without error but when I attempt to Compile to chip I get a number of undeclared internal variables. If this was normal C code I would edit the header files, but I don't want to change any Maxtrix supplied files.
Device: RPI.RPI.RPI3B+
Generated by: Flowcode v8.2.2.15
Here is a copy of the errors that I get:
Code: Select all
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\rpi\batch\rbuild.bat "Dual Channel RS232 Monitor - Raspberry Pi 3B+" "F:\Dropbox\Flowcode\"
Building Dual Channel RS232 Monitor - Raspberry Pi 3B+
In file included from Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:39:0:
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c: In function 'FCD_026e1_Timer1__StartCounter':
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:32: error: 'INTCONbits' undeclared (first use in this function)
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:70:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:125:34: note: in expansion of macro 'CAL_APPEND'
#define st_bit(var,bitno) CAL_APPEND(var, bits.bitno) = 1
^~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:25: note: in expansion of macro 'st_bit'
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1300:3: note: in expansion of macro 'Timer_1_Enable'
#if (0) // 1 == 4
^~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:32: note: each undeclared identifier is reported only once for each function it appears in
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:70:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:125:34: note: in expansion of macro 'CAL_APPEND'
#define st_bit(var,bitno) CAL_APPEND(var, bits.bitno) = 1
^~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:25: note: in expansion of macro 'st_bit'
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1300:3: note: in expansion of macro 'Timer_1_Enable'
#if (0) // 1 == 4
^~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:78: error: 'T0CONbits' undeclared (first use in this function)
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:70:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:126:31: note: in expansion of macro 'CAL_APPEND'
#define cr_bit(var,bitno) CAL_APPEND(var, bits.bitno) = 0
^~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:71: note: in expansion of macro 'cr_bit'
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1300:3: note: in expansion of macro 'Timer_1_Enable'
#if (0) // 1 == 4
^~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:176:93: error: 'T0CON' undeclared (first use in this function)
#define Timer_1_Enable {st_bit(INTCON, GIE); st_bit(INTCON, TMR0IE); cr_bit(T0CON, T0CS); T0CON = (T0CON & 0xF0) | 0x08; }
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1300:3: note: in expansion of macro 'Timer_1_Enable'
#if (0) // 1 == 4
^~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c: In function 'FCD_026e1_Timer1__StopCounter':
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:179:29: error: 'TMR0' undeclared (first use in this function)
#define Timer_1_CountRegLow TMR0
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1418:17: note: in expansion of macro 'Timer_1_CountRegLow'
#endif
^
In file included from Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:39:0:
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:177:33: error: 'INTCONbits' undeclared (first use in this function)
#define Timer_1_Disable {cr_bit(INTCON, TMR0IE); }
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:70:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:126:31: note: in expansion of macro 'CAL_APPEND'
#define cr_bit(var,bitno) CAL_APPEND(var, bits.bitno) = 0
^~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:177:26: note: in expansion of macro 'cr_bit'
#define Timer_1_Disable {cr_bit(INTCON, TMR0IE); }
^~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1427:3: note: in expansion of macro 'Timer_1_Disable'
#if (0) // 1 == 3
^~~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c: In function 'FCD_026e1_Timer1__ResetCounter':
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:179:29: error: 'TMR0' undeclared (first use in this function)
#define Timer_1_CountRegLow TMR0
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1478:3: note: in expansion of macro 'Timer_1_CountRegLow'
/*=----------------------------------------------------------------------=*\
^~~~~~~~~~~~~~~~~~~
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c: In function 'FCD_026e1_Timer1__GetRawCount':
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:179:29: error: 'TMR0' undeclared (first use in this function)
#define Timer_1_CountRegLow TMR0
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:1554:17: note: in expansion of macro 'Timer_1_CountRegLow'
{
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c: At top level:
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:178:25: error: expected identifier or '(' before 'if'
#define Timer_1_Handler if (ts_bit(INTCON, TMR0IF) && ts_bit(INTCON, TMR0IE)) { TIM_0_INC cr_bit(INTCON, TMR0IF); }
^
Dual Channel RS232 Monitor - Raspberry Pi 3B+.c:4599:2: note: in expansion of macro 'Timer_1_Handler'
Error(s) in build!
C:\Program Files (x86)\Flowcode\Common\Compilers\rpi\batch\rbuild.bat reported error code 1