Hello.
I hope someone could please help me.
Launching the Compiler / Linker, I'm experiencing the following error from the XC8 Compiler (version 1.45, free mode):
Target folder: C:\Users\ORS\Desktop\FLOWCODE
Source name: C:\Users\ORS\Desktop\FLOWCODE\CABLE_TESTER.fcfx
Title:
Description:
Device: PIC.18F.18F47K40
Generated by: Flowcode v8.2.2.15
Date: Monday, November 30, 2020 21:29:18
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 18F47K40 "C:\Users\ORS\Desktop\FLOWCODE\" "CABLE_TESTER"
C:\Users\ORS\Desktop\FLOWCODE>C:\PROGRA~4\Flowcode\Common\COMPIL~1\pic\batch\..\bin\xc8.exe --chip=18F47K40 "CABLE_TESTER.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
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CABLE_TESTER.as: 11546: (876) syntax error
CABLE_TESTER.as: 11550: (876) syntax error
CABLE_TESTER.as: 11554: (876) syntax error
(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
The C-Code lines the errors are related to, apparently do not have syntax error problem.
Trying compiling with 2.30 version of XC8, I got a different type of error:
error: (296) out of memory
The project should tests the continuity or the isolation between several Input / Output pins over a total of 24 different electrical cables, in order to confirm that the cable under test is correctly assembled and welded. The PIC commands some Multiplexers/Demultiplexers (CD4067) which feeds a positive +5 Volt to one Pin on the Input connector and connect the PIC ADC to one Pin on the Output connector of the electrical cable.
Since the program will be quite long, after adding a small amount of code, I try to compile the program in order to see if I've made some mistakes on the last code added.
If I delete any cable's macro (and the related "marco call"), it correctly get compiled so the issue would seem to be related to memory usage ..
But those errors came out after adding only a small amount of code and the used Program space in the previously correctly compiled program was only 38.6% so the issue shouldn't be related to the PIC's used memory.
Am I doing something wrong?
Many thanks in advance and best regards
Rov
XC8 1.45 syntax error programming PIC18F47K40
Moderator: Benj
XC8 1.45 syntax error programming PIC18F47K40
- Attachments
-
- CABLE_TESTER.fcfx
- (1.29 MiB) Downloaded 149 times
- 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: XC8 1.45 syntax error programming PIC18F47K40
Hi Roy,
This takes a while to compile and then looking at the .as file some of the goto's are negative numbers which is very odd.
It looks like there is a lot of similarity between all the CAVO macros. Maybe it would be better to have a single macro and then a switch statement based on a mode. This would be easier to maintain and hopefully should then compile correctly.
Your Test macro already does this to call all the individual macros but probably needs to do it a bit more like this to reuse code and save program memory space.
I've converted the first two macros for you inside the Test macro. It might not be totally correct but hopefully it's a bit more managable this way. I also deleted the CAVA macros and confirmed that when they are gone the compilation error also goes away.
This takes a while to compile and then looking at the .as file some of the goto's are negative numbers which is very odd.
Code: Select all
l3165:
line -32434
goto l37554
l3166:
line -32365
l3167:
goto l3167
line -32364
Your Test macro already does this to call all the individual macros but probably needs to do it a bit more like this to reuse code and save program memory space.
I've converted the first two macros for you inside the Test macro. It might not be totally correct but hopefully it's a bit more managable this way. I also deleted the CAVA macros and confirmed that when they are gone the compilation error also goes away.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: XC8 1.45 syntax error programming PIC18F47K40
Hi Ben
many thanks for your time and effort.
It would be interesting to know why there are negative numbers in some goto instruction in the .as file since I don't think there was an error in my program
I'll try to follow what you suggested me but I don't understand the program's operation when there are lot of definition line related to the same variable inside the same calculation icon as you did (i.e. .NumTests = .NumTests + 1), so I have to find some informations.
Thanks again.
Rov
many thanks for your time and effort.
It would be interesting to know why there are negative numbers in some goto instruction in the .as file since I don't think there was an error in my program
I'll try to follow what you suggested me but I don't understand the program's operation when there are lot of definition line related to the same variable inside the same calculation icon as you did (i.e. .NumTests = .NumTests + 1), so I have to find some informations.
Thanks again.
Rov
- 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: XC8 1.45 syntax error programming PIC18F47K40
Hi Roy,
Rather then go off into a similar macro for each test I now do the test inside the test macro, the .NumTests = .NumTests + 1 command simply increments the value in the NumTests variable so we know how many steps are in the test.
Here is a snippet taken from one of your macros ported to the new script style
So test 1 would be
Test 2 would be
Etc.
Rather then go off into a similar macro for each test I now do the test inside the test macro, the .NumTests = .NumTests + 1 command simply increments the value in the NumTests variable so we know how many steps are in the test.
Here is a snippet taken from one of your macros ported to the new script style
Code: Select all
.InputCon[.NumTests] = 2 //InputCon for Test1
.OutputCon[.NumTests] = 17 //OutputCon for Test1
.NumTests = .NumTests + 1
.InputCon[.NumTests] = 3 //InputCon for Test2
.OutputCon[.NumTests] = 3 //OutputCon for Test2
.NumTests = .NumTests + 1
.InputCon[.NumTests] = 3 //InputCon for Test3
.OutputCon[.NumTests] = 3 //OutputCon for Test3
.NumTests = .NumTests + 1
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: XC8 1.45 syntax error programming PIC18F47K40
Now is more clear.
In the next days, I'll try this method.
Many thanks
Rov
In the next days, I'll try this method.
Many thanks
Rov