[SOLVED] 16F18877 hardware UART bug

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

[SOLVED] 16F18877 hardware UART bug

Post by EtsDriver »

Hi!

Hardware uart channel 1 seems to be messed up, when trying to compile for hardware uart, demands remapping of pins (they are hw channel in C6, C7) and the log returns errors.

Code: Select all

Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=16F18877 "SW_LEDTEST.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_Init_1()
   325:	PIE1bits.RCIE = 0;
	              ^ (255) not a member of the struct/union ""
	                 ^ (182) illegal conversion between types
int -> volatile union S986
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_Send_1()
   431:	while ((PIR1bits.TXIF) == 0);
	                     ^ (255) not a member of the struct/union ""
	                           ^ (207) simple type required for "=="
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_Receive_1()
   511:	regcheck = (PIR1bits.RCIF);
	                         ^ (255) not a member of the struct/union ""
	                          ^ (182) illegal conversion between types
volatile union S967 -> unsigned char
	                          ^ (181) non-scalar types can't be converted to other types
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_UpdateBaud_1()
   728:	PIE1bits.RCIE = 0;
	              ^ (255) not a member of the struct/union ""
	                 ^ (182) illegal conversion between types
int -> volatile union S986
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1



FINISHED
Software channel compiles ok:

Code: Select all

Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=16F18877 "SW_LEDTEST.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration


Memory Summary:
    Program space        used   143h (   323) of  8000h words   (  1.0%)
    Data space           used    32h (    50) of  1000h bytes   (  1.2%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Data stack space     used     0h (     0) of   FCDh bytes   (  0.0%)
    Configuration bits   used     5h (     5) of     5h words   (100.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.


Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe  


FINISHED
Ill just keep the good work up!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F18877 hardware UART bug

Post by Benj »

Thanks for letting us know.

I believe I have now solved the problem.

Simply copy the attached into your "Flowcode 7/CAL/PIC" folder and the problem should be resolved.
PIC_CAL_UART.c
(20.92 KiB) Downloaded 271 times
Let me know how you get on.

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: [SOLVED] 16F18877 hardware UART bug

Post by EtsDriver »

Marked as solved, works on hw now!
Ill just keep the good work up!

Post Reply