Page 1 of 1

Compilation of hex-file or programming fails

Posted: Thu Mar 26, 2020 1:21 pm
by Gwain
Hi there,

We've just build our first project with flowcode for a PIC16F527. It works fine in the simulator, but generating a hex-file or programming the chip does not work.
When I try to generate the hex-file I get this error message:
Target folder: C:\Users\Laser\Dropbox\BEN_MA~1\ELEKTR~1\FlowCode
Source name: C:\Users\Laser\Dropbox\Ben_Mark_Peter_Austauschordner\Elektronisches Relais\FlowCode\ElLastRelais.fcfx
Title: ELR-CoolRide
Description: Elektronisches LastRelais "SchaltBox".
Device: PIC.16F.16F527
Generated by: Flowcode v8.2.2.15
Date: Wednesday, March 25, 2020 16:27:30
Users: 1
Registered to: XXX
License key: XXX
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat 16F527 "C:\Users\Laser\Dropbox\BEN_MA~1\ELEKTR~1\FlowCode\" "ElLastRelais"

C:\Users\Laser\Dropbox\BEN_MA~1\ELEKTR~1\FlowCode>C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic\batch\..\bin\xc8.exe --chip=16F527 "ElLastRelais.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:
79: #warning "String temporary variables not defined to save on limited RAM space on your current target device"
(162) #warning: "String temporary variables not defined to save on limited RAM space on your current target device" ^ (warning)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_IO.h:
99: #warning "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly"
(162) #warning: "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly" ^ (warning)
ElLastRelais.c: __EEPROM_DATA()
171: __EEPROM_DATA(0,1,0x2,0x03,'A','b','H','e');
^ (194) ")" expected
172: __EEPROM_DATA('l','l','o',0xFF,0xFF,0xFF,0xFF,0xFF);
^ (194) ")" expected
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Enable()
6453: tris_reg = &TRISC;
^ (1418) attempt to read "control" qualified object which is Write-Only
^ (1418) attempt to read "control" qualified object which is Write-Only
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c: FC_CAL_EE_Read()
257: EECON1bits.EEPGD = 0;
^ (192) undefined identifier "EECON1bits"
^ (196) struct/union required
258: EECON1bits.CFGS = 0;
^ (196) struct/union required
260: EECON1bits.RD = 1;
^ (196) struct/union required
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_EEPROM.c: FC_CAL_EE_Write()
275: while ((EECON1bits.WR));
^ (192) undefined identifier "EECON1bits"
^ (196) struct/union required
285: EECON1bits.EEPGD = 0;
^ (196) struct/union required
286: EECON1bits.CFGS = 0;
^ (196) struct/union required
288: EECON1bits.WREN = 1;
^ (196) struct/union required
291: EECON2 = 0x55;
^ (192) undefined identifier "EECON2"
293: EECON1bits.WR = 1;
^ (196) struct/union required
294: while ((EECON1bits.WR));
^ (196) struct/union required
297: EECON1bits.WREN = 0;
^ (196) struct/union required
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1

Autoclose turned off


FINISHED


Any ideas what's the issue here?
I'd really appreciate your contributions, since all this FlowCode stuff is new and unknown to me.

Many thanks in advance
Gwain

Re: Compilation of hex-file or programming fails

Posted: Thu Mar 26, 2020 3:22 pm
by medelec35
Can you post a flowchart, as that will help to see what the issue is.

Re: Compilation of hex-file or programming fails

Posted: Thu Mar 26, 2020 6:26 pm
by Gwain
Hi Medelec35,

Thanks for your reply.
Attached is the flowchart.

Regards
Gwain

Re: Compilation of hex-file or programming fails

Posted: Thu Mar 26, 2020 9:25 pm
by Benj
Hello,

Thanks for letting us know. I've placed the latest fixes onto the update system for you now.

Help -> Check for updates.

Let us know how you get on.

Re: Compilation of hex-file or programming fails

Posted: Sat Mar 28, 2020 9:43 am
by Gwain
Hello,
thanks a lot.
By building the HEX the errors got less, but still there:

Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:
79: #warning "String temporary variables not defined to save on limited RAM space on your current target device"
(162) #warning: "String temporary variables not defined to save on limited RAM space on your current target device" ^ (warning)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_IO.h:
99: #warning "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly"
(162) #warning: "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly" ^ (warning)
ElLastRelais.c: __EEPROM_DATA()
171: __EEPROM_DATA(0,1,0x2,0x03,'A','b','H','e');
^ (194) ")" expected
172: __EEPROM_DATA('l','l','o',0xFF,0xFF,0xFF,0xFF,0xFF);
^ (194) ")" expected
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Enable()
6453: tris_reg = &TRISC;
^ (1418) attempt to read "control" qualified object which is Write-Only
^ (1418) attempt to read "control" qualified object which is Write-Only
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1

Re: Compilation of hex-file or programming fails

Posted: Thu Apr 02, 2020 11:14 am
by Gwain
Hi there,

Any further ideas on this?
Suggestions how to resolve this issue would be highly appreciated.

Regards
Gwain

Re: Compilation of hex-file or programming fails

Posted: Thu Apr 02, 2020 11:47 am
by Benj
Hello Gwain,

Some of the errors are caused by the EEPROM initialisation, you could try and remove the initialiser values from the EEPROM properties and see if this helps.

That then leaves this one.
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Enable()
6453: tris_reg = &TRISC;
^ (1418) attempt to read "control" qualified object which is Write-Only
^ (1418) attempt to read "control" qualified object which is Write-Only
Which might be easy to solve. I'll have a quick go for you this afternoon.

Re: Compilation of hex-file or programming fails

Posted: Fri Apr 03, 2020 5:36 pm
by Gwain
Hello Benj,

I am sorry, I don't know anything about "initialiser values of the EEPROM properties" and can not follow what is ment with this hint.

I just created the Flowcode-graph and try to get out a loadable HEX-file.
Within the graph there are blocks where I wanted to read a value and to write a value to the EEPROM.


Regards,
Gwain

Re: Compilation of hex-file or programming fails

Posted: Fri Apr 03, 2020 5:45 pm
by Gwain
...and when I delete all Boxes with EEPROM-Commands, yes, less errors, but still errors remain:

Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:
79: #warning "String temporary variables not defined to save on limited RAM space on your current target device"
(162) #warning: "String temporary variables not defined to save on limited RAM space on your current target device" ^ (warning)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_IO.h:
99: #warning "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly"
(162) #warning: "Reduced functionality IO on your target device, components such as Software I2C and SPI may not compile correctly" ^ (warning)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Enable()
6453: tris_reg = &TRISC;
^ (1418) attempt to read "control" qualified object which is Write-Only
^ (1418) attempt to read "control" qualified object which is Write-Only
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1

Re: Compilation of hex-file or programming fails

Posted: Sat Apr 11, 2020 10:31 am
by Gwain
Hello Benj,

is there any solution for those errors and how can be used / accessed the EEPROM then without getting that error ?

Have nice easter,
Gwain
Benj wrote:Hello Gwain,

Some of the errors are caused by the EEPROM initialisation, you could try and remove the initialiser values from the EEPROM properties and see if this helps.

That then leaves this one.
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_ADC.c: FC_CAL_ADC_Enable()
6453: tris_reg = &TRISC;
^ (1418) attempt to read "control" qualified object which is Write-Only
^ (1418) attempt to read "control" qualified object which is Write-Only
Which might be easy to solve. I'll have a quick go for you this afternoon.