Go to Post "Dress to impress," typically, means no denim (sorry, Dean)... - Madison [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: 6 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 27-01-2010, 17:10
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: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by jhersh View Post
Just to be clear, you are referring to the "FRC Default Program" (as listed in the examples) aka "BuiltinDefaultCode" (as listed in the Project Explorer)? I double checked this project and it definitely includes the -mlongcall option.
Can you speculate what update we might be missing that would cause us not to have it?
I actually did a dump of the relocation data from the elf file after building it and there were a bunch of RELOC_24 in it.
After I added -mlongcall and rebuilt, they were gone -- replaced by pairs of RELOC_16 as you would expect.
The only thing I'm not 100% certain is what sample project I used.
I'll have to check my 'robotics' computer when I get a chance and see which sample it was.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)
Reply With Quote
  #17   Spotlight this post!  
Unread 27-01-2010, 17:51
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

The example I used was Iterative Robot Demo Main Program. We just performed the magic -mlongcall chant and did the appropriate ritual and the robot now functions as expected.

We are trying to figure out why our encoders themselves don't give us data, but we're just starting that. We are checking our wiring first again, and checking the forums, and then checking the code that's already posted above. The good news is that the Compressor code performed flawlessly after we got the Reallocation error gone.

Thanks, and any suggestions on encoders would be appreciated though I may start a new post for that after we give it a good effort tonight.
Reply With Quote
  #18   Spotlight this post!  
Unread 27-01-2010, 18:01
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by gvarndell View Post
Can you speculate what update we might be missing that would cause us not to have it?
...
The only thing I'm not 100% certain is what sample project I used.
I'll have to check my 'robotics' computer when I get a chance and see which sample it was.
Really the only thing I can think of off hand would be if either one of the projects doesn't have that option set by default and that's that you started with... or that you created the project from scratch. That option should have been set in all examples since last year.
Reply With Quote
  #19   Spotlight this post!  
Unread 27-01-2010, 18:11
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by sircedric4 View Post
The example I used was Iterative Robot Demo Main Program. We just performed the magic -mlongcall chant and did the appropriate ritual and the robot now functions as expected.
I don't even see that one. Perhaps that's the problem. If there are really old examples left laying around since last year, it's possible the example had a bug in the project from back then.

This is the list of projects that I see in source control today:

2010ImageDemo
BuiltinDefaultCode
CameraDemo
CSimpleTemplate
DashboardDataExample
DefaultRobot
DriverStationLCDText
GyroSample
SimpleTemplate
SimpleTracker
TwoColorTrackDemo

Anything you have in addition to these is probably very obsolete.

If I had a recommendation, it would be to remove all of the projects in the C:\WindRiver\workspace\WorkbenchUpdate\vxworks-6.3\target\src\demo directory and then install the C++ update.

Quote:
Originally Posted by sircedric4 View Post
We are trying to figure out why our encoders themselves don't give us data, but we're just starting that. We are checking our wiring first again, and checking the forums, and then checking the code that's already posted above. The good news is that the Compressor code performed flawlessly after we got the Reallocation error gone.
Glad it worked for you. As for encoders... first things first make sure that, as the wheel spins, both lines change by adding a Get() on each of the two DigitalInput objects. Then pass those DigitalImput objects into the Encoder constructor.
Reply With Quote
  #20   Spotlight this post!  
Unread 27-01-2010, 20:01
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by jhersh View Post
I don't even see that one. Perhaps that's the problem. If there are really old examples left laying around since last year, it's possible the example had a bug in the project from back then.

This is the list of projects that I see in source control today:

2010ImageDemo
BuiltinDefaultCode
CameraDemo
CSimpleTemplate
DashboardDataExample
DefaultRobot
DriverStationLCDText
GyroSample
SimpleTemplate
SimpleTracker
TwoColorTrackDemo

Anything you have in addition to these is probably very obsolete.

If I had a recommendation, it would be to remove all of the projects in the C:\WindRiver\workspace\WorkbenchUpdate\vxworks-6.3\target\src\demo directory and then install the C++ update.



Glad it worked for you. As for encoders... first things first make sure that, as the wheel spins, both lines change by adding a Get() on each of the two DigitalInput objects. Then pass those DigitalImput objects into the Encoder constructor.
It turns out its extremely helpful if you actually tell the encoders to Start() in your code. :-) Like I said we hadn't gone through the code yet and seen what our errors might be. Once we dug into the encoder header it became pretty obvious what to do. They give us numbers now when we call the Get() method. In the WPI User's manual they don't mention anything beyond setting them up. I guess they leave the using them up to the user. Not sure what we'll do with them yet but having the number there to deal with was the important bit right now.

