Go to Post What's so bad about Matt? I mean, if the guy can explain PID so that even I can understand it, he can't be all that bad... - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2008, 08:38
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: MPLAB SIM : Stack Overflow Error

The stack is used in C whenever a function is called. The compiler can use it for passing parameters, storing the address at which execution will resume when the function returns, and temporary storage for local variables (those declared within a function). The stack is a limited resource. Stack overflow can occur if your function call depth is too great. Function A calls B, B calls C, C calls ...., you get the idea. At some point you will run out of stack space.
A recursive function (one which calls itself) can generate a stack overflow if it has an error which causes an infinite loop or simply is called recursively so many times that all space is used (as described above).

Post some code if you would like further analysis.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
  #2   Spotlight this post!  
Unread 30-01-2008, 09:46
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,586
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: MPLAB SIM : Stack Overflow Error

The 2004 Programming Reference Guide addresses how to get the simulator running. You can download it from this page: http://ifirobotics.com/rc.shtml

I don't know if the simulator works with Kevin's new code, but it does with the IFI code when you follow those instructions.
  #3   Spotlight this post!  
Unread 30-01-2008, 10:38
ayeckley's Avatar
ayeckley ayeckley is offline
Registered User
AKA: Alex Yeckley
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Sandusky, OH
Posts: 268
ayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond repute
Re: MPLAB SIM : Stack Overflow Error

In my recent experience, MPLAB SIM is not compatible with Kevin's new library. It seems to get hung up waiting for an interrupt during the FRC initialization which never occurs (a timer interrupt, perhaps?). The result is a stack overflow before any of the user code is executed. Stepping over it doesn't seem to have any net-positive effect. At this point, even if it were working it's a bit too late in the game to be useful. We wound up using our 2007 bot as a testbed instead.
__________________

  #4   Spotlight this post!  
Unread 30-01-2008, 16:46
govvijay govvijay is offline
Registered User
FRC #0540
 
Join Date: Jan 2008
Location: VA
Posts: 5
govvijay is an unknown quantity at this point
Re: MPLAB SIM : Stack Overflow Error

Could be the new code - we are basing our code off Kevin's gyro code.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using MPLAB SIM koenig3456 Programming 5 11-02-2008 14:39
stupid Array error: Error [1300] stack frame too l Validius Programming 7 27-01-2006 10:53
MPLAB SIM debugger Questions Chris_Elston Programming 2 16-01-2005 11:28
MPlab error ryan_f Programming 9 24-05-2004 07:30
using the MPLAB IDE MPLAB SIM simulator WizardOfAz Programming 1 03-11-2003 01:24


All times are GMT -5. The time now is 19:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi