PIC16(L)F18446.fcdx with wrong definitions - partially [SOLVED]

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
miggarc
Posts: 52
http://meble-kuchenne.info.pl
Joined: Mon Jan 04, 2021 8:08 pm
Has thanked: 7 times
Been thanked: 4 times

PIC16(L)F18446.fcdx with wrong definitions - partially [SOLVED]

Post by miggarc »

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]
Last edited by miggarc on Sat Jun 11, 2022 6:18 pm, edited 2 times in total.

Many thanks in advance,


Miguel Garcia,
Electronic Systems Developer

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: PIC16(L)F18466.fcdx with wrong definitions

Post by BenR »

Hello Miguel,

Many thanks for letting us know.

I have hopefully now solved the problem and pushed the fix to the library update system. I've also added in the other missing timer peripherals.

Please let us know if you spot anything else and I'll investigate for you.

miggarc
Posts: 52
Joined: Mon Jan 04, 2021 8:08 pm
Has thanked: 7 times
Been thanked: 4 times

Re: PIC16(L)F18466.fcdx with wrong definitions

Post by miggarc »

Hi and thanks for you rapid answer.

It is solved ...


Microchip MPLAB XC8 C Compiler V2.10
Build date: Jul 30 2019
Part Support Version: 2.10
Copyright (C) 2019 Microchip Technology Inc.
using updated 32-bit floating-point libraries; improved accuracy might increase code size
.


Memory Summary:
Program space used 138h ( 312) of 4000h words ( 1.9%)
Data space used 27h ( 39) of 800h bytes ( 1.9%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Data stack space used 0h ( 0) of 7D5h bytes ( 0.0%)
Configuration bits used 5h ( 5) of 5h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)


Compilation successful!

Many thanks in advance,


Miguel Garcia,
Electronic Systems Developer

Post Reply