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

Forum for problems or queries regarding the Flowcode application and compiler usage.

Moderators: Benj, Mods

Post Reply
User avatar
leonet99
Posts: 8
Joined: Fri Apr 10, 2009 1:30 am
Contact:

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

Post 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.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

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

Post by kersing »

The discussion at http://www.matrixmultimedia.com/mmforum ... =21&t=6356 probably answers your question.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
leonet99
Posts: 8
Joined: Fri Apr 10, 2009 1:30 am
Contact:

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

Post by leonet99 »

Thank you Kersing.
That was it; I had too many nested subroutine calls.
It works fine now.

Post Reply