Go to Post 254 bends CIM shafts every now and then in the drivetrain. I didn't believe it was possible until I saw it myself. - AustinSchuh [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 13-02-2009, 23:05
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Debugger memory offset error

I can deploy code to the CRIO, but I can not debug code to it. When I try to debug, I get tossed an error message saying "WTX Loader Error:Relocation offset too large" It does that even with the default code. I just started today. The only thing I did differently was to modify my project's build properties to match those of all the defualt code properties. Does anyone know what this means?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2010, 00:26
grantf's Avatar
grantf grantf is offline
Software Engineering Mentor
FRC #4061 (SciBorgs)
Team Role: Engineer
 
Join Date: Feb 2007
Rookie Year: 2005
Location: Pullman, WA
Posts: 16
grantf has a spectacular aura aboutgrantf has a spectacular aura about
Re: Debugger memory offset error

I just had this error as well. It turns out that I was trying to debug the wrong project. Bring up the "Debug" dialog by right-clicking on your project in the project explorer and click "Debug Kernel Task." In the "Downloads" tab, make sure that the file that is being transferred is the .out file associated with your project. Make sure that the other settings you specify conform to the instructions in the WPI C/C++ Getting Started Guide in the section titled "Debugging your robot program" (page 11).

Good luck, and please reply if this fixed your problem or not so others can benefit too!
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2010, 13:13
sdlynx's Avatar
sdlynx sdlynx is offline
Registered User
FRC #1111 (Powerhawks)
Team Role: Webmaster
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Edgewater, Maryland
Posts: 13
sdlynx is an unknown quantity at this point
Re: Debugger memory offset error

We've tried everything here but we still have this problem.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2010, 13:52
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Debugger memory offset error

Please see this thread.
I think you have the same problem.

http://www.chiefdelphi.com/forums/sh...threadid=80931
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2010, 14:33
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Debugger memory offset error

This happens to us once in a while. I am not exactly sure what causes it but this is what fixes it for us. First try undeploying the code then reloading it for debug. If this does not fix the problem make sure that the kernal tasks are running and not pending, if they are not running, reset the cRIO and reconnect. Do not try to debug until the Kernel tasks are running and can be seen in the tree view at the lower left. If this still does not fix it try restarting windriver and folowing the same steps.

I hope this helps.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions

Last edited by Mike Copioli : 23-01-2010 at 14:37.
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2010, 15:00
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Debugger memory offset error

Quote:
Originally Posted by Mike Copioli View Post
This happens to us once in a while. I am not exactly sure what causes it but this is what fixes it for us.
The root cause of the problem is that DKMs are dynamically linked at runtime.
Whether the debugger does the load, or the DKM is loaded automatically at boot (I guess that's what's meant by deployed), the .out file is loaded into some area of memory.
After loading, all the unresolved references (to functions and data) in the .out file are linked to the appropriate addresses.
For example, if your DKM makes function calls to printf, and printf wasn't statically linked into your DKM, then all the calls to printf must be relocated.
The dynamic link process knows how to find the unresolved references and how to fix them (relocate them) so they really call printf, which was linked into the vxWorks kernel (most likely).
If the area of memory into which the .out is loaded happens to be sufficiently "far away from" (more than 32 Meg away from) the actual location of the printf function, then you will get the relocation too large error.

My suggestion to all teams using C++ is to always build your DKMs with -mlongcall and avoid all this try this and try that.
As your DKMs get larger and more numerous, the likelihood that you'll cross the 32M distance barrier increases.
And yes, building with -mlongcall will indeed make your DKMs a tad larger and maybe even a tad slower -- but not by enough to warrant concern IMHO.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
Reply


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
Camera offset a lot.... odd Tom Line Programming 6 08-02-2007 19:29
spider foot offset Drew General Forum 8 14-01-2007 02:24
Servo Offset -> Angle conversion bush Programming 11 30-01-2006 13:34
extend offset gondorf General Forum 2 28-01-2006 02:09
c debugger stephenthe1 Programming 16 09-12-2004 14:49


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

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