As for the code, I moved my entire last years Windriver directory over to a new directory named Windriver 2009 when I installed the new Windriver for this year. I wouldn't have expected it to add sample projects across directories like that. I know my project is up to date, but I will check it out tomorrow. I had a problem with my updater not installing correctly and had to move the files from it by hand after extracting the data manually, is it possible that a correctly running updater deletes projects that are installed by Windriver by default and since all I did was add due to installer error that it left the IterativeRobot Demo I was using?

I would like to thank everyone for all their help. Tonight was a good night, one that we needed as we were getting quite distressed.
Reply With Quote
  #21   Spotlight this post!  
Unread 01-02-2010, 22:39
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Compressor Code causes No Robot Code Error

jhersh, We are getting this same relocation error, but only when the code has been deployed; we are able to debug the code without an apparent issues. Does this make any sense to you? Is there more than one place where this needs to be set (ie. are there separate settings used for the build or dynamic linking when it is debugged vs. when it is downloaded)?
Reply With Quote
  #22   Spotlight this post!  
Unread 02-02-2010, 00:21
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by MamaSpoldi View Post
jhersh, We are getting this same relocation error, but only when the code has been deployed; we are able to debug the code without an apparent issues. Does this make any sense to you? Is there more than one place where this needs to be set (ie. are there separate settings used for the build or dynamic linking when it is debugged vs. when it is downloaded)?
Are you maybe deploying the NonDebug version of your application?
Reply With Quote
  #23   Spotlight this post!  
Unread 02-02-2010, 10:15
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Compressor Code causes No Robot Code Error

I believe that we are deploying the debug version of the code... the path to the .out file is in the debug subdirectory under the project directory.

Is it likely that the dynamic linking is handled differently on the cRIO during debug vs. when the code is deployed?

Regardless, I plan to try this build option tonight and I will let you know how it works out.

Thanks for your help.
Reply With Quote
  #24   Spotlight this post!  
Unread 02-02-2010, 15:15
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by MamaSpoldi View Post
I believe that we are deploying the debug version of the code... the path to the .out file is in the debug subdirectory under the project directory.
That would be the same debug build, then.

Quote:
Originally Posted by MamaSpoldi View Post
Is it likely that the dynamic linking is handled differently on the cRIO during debug vs. when the code is deployed?
Nope... in fact, the deployment happens by simply picking up that file, renaming it to FRC_UserProgram.out and FTPing it to the cRIO. It doesn't even get relinked between the two methods of running.

Chances are you are just getting lucky when it works in debug and happens to align in a 24-bit window. Triple check that the -mlongcall flag is getting used. You should see it in the Build Console on each line (for compiling each file) as an option to "ccppc".

-Joe
Reply With Quote
  #25   Spotlight this post!  
Unread 03-02-2010, 10:01
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Compressor Code causes No Robot Code Error

Thank you for your help... this fix worked!!!
Reply With Quote
  #26   Spotlight this post!  
Unread 03-02-2010, 10:13
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: Compressor Code causes No Robot Code Error

Quote:
Originally Posted by MamaSpoldi View Post
Is it likely that the dynamic linking is handled differently on the cRIO during debug vs. when the code is deployed?
Sorry, I've been ignoring this thread for a while and didn't see this until just now.
The answer is yes.
When your DKM is loaded by the debugger, it will almost certainly be loaded into a different memory region than if it is loaded by the in-kernel facilities.

Edit: of course, if the module is compiled long call, it won't matter. If it's not, you have luck-of-the-draw.
__________________
Robots never, ever, ever, ever break -- The Robot Repairman (Backyardigans)

Last edited by gvarndell : 03-02-2010 at 10:17.
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
User code won't download/run-possible causes? nathanww C/C++ 3 21-01-2009 11:00
Code error causing robot to go into programming mode. MJD Programming 14 30-10-2007 14:21
Error in code light on, trouble finding error Bryan Herbst Programming 16 12-10-2007 21:59
Code error on RC after downloading "bells and whistles" version of Kevins camera code DanDon Programming 6 10-01-2006 18:07
Compressor Code gacp Programming 2 19-02-2005 16:18


All times are GMT -5. The time now is 13:38.

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