Compiling to HEX problem...

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

Moderators: Benj, Mods

Post Reply
drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

Compiling to HEX problem...

Post by drummermalti »

Hi,

I was developing my first professional system, and it was compiling well, and I would use this hex file to simulate it on Proteus ISIS. This all happened until one time I could not compile the hex file. Could it be that the PIC I am using (as in 16F877A) cannot support the size of the program I am writing?

This is the log:


File name: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
Generated by: Flowcode v3.2.2.40
Date: Monday, November 26, 2007 00:16:39
Licence: Student
Registered to: Chris Schembri Badacchino


NOT FOR COMMERCIAL USE

http://www.matrixmultimedia.com



Launching the compiler...

D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F877A "Room Auto Switch - LCD Macro (inc timer).c"

BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday

Licensed to FlowCode User under Single user Standard License for 1 node(s)
Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only


Room Auto Switch - LCD Macro (inc timer).c
Starting preprocessor: "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c" -i "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC16F877A -la -c2 -o "Room Auto Switch - LCD Macro (inc timer).pp" -v -d _BOOSTC -d _PIC16


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

Room Auto Switch - LCD Macro (inc timer).c success

success

Return code = 0

Launching the linker/assembler...

D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostlink.pic.exe -ld "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "Room Auto Switch - LCD Macro (inc timer).obj" -t PIC16F877A -d "E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro" -p "Room Auto Switch - LCD Macro (inc timer)"

BoostLink Optimizing Linker Version 6.70
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday


Warning: Recursion may cause call stack overflow in function:'FCM_Manual_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Cancel_to_Menu'
Warning: Recursion may cause call stack overflow in function:'FCM_Menu_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Minutes'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Hours'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Days'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode2'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode1'

..........

Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_Command in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_RawSend in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_PrintString in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
LCD_590512_Dummy_Function in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c

Warning: function never returns: 'FCM_Timer_Mode_Followup'
Warning: function never returns: 'FCM_Timer_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Seconds'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Minutes'
Warning: function never returns: 'FCM_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Hours'
Warning: function never returns: 'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_in_Sensor_Mode'
Warning: function never returns: 'FCM_Menu_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Days'
Warning: function never returns: 'FCM_Pre_Timer_Mode2'
Warning: function never returns: 'FCM_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode1'
Warning: function never returns: 'FCM_Pre_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_Mode'
Warning: function never returns: 'FCM_Menu'
Warning: function never returns: 'FCM_Manual_Mode'
Too much code to fit in ROM, overfilled by:386 locations.


failure

Return code = -2

Flowcode was unable to assemble the ASM file due to the following errors:


FINISHED



Thanks!

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

Update on Issue

Post by drummermalti »

I have deleted a small chunk of the program, and I re-tried compiling...
The message log is now:



File name: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c
Generated by: Flowcode v3.2.2.40
Date: Monday, November 26, 2007 08:47:12
Licence: Student
Registered to: Chris Schembri Badacchino


NOT FOR COMMERCIAL USE

http://www.matrixmultimedia.com



Launching the compiler...

D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F877A "Room Auto Switch - LCD Macro (inc timer) - Reduced.c"

BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday

Licensed to FlowCode User under Single user Standard License for 1 node(s)
Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only


Room Auto Switch - LCD Macro (inc timer) - Reduced.c
Starting preprocessor: "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c" -i "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC16F877A -la -c2 -o "Room Auto Switch - LCD Macro (inc timer) - Reduced.pp" -v -d _BOOSTC -d _PIC16


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

Room Auto Switch - LCD Macro (inc timer) - Reduced.c success

success

Return code = 0

Launching the linker/assembler...

D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostlink.pic.exe -ld "D:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "Room Auto Switch - LCD Macro (inc timer) - Reduced.obj" -t PIC16F877A -d "E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro" -p "Room Auto Switch - LCD Macro (inc timer) - Reduced"

BoostLink Optimizing Linker Version 6.70
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday


Warning: Recursion may cause call stack overflow in function:'FCM_Manual_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Cancel_to_Menu'
Warning: Recursion may cause call stack overflow in function:'FCM_Menu_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Minutes'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Hours'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Days'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode2'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode1'

.........

Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c
FCD_LCDDisplay0_Command in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c
FCD_LCDDisplay0_RawSend in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c
FCD_LCDDisplay0_PrintString in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c
LCD_853242_Dummy_Function in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer) - Reduced.c

Warning: function never returns: 'FCM_Timer_Mode_Followup'
Warning: function never returns: 'FCM_Timer_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Seconds'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Minutes'
Warning: function never returns: 'FCM_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Hours'
Warning: function never returns: 'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_in_Sensor_Mode'
Warning: function never returns: 'FCM_Menu_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Days'
Warning: function never returns: 'FCM_Pre_Timer_Mode2'
Warning: function never returns: 'FCM_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode1'
Warning: function never returns: 'FCM_Pre_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_Mode'
Warning: function never returns: 'FCM_Menu'
Warning: function never returns: 'FCM_Manual_Mode'
Too much code to fit in ROM, overfilled by:259 locations.


failure

Return code = -2

Flowcode was unable to assemble the ASM file due to the following errors:


FINISHED




There are some parts of the message which are now different to the one above it. What now?

Thanks

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

I think I found the problem...

Post by drummermalti »

i found this thread:

http://matrixmultimedia.com/mmforums/vi ... piling+hex

which told me to follow up to:


http://www.matrixmultimedia.com/support ... .php?t=456

I will try it out and let you know.

Thanks

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

Tried it out...

Post by drummermalti »

I tried inserting the register, and compiled the flkowcode for three times... I still can't compile.

This is the message (the part mentioning warnings etc only):


Warning: Recursion may cause call stack overflow in function:'FCM_Manual_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Cancel_to_Menu'
Warning: Recursion may cause call stack overflow in function:'FCM_Menu_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Minutes'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Hours'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode3_Days'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode2'
Warning: Recursion may cause call stack overflow in function:'FCM_Pre_Timer_Mode1'

.........

Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_Command in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_RawSend in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
FCD_LCDDisplay0_PrintString in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c
LCD_656536_Dummy_Function in: E:\school\University\3rd year\Pule\Room Auto Switch - LCD Macro\Room Auto Switch - LCD Macro (inc timer).c

Warning: function never returns: 'FCM_Timer_Mode_Followup'
Warning: function never returns: 'FCM_Timer_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Seconds'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Minutes'
Warning: function never returns: 'FCM_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Hours'
Warning: function never returns: 'FCM_Pre_Pre_Sensor_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_in_Sensor_Mode'
Warning: function never returns: 'FCM_Menu_in_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode3_Days'
Warning: function never returns: 'FCM_Pre_Timer_Mode2'
Warning: function never returns: 'FCM_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Timer_Mode1'
Warning: function never returns: 'FCM_Pre_Sensor_Mode'
Warning: function never returns: 'FCM_Pre_Manual_Mode'
Warning: function never returns: 'FCM_Menu'
Warning: function never returns: 'FCM_Manual_Mode'
Too much code to fit in ROM, overfilled by:386 locations.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

You are correct - the program is not compiling because the program is too big.

You are using the "student/home" version of Flowcode, which limits the amount of ROM (program memory) space to 4k - the device you are using actually has 8k available.

You have 2 solutions:

1) Cut down the program so that it fits into 4k
2) Upgrade your licence of Flowcode to the "professional" version, which will allow all 8k

The other post you mentioned does not apply to you because that user was already using the professional version.

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

Post by drummermalti »

steve wrote:You have 2 solutions:

1) Cut down the program so that it fits into 4k
2) Upgrade your licence of Flowcode to the "professional" version, which will allow all 8k

The other post you mentioned does not apply to you because that user was already using the professional version.
Is there a way of finding out how big th eprogram is, so that I may calculate how much to cut down?
How much would an upgrade cost?

Thanks

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

The error message at the end of the compiler messages tells how much the program has exceeded the available space:
Too much code to fit in ROM, overfilled by:386 locations.
An upgrade is basically the cost between the two versions (student = Β£39 and pro = Β£99, so you would need to pay Β£60, plus VAT - which is Β£70.50).

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

oh god...

Post by drummermalti »

I installed the registry patch from:

http://www.matrixmultimedia.com/support ... .php?t=456

Could this affect Flowcode bad? Maybe limiting anything else?

Thanks

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

No - that patch should not affect your version of Flowcode.

drummermalti
Posts: 7
Joined: Fri Oct 19, 2007 6:24 pm

Thanks!

Post by drummermalti »

Ok thanks! Great software and great help!

Post Reply