Problems when compile the program_ Flowcode 4.5

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Dmitry Maximenko
Flowcode V4 User
Posts: 36
Joined: Mon Sep 26, 2011 10:26 pm
Has thanked: 9 times
Been thanked: 2 times
Contact:

Problems when compile the program_ Flowcode 4.5

Post by Dmitry Maximenko »

Hello!
I get the following error when I try to compile.
When I simulate all is fine, but not when I try to compile.
This program will control the PWM according to two ADC signals.
I use Integer for measuring variables so they can be both positive and negative. As I can understand, problem is in my IF statement "If U_res <-20. But it is Integer. It can be negative. So why is the problem here? Is there anyone who could possibly help me with that?
Very grateful for your help!

..........

Flowcode1.c(1570): error: missing right paren
Flowcode1.c(1570): error: error in 'if' expression
Flowcode1.c(1570): error: missing right paren
Flowcode1.c(1570): error: missing semicolon
Flowcode1.c(1570): error: missing right paren
Flowcode1.c(1394): error: failure

failure

Return code = 1



FINISHED
Attachments
Flowcode1.fcf
(14 KiB) Downloaded 244 times

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: Problems when compile the program_ Flowcode 4.5

Post by allpicproject »

Hi Dmitry Maximenko

I try to solve your problem n it's succesful ( compiled without error ).

You must separate the variable with other thing/math ie . A = B + C ... cannot be A = B+C . Also A <= C ... cannot A < = C.

Your problem is typing error.

Zuki.
Attachments
Flowcode1_zuki.fcf
(14 KiB) Downloaded 260 times

Dmitry Maximenko
Flowcode V4 User
Posts: 36
Joined: Mon Sep 26, 2011 10:26 pm
Has thanked: 9 times
Been thanked: 2 times
Contact:

Re: Problems when compile the program_ Flowcode 4.5

Post by Dmitry Maximenko »

HELLO Zuki!
thank you!
Last edited by Dmitry Maximenko on Sat Oct 15, 2011 12:53 pm, edited 1 time in total.

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: Problems when compile the program_ Flowcode 4.5

Post by allpicproject »

You mean the successful hex code ? I attached it below.

The flowchart that successful compiled ( tested ) is in my previous attachment 'Flowcode1_zuki.fcf'.

Zuki.
Attachments
Flowcode1_zuki.hex
(5.22 KiB) Downloaded 222 times

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: Problems when compile the program_ Flowcode 4.5

Post by allpicproject »

Below is the compilation history:

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


Flowcode1_zuki.c
Starting preprocessor: c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\pp.exe Flowcode1_zuki.c -i c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\include -d _PIC16F1827 -la -c2 -o Flowcode1_zuki.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX


.............................................

Flowcode1_zuki.c success

success

Return code = 0

Launching the linker/assembler...
c:\program files\matrix multimedia\flowcode v4\boostc\boostlink_pic.exe -ld "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\lib" libc.pic16.lib flowcode.pic16.lib rand.pic16.lib float.pic16.lib "Flowcode1_zuki.obj" -t PIC16F1827 -d "C:\Users\zuki\AppData\Local\Temp" -p "Flowcode1_zuki"
BoostLink Optimizing Linker Version 7.03
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday


Caution: argument of 'delay_10us' calls must have a value of 1 or more

.

Warning unreferenced functions removed:
FCI_FLOAT_TO_STRING in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_NUMBER_TO_HEX in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_STRING_TO_INT in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_STRING_TO_FLOAT in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
Wdt_Delay_S in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
isinf in: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCD_ADC0_ReadAsByte in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_ADC0_ReadAsVoltage in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_ADC0_ReadAsString in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_PWM0_Disable in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_PWM0_SetDutyCycle in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_PWM0_ChangePeriod in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_Clear in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_PrintASCII in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_Command in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_PrintString in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_ScrollDisplay in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_ClearLine in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_LCDDisplay0_RAM_Write in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_ADC1_ReadAsByte in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_ADC1_ReadAsVoltage in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c
FCD_ADC1_ReadAsString in: C:\Users\zuki\AppData\Local\Temp\Flowcode1_zuki.c

Building CASM file
Memory Usage Report
===================
RAM available:384 bytes, used:61 bytes (15.9%), free:323 bytes (84.1%),
Heap size:304 bytes, Heap max single alloc:95 bytes
ROM available:4096 words, used:956 words (23.4%), free:3140 words (76.6%)



success

Return code = 0

FINISHED

Post Reply