|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||||
|
||||||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Re: MPLAB SIM : Stack Overflow Error
Could be the new code - we are basing our code off Kevin's gyro code.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |