compile error

Moderator: Benj

minolta
Posts: 16
Joined: Tue Feb 05, 2013 8:36 pm
Location: Romania
Has thanked: 7 times
Been thanked: 6 times
Contact:

compile error

Postby minolta » Sat Jul 28, 2018 6:37 pm

After today update i have the bellow compiling error:

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\PIC\PIC_CAL_Float.c:
82: {
^ (984) type redeclared
^ (1098) conflicting declarations for variable "MX_Map_Float" (C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Float.c:81)
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]


I tested 2 different programs with 2 different chips (12f1840 and 18f26k80), same behavior.
Before the update was ok.

Tiberiu

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: compile error

Postby Monie Jacobsen » Sun Jul 29, 2018 12:40 pm

Hello
I have the same problem ;-)
See below!
ECIO40P:

Code: Select all

Target folder: C:\FLOVCO~1\FORSG~1
Source name:   C:\Flovcode8\Forsøg\ECIO40P_Test.fcfx
Title:         
Description:   
Device:        PIC.18F.ECIO-40
Generated by:  Flowcode v8.0.0.6
Date:          Sunday, July 29, 2018 12:34:58
Users:         1
Registered to: monie jacobsen
License key: X6U4U7
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\pic\bin\xc8.exe  --chip=18F4455 "ECIO40P_Test.c" --MSGDISABLE=359,1273,1388 --CODEOFFSET=800h --ROM=default,-0-7FF
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

Employing 18F4455 errata work-arounds:
 * Corrupted fast interrupt shadow registers
 * No stopping on H/W breakpoints after NOP2
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Float.c:
    82:   {
   ^ (984) type redeclared
   ^ (1098) conflicting declarations for variable "MX_Map_Float" (C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Float.c:81)
(908) exit status = 1
(908) exit status = 1

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



FINISHED

ARDUINO UNO:

Code: Select all

Target folder: C:\FLOVCO~1\FORSG~1
Source name:   C:\Flovcode8\Forsøg\Uno_Test.fcfx
Title:         
Description:   
Device:        ARD.ATMEGA.ATMEGA328P
Generated by:  Flowcode v8.0.0.6
Date:          Sunday, July 29, 2018 12:36:57
Users:         1
Registered to: monie jacobsen
License key: X6U4U7
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat  atmega328p "C:\FLOVCO~1\FORSG~1\Uno_Test.elf" "C:\FLOVCO~1\FORSG~1\Uno_Test.c" "C:\FLOVCO~1\FORSG~1\Uno_Test.lst"

C:\FLOVCO~1\FORSG~1>"C:\PROGRA~2\Flowcode\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\FLOVCO~1\FORSG~1\Uno_Test.elf" "C:\FLOVCO~1\FORSG~1\Uno_Test.c" -lm -Wl,-gc-sections
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c:431,
                 from C:\FLOVCO~1\FORSG~1\Uno_Test.c:43:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_Float.c:89: error: conflicting types for 'MX_Map_Float'
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_Float.c:82: error: previous declaration of 'MX_Map_Float' was here

Error returned from [avr-gcc.exe]

C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat reported error code 1



FINISHED
Best Regard
Monie

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

Re: compile error

Postby medelec35 » Sun Jul 29, 2018 1:14 pm

Hi minolta/monie,
It appears there is an issue with the latest AVR/PIC float.c update.
Luckily as its version 8, As a temporary fix you can go back to the original file which compiles OK.
To do this, make are you have loaded the flowchart that has the compile issue.
Select Help, Check for Updates.
Click on Show Up-to-date files
Select AVR\AVR_CAL_Foat.c then in the New Revision Drop-down box select 1:
Rollback1.png
Rollback1.png (55.09 KiB) Viewed 2307 times

Click on Download.
After clicking on OK you should see:
Rollback2.png
Rollback2.png (52.61 KiB) Viewed 2307 times

Use the refresh Icon then try recompiling.

@Monie.
Reason your Flowchart compiled for me is because I had not updated Flowcode to the lastest version.
Can you follow the steps above, but you should select PIC\PIC_CAL_Float.c instead of AVR\AVR_CAL_Foat.c
These users thanked the author medelec35 for the post (total 4):
kersing (Sun Jul 29, 2018 4:40 pm) • minolta (Sun Jul 29, 2018 6:40 pm) • jgu1 (Mon Jul 30, 2018 5:49 am) • Monie Jacobsen (Mon Jul 30, 2018 10:45 am)
Rating: 21.05%
 
Martin

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

minolta
Posts: 16
Joined: Tue Feb 05, 2013 8:36 pm
Location: Romania
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: compile error

Postby minolta » Sun Jul 29, 2018 6:39 pm

Hi Martin,

I didn't know that is possible to go back so easily.
With the original file compiles ok.

thanks for the tip.

Tiberiu

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

Re: compile error

Postby medelec35 » Sun Jul 29, 2018 9:09 pm

Hi Tiberiu,
You're welcome.
At least you can compile for now if required.
You will be able to update again to the latest version when the bug is sorted.
These users thanked the author medelec35 for the post (total 2):
jgu1 (Mon Jul 30, 2018 5:49 am) • Monie Jacobsen (Mon Jul 30, 2018 10:44 am)
Rating: 10.53%
 
Martin

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

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: compile error

Postby Monie Jacobsen » Mon Jul 30, 2018 2:45 pm

Hi medelec35 / Flowcode
I can not compile my flowcodev8 coder?
See the attached code examples that can not be uploaded on Flowcode v8
1:
ECIO40P_Test.fcfx
(6.21 KiB) Downloaded 49 times

2:
Uno_Test.fcfx
(6.79 KiB) Downloaded 58 times

Have tried updating following your instructions?
Best Regard
Monie

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

Re: compile error

Postby medelec35 » Mon Jul 30, 2018 3:00 pm

Hi Monie,
After following the steps in this post, by changing XXX_CAL_Float.c from revision 2 to revision 1 then both of your flowcharts compile for me.
If you sill get float error then check the XXX_CAL_Float.c is showing version 1 and the usual green block has changed to red (see Rollback2.png image in the attached link).
If not the float error then what error are you getting?
Martin

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

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

Re: compile error

Postby Benj » Mon Jul 30, 2018 3:18 pm

Sorry about this, it should be fixed now using the latest updates on the update system.
These users thanked the author Benj for the post (total 2):
jgu1 (Mon Jul 30, 2018 3:56 pm) • Monie Jacobsen (Tue Jul 31, 2018 8:42 am)
Rating: 10.53%
 

jgu1
Posts: 1083
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 984 times
Been thanked: 249 times
Contact:

Re: compile error

Postby jgu1 » Mon Jul 30, 2018 4:24 pm

Hi Ben!

I have just downloaded all the latest updates. I make a test with an Arduino and an Eico40. Brilliant, perfect. :D

Br Jorgen

BW. I have orderd a HP3006, look forward to make a test with this also. :wink:
These users thanked the author jgu1 for the post (total 2):
Monie Jacobsen (Tue Jul 31, 2018 8:42 am) • Benj (Tue Jul 31, 2018 5:49 pm)
Rating: 10.53%
 

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: compile error

Postby Monie Jacobsen » Mon Jul 30, 2018 4:46 pm

Hi Ben
Then Flowcode v8 works again.

Thank you very much ;-)
These users thanked the author Monie Jacobsen for the post:
Benj (Tue Jul 31, 2018 5:50 pm)
Rating: 5.26%
 
