• AVR Freaks

Helpful ReplyHot!warning on Hitech compiler

Author
AMPS
Super Member
  • Total Posts : 530
  • Reward points : 0
  • Status: offline
2020/02/25 01:12:31 (permalink)
0

warning on Hitech compiler

possible hardware stack overflow detected, estimated stack depth: 9

 
I am getting above error while compiling project.can someone guide me what i need to eliminate this warning

Amps
*.*.*.*.*.*.*.*.*.*.*.*.*
#1
ric
Super Member
  • Total Posts : 27071
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 01:47:40 (permalink) ☄ Helpfulby Jim Nickerson 2020/02/25 07:20:03
+5 (5)
It means what it says. Your code is going too many levels down.
At a guess, you're calling functions from functions from inside an ISR.
 
As usual, we can only guess if you DON'T SHOW THE CODE.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
Mysil
Super Member
  • Total Posts : 3670
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 02:02:08 (permalink)
+2 (2)
Hi,
You may try to tidy up in functions calling functions, calling functions ...
 
Old PIC microcontrollers have small hardware stack for function call return address.
newer PIC16 devices have more stack levels.
 
Read about 'Hardware Stack' in datasheet.
 
    Mysil
#3
1and0
Access is Denied
  • Total Posts : 10783
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 08:13:39 (permalink)
+3 (3)
ric
At a guess, you're calling functions from functions from inside an ISR.

Sound like MCC ... ;)
 
#4
NKurzman
A Guy on the Net
  • Total Posts : 18678
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 08:47:23 (permalink)
+3 (3)
Your unnamed chip has an 8 level Hardware stack.  The compiler has detected a total of 9 calls in the main code Plus the Interrupt.  Note for some chips you will need to reserve one level for debugging (if you plan to use a debugger)
#5
1and0
Access is Denied
  • Total Posts : 10783
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 09:58:55 (permalink)
+1 (1)
NKurzman
Your unnamed chip has an 8 level Hardware stack. 

As I recall, OP uses the ancient PIC16F886 which has 8 stack levels.
#6
NKurzman
A Guy on the Net
  • Total Posts : 18678
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 10:28:21 (permalink)
+2 (2)
1and0
NKurzman
Your unnamed chip has an 8 level Hardware stack. 

As I recall, OP uses the ancient PIC16F886 which has 8 stack levels.


All the PIC16s from back then did. The 877, 877a, 690, ect.
That was my Passive Aggressive way of saying Always indicate what chip you are talking about in the future.
In this case it did not affect the answer.
#7
ric
Super Member
  • Total Posts : 27071
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 14:44:44 (permalink)
+3 (3)
NKurzman
...
That was my Passive Aggressive way of saying Always indicate what chip you are talking about in the future.

Give him a chance to learn how to use a forum.
He's only been posting here since Oct 2018... ;)
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#8
PStechPaul
Super Member
  • Total Posts : 2675
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: warning on Hitech compiler 2020/02/25 16:47:16 (permalink)
0
Maybe Captain [Uncon]vincible will reappear and offer his esteemed guidance... :)

 
#9
Jump to:
© 2020 APG vNext Commercial Version 4.5