PIC16(L)F18446.fcdx with wrong definitions - partially [SOLVED]
Posted: Tue May 31, 2022 10:38 pm
Hi
I found PIC16(L)F18446.fcdx file has bugs and produces wrong results, at least, on Flowcode 9 .
During compilation FC9 reports errors with interrupts.
The problem is it refers to PIR1bits and PIE1bits, when, in reality,
it should be PIR4bits and PIE4bits .
Please review not only the above described but also other kind of possible errors
in the definitions .fcdx file for this uC .
Here is an excerpt from compilation errors:
16LF18446.c: main()
2424: T1CONbits.TMR1CS = 2;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S340
2426: T1CONbits.T1CKPS = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S340
2428: PIE1bits.TMR1IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S899
2455: PIE1bits.TMR2IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S899
16LF18446.c: myisr()
3721: if ((PIR1bits.TMR1IF) && (PIE1bits.TMR1IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
(199) logical type required ^
3724: PIR1bits.TMR1IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S881
3734: if ((PIR1bits.TMR2IF) && (PIE1bits.TMR2IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
16LF18446.c: 3734: too many errors (21)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
I found PIC16(L)F18446.fcdx file has bugs and produces wrong results, at least, on Flowcode 9 .
During compilation FC9 reports errors with interrupts.
The problem is it refers to PIR1bits and PIE1bits, when, in reality,
it should be PIR4bits and PIE4bits .
Please review not only the above described but also other kind of possible errors
in the definitions .fcdx file for this uC .
Here is an excerpt from compilation errors:
16LF18446.c: main()
2424: T1CONbits.TMR1CS = 2;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S340
2426: T1CONbits.T1CKPS = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S340
2428: PIE1bits.TMR1IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S899
2455: PIE1bits.TMR2IE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S899
16LF18446.c: myisr()
3721: if ((PIR1bits.TMR1IF) && (PIE1bits.TMR1IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
(199) logical type required ^
3724: PIR1bits.TMR1IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S881
3734: if ((PIR1bits.TMR2IF) && (PIE1bits.TMR2IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
16LF18446.c: 3734: too many errors (21)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]