Best Regard
Monie

IVAN0555
Posts: 3
Joined: Tue Apr 23, 2019 3:44 pm
Has thanked: 1 time
Contact:

Re: compile error

Postby IVAN0555 » Tue Apr 23, 2019 3:53 pm

Hi I need help
i have a compile error



Target folder: C:\Users\TEHSAP~1\DOWNLO~1
Source name: C:\Users\TEHSA PC 2\Downloads\TEHSA TIMER HOROMETRO 1.fcfx
Title:
Description:
Device: PIC.16F.16LF722
Generated by: Flowcode v8.1.1.11
Date: Tuesday, April 23, 2019 09:51:54
Users: 1
Registered to:
License key: *****
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat 16LF722 "C:\Users\TEHSAP~1\DOWNLO~1\" "TEHSA TIMER HOROMETRO 1"

C:\Users\TEHSAP~1\DOWNLO~1>C:\PROGRA~3\Flowcode\Common\COMPIL~1\pic\batch\..\bin\xc8.exe --chip=16LF722 "TEHSA TIMER HOROMETRO 1.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

using updated 32-bit floating-point libraries; improved accuracy might increase code size
. . .

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c: 76: (1250) could not find space (20 bytes) for variable _FCI_TMP_STR
(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



FINISHED

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

Re: compile error

Postby Benj » Wed Apr 24, 2019 10:20 am

Hello,

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\internals.c: 76: (1250) could not find space (20 bytes) for variable _FCI_TMP_STR


This message means you have run out of ram and the compiler cannot fit in all the variables. The TMP_STR variable is used to manipulate strings and can potentially be gotten rid of if you're not using string in your program. If you attach your program then we can have a look for you and potentially advise on changes to work around the problem.

IVAN0555
Posts: 3
Joined: Tue Apr 23, 2019 3:44 pm
Has thanked: 1 time
Contact:

Re: compile error

Postby IVAN0555 » Wed Apr 24, 2019 1:48 pm

TIMER 1.fcfx
(74.08 KiB) Downloaded 18 times

This is the program

User avatar
LeighM
Matrix Staff
Posts: 1876
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 440 times
Been thanked: 634 times
Contact:

Re: compile error

Postby LeighM » Wed Apr 24, 2019 3:08 pm

Hi,
You have a lot of memory taken up by message strings (more than x2 the available space)
One way to reduce this is to remove the string allocations and create a PrintMessage macro that has a message number as a parameter.
So a call to PrintMessage(5) prints a particular message, number 5.
To make this more readable, create some Global constants, e.g. CA with a value 0, CAT with a value 1 etc
Then you can call PrintMessage(CAT)
Here's an example of the PrintMessage macro, that uses a switch to select the correct message.

messages.jpg
messages.jpg (81.95 KiB) Viewed 1272 times
These users thanked the author LeighM for the post:
IVAN0555 (Wed Apr 24, 2019 4:46 pm)
Rating: 5.26%
 

IVAN0555
Posts: 3
Joined: Tue Apr 23, 2019 3:44 pm
Has thanked: 1 time
Contact:

Re: compile error

Postby IVAN0555 » Wed Apr 24, 2019 4:23 pm

Thank you LeighM
what are the characteristics to create the macro?

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

Re: compile error

Postby Benj » Wed Apr 24, 2019 4:55 pm

Looks like Leigh is suggesting a macro with a single byte based parameter named MessageNumber.
These users thanked the author Benj for the post:
LeighM (Thu Apr 25, 2019 10:04 am)
Rating: 5.26%