Page 1 of 1

unable to compile

Posted: Thu Oct 25, 2018 4:57 pm
by siliconchip
hi all,
apologies if this topic is in the wrong category, ive just bought a new pc and installed flowcode 7 and its up todate as per website however im having trouble compiling anything but when i compile on my old pc there is no prob with the exact same program,i seem to recall there is a file that can be downloaded and added to flowcode ?? please correct me if im wrong

cheers bob

Re: unable to compile

Posted: Thu Oct 25, 2018 7:13 pm
by medelec35
Hi Bob,
It could be something to do with the compiler settings.
Can you post the error within the code command on your post.
e.g

Code: Select all

Target folder: D:\Statments
Source name:   D:\Statments\p22_test_4.fcfx
Title:         
Description:   
Device:        PIC.16F.16F1937
Generated by:  Flowcode v7.3.0.7
Date:          Thursday, October 25, 2018 19:11:19
Users:         1
Registered to: Martin
Licence key:   BA48R5
http://www.matrixtsl.com
Launching the compiler...
D:\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=16F1937 "p22_test_4.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
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

.

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

Memory Summary:
    Program space        used   689h (  1673) of  2000h words   ( 20.4%)
    Data space           used   1E3h (   483) of   200h bytes   ( 94.3%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Data stack space     used     0h (     0) of    1Ch bytes   (  0.0%)
    Configuration bits   used     2h (     2) of     2h 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...
D:\Flowcode 7\tools\DoNothing\DoNothing.exe  


FINISHED

Re: unable to compile

Posted: Thu Oct 25, 2018 8:36 pm
by siliconchip
hi martin
thanks for the reply this is the error im getting

cheers bob

Code: Select all

Resistance Meter 3 pic16f887.c:
  1357:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1358:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1359:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1360:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1361:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1362:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1372:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1374:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1376:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1378:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1408:			FCP_SET(FCP_NULL, 1);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1421:		FCP_SET(FCP_NULL, 1);
	                           ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1425:		FCP_SET(FCP_NULL, 0);
	                           ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1431:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1432:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1433:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1434:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1435:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1438:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1440:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1442:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1444:			FCP_SET(FCP_NULL, (FCL_NIBBLE & 0x01));
	                                                     ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1449:				FCP_SET(FCP_NULL, 1);
	                                           ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1457:			FCP_SET(FCP_NULL, 1);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1461:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1505:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1506:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1507:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1508:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1509:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
  1510:			FCP_SET(FCP_NULL, 0);
	                                   ^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
 Resistance Meter 3 pic16f887.c: FCD_04071_LCD__RawSend()
  1357:	FCP_SET_FCP_NULL(0, , , );
	^ (361) function declared implicit int (warning)
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1358:	FCP_SET_FCP_NULL(0, , , );
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1359:	FCP_SET_FCP_NULL(0, , , );
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1360:	FCP_SET_FCP_NULL(0, , , );
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1361:	FCP_SET_FCP_NULL(0, , , );
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1362:	FCP_SET_FCP_NULL(0, , , );
	                    ^ (195) expression syntax
	      (194) ")" expected ^
	 (195) expression syntax ^
  1372:	FCP_SET_FCP_NULL((FCL_NIBBLE & 0x01), , , );
	              (195) expression syntax ^
	                        (194) ")" expected ^
 Resistance Meter 3 pic16f887.c: 1372: too many errors (21)
(908) exit status = 1
(908) exit status = 1
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1

Re: unable to compile

Posted: Thu Oct 25, 2018 8:42 pm
by medelec35
I have added the code block for you as errors take up too much room otherwise.
Can you post the flowchart causing errors.
Also what version of V7 flowcode (Help, About Flowcode)are you running?

Re: unable to compile

Posted: Thu Oct 25, 2018 9:29 pm
by siliconchip
hi martin
my version is 7.3.0.5 and says im up to date ive attached my flowchart

cheers bob

Re: unable to compile

Posted: Thu Oct 25, 2018 10:29 pm
by Benj
Hi Bob,
FCP_SET(FCP_NULL, 0);
^ (171) wrong number of preprocessor macro arguments for "FCP_SET" (2 instead of 5) (warning)
This is most likely caused by an unconnected component pin. Use the Properties window and make sure all the individual components have connected pins. The drop down menu at the top of the properties window can help you to navigate through the components in your project.
Resistance Meter 3 pic16f887.c: FCD_04071_LCD__RawSend()
1357: FCP_SET_FCP_NULL(0, , , );
^ (361) function declared implicit int (warning)
This suggests it's an LCD component.

Also you might want to apply this post 7.3 update.
viewtopic.php?f=63&t=19743

Re: unable to compile

Posted: Fri Oct 26, 2018 7:44 am
by medelec35
Your flowchart compiles for me OK.
You will need to update your version as I have got version 7.3.0.7 (Feb 28 2018) with the files found here.

If you look at the bug fixes you will see for your I2C LCD:
Components
bug: LCD I2C had a property coying bug after latest Remappable I2C changes


If you look at the properties of both your components you will see SCL and SDA are assigned to pins.
Nothing odd about that, but if you then select the background of the 3D panel there is also an additional clock (SCL):
Panel Properties.png
(51.42 KiB) Downloaded 3031 times
What I also find confusing is If you only have one I2C device i.e the LCD then do you also need to add the I2C master?
With it added for SCL SDA there are software connections (I2C LCD) and hardware connections (I2C Master)
Maybe someone can state if I2C is not required?

Re: unable to compile

Posted: Fri Oct 26, 2018 11:56 am
by Benj
Hello,
bug: LCD I2C had a property coying bug after latest Remappable I2C changes
This does sound like the problem, hopefully updating the files will solve the problem.
Nothing odd about that, but if you then select the background of the 3D panel there is also an additional clock (SCL):
This is just one of the component properties that has been exposed, nothing to worry about.
What I also find confusing is If you only have one I2C device i.e the LCD then do you also need to add the I2C master?
With it added for SCL SDA there are software connections (I2C LCD) and hardware connections (I2C Master)
Maybe someone can state if I2C is not required?
The I2C LCD component contains the I2C CAL component inside it that will do all I2C Related comms. No other components are required for this to work.

Re: unable to compile

Posted: Fri Oct 26, 2018 12:14 pm
by siliconchip
hi benj and martin,
ive added the files to my flowcode 7 folder and the program now compiles on the new computer and works in hardware,as for the I2C master component i added i removed this and compiled the program again and still works as intended, so i dont need to add this as you have both mentioned, so now it seems im sorted so far as this project is concerned at the moment lol but a big thank you to both of you for your input and advice without which people like myself would be stuffed once again thanks

ps unused I/O ports should these be made inputs or outputs and tied either high or low :| :|

cheers bob

Re: unable to compile

Posted: Fri Oct 26, 2018 1:07 pm
by Benj
Hi Bob,

Unused I/O are in the input state by default and can be left unconnected.

I know there may be low power issues with doing this on some devices but this is my usual go to.