Go to Post Finally I wish everyone here on ChiefDelphi good luck and more importantly a fun build season. - mechanicalbrain [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 23-03-2006, 09:05
koenig3456 koenig3456 is offline
Programming Coach
None #0681 (EARTH Squad)
Team Role: Coach
 
Join Date: Jan 2006
Location: Pennsylvania
Posts: 16
koenig3456 is an unknown quantity at this point
Question Using MPLAB SIM

I tried using the MPLAB SIM debugger to debug a program that uses WPILib. I get a Stack over flow error before the main() function is reached. Is there any way to use the MPLAB SIM debugger to debug a program that uses WPILib?
  #2   Spotlight this post!  
Unread 23-03-2006, 10:27
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Using MPLAB SIM

Quote:
Originally Posted by koenig3456
I tried using the MPLAB SIM debugger to debug a program that uses WPILib. I get a Stack over flow error before the main() function is reached. Is there any way to use the MPLAB SIM debugger to debug a program that uses WPILib?
I don't know about WPILib, but the stack overflow error is the same that I get when I accidentally run a program compiled without the _SIMULATOR symbol defined. Set it on the MPLAB C18 tab of your project's "Build Options" dialog.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #3   Spotlight this post!  
Unread 11-05-2006, 13:57
b0b0b0b b0b0b0b is offline
Registered User
no team
 
Join Date: May 2006
Location: Sunnyvale
Posts: 1
b0b0b0b is an unknown quantity at this point
Re: Using MPLAB SIM

Thanks, this solved my problem.
  #4   Spotlight this post!  
Unread 23-01-2008, 22:33
sfs sfs is offline
Registered User
AKA: Steve Siirila
FRC #2220 (Blue Twilight)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Eagan, MN
Posts: 18
sfs is an unknown quantity at this point
Re: Using MPLAB SIM

Quote:
Originally Posted by b0b0b0b View Post
Thanks, this solved my problem.
I am getting the exact same error, even when the _SIMULATOR macro is defined in the MPLAB C18 tab. Is anyone able to use MPLAB SIM with the most recent WPILib (WPILib2k6.lib) on the FRC? I get this error message when trying:

CORE-E0001: Stack overflow error occurred from instruction at 0x0030b2
  #5   Spotlight this post!  
Unread 10-02-2008, 16:40
robofan robofan is offline
Registered User
FRC #0540
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Virginia
Posts: 2
robofan is an unknown quantity at this point
Re: Using MPLAB SIM

I solved stack overflow issue by adding the following code to ifi_frc.h:

#ifdef _SIMULATOR
#define RESET_VECTOR 0x000
#define HIGH_INT_VECTOR 0x008
#define LOW_INT_VECTOR 0x018
#else
#define RESET_VECTOR 0x800
#define HIGH_INT_VECTOR 0x808
#define LOW_INT_VECTOR 0x818
#endif

Also, you need to remove or comment out the following lines in ifi_frc.h:

//#define RESET_VECTOR 0x800
//#define HIGH_INT_VECTOR 0x808
//#define LOW_INT_VECTOR 0x818
  #6   Spotlight this post!  
Unread 11-02-2008, 14:39
sfs sfs is offline
Registered User
AKA: Steve Siirila
FRC #2220 (Blue Twilight)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Eagan, MN
Posts: 18
sfs is an unknown quantity at this point
Re: Using MPLAB SIM

Quote:
Originally Posted by robofan View Post
I solved stack overflow issue by adding the following code to ifi_frc.h:

#ifdef _SIMULATOR
#define RESET_VECTOR 0x000
#define HIGH_INT_VECTOR 0x008
#define LOW_INT_VECTOR 0x018
#else
#define RESET_VECTOR 0x800
#define HIGH_INT_VECTOR 0x808
#define LOW_INT_VECTOR 0x818
#endif

Also, you need to remove or comment out the following lines in ifi_frc.h:

//#define RESET_VECTOR 0x800
//#define HIGH_INT_VECTOR 0x808
//#define LOW_INT_VECTOR 0x818
That might work if you are using Kevin Watson's ifi_frc base code, but what about those using WPILib where no source code is available?
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
MPLAB SIM debugger Questions Chris_Elston Programming 2 16-01-2005 11:28
MPLAB Variable Simulator? Chris_Elston Programming 3 18-02-2004 12:08
using the MPLAB IDE MPLAB SIM simulator WizardOfAz Programming 1 03-11-2003 01:24


All times are GMT -5. The time now is 03:20.

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