Not displaying reasons for compile failure
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Not displaying reasons for compile failure
When I compile to hex there is unable to compile and –2 warning.
On three different PC’s the reason for error was not shown.
Two of the PC’s has Vista, and one has XP windows.
On three different PC’s the reason for error was not shown.
Two of the PC’s has Vista, and one has XP windows.
- Attachments
-
- V4_alarm4_16f872.fcf
- (140.43 KiB) Downloaded 265 times
Martin
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Not displaying reasons for compile failure
There is a known (and annoying) bug in the current v4 release that means if the amount of text emitted by the compiler is too large, the text is not transferred to the "compiler messages" screen. This has been fixed, but the fix is not publically available yet.
Here is the error list from your program:
As you can see, there seems to be a real problem fitting all of the variables into RAM. If you use an alternative PICmicro (e.g. 16F876A), then the file compiles fine.
But there is another potential error - your interrupt routine calls LCD macros. This is a real no-no. I think there are quite a few discussions on the forum about interrupts (there is also an article I think). Basically, the golden rule about interrupts is to keep them as brief as possible (i.e. no delay routines or macro calls) and do any major processing in the main "thread" of your program.
Here is the error list from your program:
Code: Select all
File name: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
Generated by: Flowcode v4.2.2.57
Date: Monday, October 05, 2009 11:07:00
Licence: Extra
Registered to: Steve Tandy Test
NOT FOR COMMERCIAL USE
http://www.matrixmultimedia.com
Launching the compiler...
D:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F872 "V4_alarm4_16f872.c"
BoostC Optimizing C Compiler Version 6.95 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 David Hobday
Licensed to FlowCode User under Single user Full License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only
V4_alarm4_16f872.c
Starting preprocessor: D:\PROGRA~1\MATRIX~1\FLCD2C~1\BoostC\pp.exe "C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c" -i D:\PROGRA~1\MATRIX~1\FLCD2C~1\BoostC\include -d _PIC16F872 -la -c2 -o "C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.pp" -v -d _BOOSTC -d _PIC16
...............................................................................................
V4_alarm4_16f872.c success
success
Return code = 0
Launching the linker/assembler...
D:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\boostlink.pic.exe -ld "D:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\lib" libc.pic16.lib flowcode.pic16.lib rand.pic16.lib float.pic16.lib "V4_alarm4_16f872.obj" -t PIC16F872 -d "C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta" -p "V4_alarm4_16f872"
BoostLink Optimizing Linker Version 6.95
http://www.sourceboost.com
Copyright(C) 2004-2009 Pavel Baranov
Copyright(C) 2004-2009 David Hobday
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units
Caution: argument of 'delay_10us' calls must have a value of 1 or more
Warning unreferenced functions removed:
FCI_FLOAT_TO_STRING in: D:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_NUMBER_TO_HEX in: D:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_STRING_TO_FLOAT in: D:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
Wdt_Delay_S in: D:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
isinf in: D:\Program Files\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCD_LCDDisplay0_PrintASCII in: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
FCD_LCDDisplay0_Command in: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
FCD_LCDDisplay0_ScrollDisplay in: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
FCD_LCDDisplay0_ClearLine in: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
FCD_LCDDisplay0_RAM_Write in: C:\Documents and Settings\steve\My Documents\FlowCode Programs\v4 beta\V4_alarm4_16f872.c
Memory Usage Report
===================
Error: No remaining RAM block (on target) big enough for:
'a' size:2 bytes
'b' size:2 bytes
'$ret' size:2 bytes
'r' size:2 bytes
'i' size:1 bytes
'$ret' size:1 bytes
'endOffset' size:1 bytes
'ptr' size:2 bytes
't' size:1 bytes
'size' size:1 bytes
'CompTempVar498' size:1 bytes
'ptr1' size:2 bytes
't1' size:1 bytes
't1' size:1 bytes
'endOffset' size:1 bytes
'ptr' size:2 bytes
't' size:1 bytes
'CompTempVar502' size:1 bytes
'CompTempVar503' size:1 bytes
'CompTempVar504' size:1 bytes
'CompTempVar506' size:1 bytes
'i' size:1 bytes
'delay' size:2 bytes
'i' size:2 bytes
'CompTempVar2178' size:1 bytes
'CompTempVar2265' size:17 bytes
'CompTempVar2267' size:14 bytes
'in' size:1 bytes
'mask' size:1 bytes
'pt' size:1 bytes
'x' size:1 bytes
'y' size:1 bytes
'Number' size:2 bytes
'tmp_int' size:2 bytes
'tmp_byte' size:1 bytes
'CompTempVar2269' size:1 bytes
'CompTempVar2272' size:1 bytes
'CompTempVar2275' size:1 bytes
'CompTempVar2276' size:1 bytes
'CompTempVar2279' size:1 bytes
'CompTempVar2280' size:1 bytes
'CompTempVar2281' size:1 bytes
'CompTempVar2284' size:1 bytes
'CompTempVar2285' size:1 bytes
'CompTempVar2286' size:1 bytes
'String' size:2 bytes
'MSZ_String' size:1 bytes
'idx' size:1 bytes
'del' size:1 bytes
'del' size:1 bytes
RAM available:128 bytes, used:184 bytes (143.7%), free:-56 bytes (-43.7%),
Heap size:0 bytes, Heap max single alloc:0 bytes
ROM available:2048 words, used:0 words (0.0%), free:2048 words (100.0%)
failure
Return code = -2
Flowcode was unable to assemble the ASM file due to the following errors:
FINISHED
But there is another potential error - your interrupt routine calls LCD macros. This is a real no-no. I think there are quite a few discussions on the forum about interrupts (there is also an article I think). Basically, the golden rule about interrupts is to keep them as brief as possible (i.e. no delay routines or macro calls) and do any major processing in the main "thread" of your program.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
Thanks Steve.
Now I have seen the listing giving the problem areas, I can sort program out.
I will also change macros.
Looking at this logically, the problem is caused by running out of RAM. Since that has caused too many errors to be displayed, wouldn’t it be better just to report not enough RAM as a priority, then if that is only reason for failure, then all messages regarding that will not be displayed?
Also, I wanted to lookup meaning of error -2. Could not find information on help files. Can you post a link regarding compiling error codes please.
PS
Steve I have noticed your compile message shows:
Should you be using it at work?
Now I have seen the listing giving the problem areas, I can sort program out.
I will also change macros.
Looking at this logically, the problem is caused by running out of RAM. Since that has caused too many errors to be displayed, wouldn’t it be better just to report not enough RAM as a priority, then if that is only reason for failure, then all messages regarding that will not be displayed?
Also, I wanted to lookup meaning of error -2. Could not find information on help files. Can you post a link regarding compiling error codes please.
PS
Steve I have noticed your compile message shows:
Code: Select all
Registered to: Steve Tandy Test
NOT FOR COMMERCIAL USE
Martin
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Not displaying reasons for compile failure
Flowcode does not necessarily know what the compiler/linker messages mean, so all it can do is present them exactly as the compiler/linker shows them. Theoretically, Flowcode can work with any compiler. In fact, the new v4.2 version has been changed so it can also work with the Hitech compiler without modification to the component code.
The "-2" return code comes from the linker. I do not know what this means - perhaps it is listed in the BoostC manual?
Regarding the "not for commercial use" message... Shhh. Don't tell anyone!
The "-2" return code comes from the linker. I do not know what this means - perhaps it is listed in the BoostC manual?
Regarding the "not for commercial use" message... Shhh. Don't tell anyone!
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
steve wrote:Regarding the "not for commercial use" message... Shhh. Don't tell anyone!
I had a look for error 2 in boost C manual prior to posting , but could not found want I was looking for
Thanks anyway.
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
Ihave just tried to compile the most basic flowchart.
That also does not display errors. Surly it can't be due to low on memory since only problem is deliberately misspelled osccon in a C box.
I thought that bug was solved?
When I did same test on previous version of flowcde some time ago, the misspelled word and line was displayed OK.
Would you mind sending a fix for that please. It would not be practical emilaing a flowchart duing development, when it does not compile.
That also does not display errors. Surly it can't be due to low on memory since only problem is deliberately misspelled osccon in a C box.
I thought that bug was solved?
When I did same test on previous version of flowcde some time ago, the misspelled word and line was displayed OK.
Would you mind sending a fix for that please. It would not be practical emilaing a flowchart duing development, when it does not compile.
- Attachments
-
- test.fcf
- (3 KiB) Downloaded 248 times
Martin
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- Contact:
Re: Not displaying reasons for compile failure
Hello medelec35
in my compiling window i show >> schreenshot
so i have a look in the datasheet ;there is not a oscon reg but a osccon!
Flowcode v4... give my many question`s... e.g why jou dont have the same compiling-window with the thame v4.1 ?
so i wait for v4.2
Regards Wolfgang
in my compiling window i show >> schreenshot
so i have a look in the datasheet ;there is not a oscon reg but a osccon!
Flowcode v4... give my many question`s... e.g why jou dont have the same compiling-window with the thame v4.1 ?
so i wait for v4.2
Regards Wolfgang
- Attachments
-
- o.k..gif
- (63.74 KiB) Downloaded 2240 times
-
- compil-window-error.gif
- (59.09 KiB) Downloaded 2240 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
saschech@gmx.de, The osccon in the flowcode was deliberate spelt wrong to demonstrate that flowcode was not displaying any errors, on the PC I was using
So there still is a bug there!
However on a different PC, (the one I originally tested a similar misspelled word on) errors are displayed OK (well 98% of the time).medelec35 wrote: since only problem is deliberately misspelled osccon in a C box.
So there still is a bug there!
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
If you are referring to background shades, The darker shade is on a PC with windows XP, and the white background is on a PC with windows Vista.saschech@gmx.de wrote:why jou dont have the same compiling-window with the thame v4.1 ?
If that's not what you was referring to, can you rephrase question please.
Martin
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Not displaying reasons for compile failure
This is a known bug that only affects some installations of Windows. It has been fixed and will be available in the soon-to-be-released v4.2.There is a known (and annoying) bug in the current v4 release that means if the amount of text emitted by the compiler is too large, the text is not transferred to the "compiler messages" screen. This has been fixed, but the fix is not publically available yet.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Not displaying reasons for compile failure
Steve.steve wrote:There is a known (and annoying) bug in the current v4 release that means if the amount of text emitted by the compiler is too large, the text is not transferred to the "compiler messages" screen. This has been fixed, but the fix is not publically available yet.
I understand that if too many errors reported then text is not transferred to the "compiler messages" screen.
But a Flowcode with just a total of one icon, with a total of one error also does not get transferred to the "compiler messages" screen. So in effect any errors whether very few or not, will sill fall under the same bug.
That’s why I posted the second short Flowcode, to prove that theory.
Martin