Compilation of hex-file or programming fails

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Compilation of hex-file or programming fails

Postby Gwain » Thu Mar 26, 2020 1:21 pm

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8825
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2561 times
Been thanked: 3720 times
Contact:

Re: Compilation of hex-file or programming fails

Postby medelec35 » Thu Mar 26, 2020 3:22 pm

Can you post a flowchart, as that will help to see what the issue is.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Thu Mar 26, 2020 6:26 pm

Hi Medelec35,

Thanks for your reply.
Attached is the flowchart.

Regards
Gwain
Attachments
ElLastRelais.fcfx
(25.95 KiB) Downloaded 7 times

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

Re: Compilation of hex-file or programming fails

Postby Benj » Thu Mar 26, 2020 9:25 pm

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.
Attachments
PIC_CAL_EEPROM.c
(8.11 KiB) Downloaded 9 times
16F527.fcdx
(5.67 KiB) Downloaded 9 times

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Sat Mar 28, 2020 9:43 am

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

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Thu Apr 02, 2020 11:14 am

Hi there,

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

Regards
Gwain

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

Re: Compilation of hex-file or programming fails

Postby Benj » Thu Apr 02, 2020 11:47 am

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.

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Fri Apr 03, 2020 5:36 pm

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

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Fri Apr 03, 2020 5:45 pm

...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

Gwain
Posts: 7
Joined: Thu Mar 26, 2020 1:07 pm
Contact:

Re: Compilation of hex-file or programming fails

Postby Gwain » Sat Apr 11, 2020 10:31 am

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.