Page 1 of 1

"Call stack usage exceeds: #" in Flowcode 3 PRO

Posted: Fri May 01, 2009 5:20 am
by leonet99
I am new to Flowcode and fairly new to programming embedded.
After putting together a pretty good size (I think, because I have a good number of macros) code for PIC 16F877A,
at some point I started getting this error when compiling to hex and about at the same time the code started behaving in the application (locking up, freezing or calling the wrong subroutine), although it simulates just fine in flowcode.
I am wondering if this is a stack overflow issue.

Can anyone please explain the following warnings when compiling to hex?
Here's what I am getting:
....................................................................
Launching the compiler...

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

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 Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
..................................

success
Return code = 0

Launching the linker/assembler...
.............................

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


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

Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines...
FCD_LCDDisplay0_Command...
FCD_LCDDisplay0_RawSend...
FCD_ADC0_ReadAsByte...
LCD_6686334_Dummy_Function...

Building CASM file
Serious Warning: Call stack usage exceeds:8!

Call Stack Usage Report
=======================
main and Task(s): hw used:9, exceeded by:0
interrupt: hw used:1, exceeded by:0

Memory Usage Report
===================
RAM available:368 bytes, used:155 bytes (42.2%), free:213 bytes (57.8%),
Heap size:211 bytes, Heap max single alloc:95 bytes
ROM available:8192 words, used:3854 words (47.1%), free:4338 words (52.9%)

success
Return code = 0
FINISHED


Thanks.

Re: "Call stack usage exceeds: #" in Flowcode 3 PRO

Posted: Fri May 01, 2009 8:06 am
by kersing
The discussion at http://www.matrixmultimedia.com/mmforum ... =21&t=6356 probably answers your question.

Re: "Call stack usage exceeds: #" in Flowcode 3 PRO

Posted: Mon May 04, 2009 1:27 am
by leonet99
Thank you Kersing.
That was it; I had too many nested subroutine calls.
It works fine now.