Go to Post Football has been a school institution for over 100 years--we can't expect FIRST to show the same potential in a 10th of that. - Petey [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-11-2013, 22:37
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Problems deploying code

Hi everyone,

First of all, I would like to apologize if this problem has been addressed before. I searched the forums, and found similar issues, but none that matched my exact problem.

This year, our team has started our shift to C++ from LabVIEW. I installed Windriver exactly as stated in the WPI guide. I also installed the update called "WPILibC++Source20130302rev3622". I have tried completely uninstalling and re-installing Windriver multiple times following the instructions in the WPI guide to a tee.

However, I have a deployment problem. I wrote some simple code that drives the robot, controls a relay and does some very simple autonomous movement. I built the project without any errors. Then, I went to Window -> Preferences ->FIRST Downloader Preferences and set my team number to 1325 and set the file to download the robot to

C:\WindRiver\workspace\SimpleTemplate\PPC603gnu\Si mpleTemplate\Debug\SimpleTemplate.out

(My robot project was left at the default name of Simple Template)

After that, I plugged in the Ethernet cable into Slot 2 of the cRio (slot 1 does not work), and plugged the other end into my laptop. I then proceeded to disable my wireless card in the network and sharing centre and changed the settings of my local area connection as follows:

IPv4: 10.13.25.6
DNS: 255.255.255.0

I then pinged the cRio to make sure the connection was established. I got four replies in less than 1 ms, multiple times.

Next, I clicked FIRST -> Undeploy to undeploy any code from the cRio, I then opened up the driver station to make sure there was no code running on the cRIo.

Then, I clicked FIRST -> Deploy. However, I don't get a progress bar. I just get a message box saying "Downloading to robot" without a progress bar. Also, on the bottom right hand side of the screen, there is no progress bar there either. If I leave it, it will stay on that screen, and I won't even get an error message.

Please see the attached screenshot to get a better idea of what I'm trying to say:



In case you cannot view the screenshot, here is a link to it.

http://imgur.com/XDCodZ3

After going through the process I mentioned above multiple times, I then decided to take my project over to another students laptop and deploy the code from their laptop. When I tried it on that students laptop, everything worked fine, and I followed the exact same steps that I did on my laptop.

I have no idea what is wrong, and and help would be greatly appreciated.

Thank you,
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division

Last edited by ArzaanK : 28-11-2013 at 06:35. Reason: Added extra information
Reply With Quote
  #2   Spotlight this post!  
Unread 28-11-2013, 08:31
jalburty jalburty is offline
Joe Alburty
AKA: Joe Alburty
FRC #1763 (Paseo Pirates)
Team Role: Mentor
 
Join Date: Oct 2006
Rookie Year: 2005
Location: Kansas City
Posts: 25
jalburty will become famous soon enoughjalburty will become famous soon enough
Send a message via ICQ to jalburty
Re: Problems deploying code

Did you create a target server connection for your cRIO and does it appear in the Remote Systems tab?

Here is some info on creating a target server:
http://wpilib.screenstepslive.com/s/...-robot-program

and also on page 26 of the pdf manual:
http://wpilib.screenstepslive.com/s/3120/m/7913/pdf
Reply With Quote
  #3   Spotlight this post!  
Unread 28-11-2013, 11:17
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: Problems deploying code

I have done the steps shown in those documents, however, the problem still exists on my laptop. Does anyone have any suggestions?
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
Reply With Quote
  #4   Spotlight this post!  
Unread 28-11-2013, 11:40
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: Problems deploying code

Based on your thoroughness, I assume you already re-imaged the cRIO for C++ and not LabView with the Imaging tool, right? And configured the bridge using configuration utility?
Reply With Quote
  #5   Spotlight this post!  
Unread 28-11-2013, 11:45
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

Quote:
Originally Posted by jalburty View Post
Did you create a target server connection for your cRIO and does it appear in the Remote Systems tab?
A target server is required for debugging but not for downloading the application. The simple download is done to a FTP server on the robot.
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #6   Spotlight this post!  
Unread 28-11-2013, 11:55
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

If you get the network connection working (sounds like you do) and the parameters for the download dialog are correct the most common problems include undefined symbols. Every undefined symbol in your code must be resolved by a symbol already existing on the robot. For example all the WPI functions and classes we use are in the WPI libraries. More symbols are in the NI libraries and others in the operating system (VxWorks) itself.

So, do you have any undefined symbols? You can run the utility program "nmppc <object module name>" and it will show you the undefined symbols. Or open a shell to the robot and watch the error messages as your robot attempts to load and run the application object. You have to be quick opening the shell to see this. Another option is to download and run the application object using the target server (see help links earlier in this thread). This sequence is initiated by you and is easier to catch with the shell. A third (more advanced) option is to redirect the log output to a socket so it can be logged into a file on a remote machine.

HTH
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #7   Spotlight this post!  
Unread 28-11-2013, 12:31
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: Problems deploying code

I did re-image the cRio to Windriver Workbench C++. On the note of undefined symbols, I don't have access to the robot, so I don't think I can check that.

Quote:
You can run the utility program "nmppc <object module name>"
I am a little confused what you mean by this string of text. Is this "utility program" something I have to open up in Windows Explorer, is it something I have to put into my code?

Is it possible for my code to have undefined symbols even though the exact same code was able to be deployed onto the robot from another students laptop?

Would it help if you saw my code?
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
Reply With Quote
  #8   Spotlight this post!  
Unread 28-11-2013, 13:05
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

Quote:
Originally Posted by ArzaanK View Post
I did re-image the cRio to Windriver Workbench C++. On the note of undefined symbols, I don't have access to the robot, so I don't think I can check that.

I am a little confused what you mean by this string of text. Is this "utility program" something I have to open up in Windows Explorer, is it something I have to put into my code?

Is it possible for my code to have undefined symbols even though the exact same code was able to be deployed onto the robot from another students laptop?

Would it help if you saw my code?
In your case you would run the nmppc program from a command line like this:

nmppc C:\WindRiver\workspace\SimpleTemplate\PPC603gnu\Si mpleTemplate\Debug\SimpleTemplate.out

The program nmppc is in the VxWorks directories. I apologize for not having the exact location for you - I'm in the Caribbean on vacation. But the easiest thing to do is open the VxWorks Development Shell (from the program menus). It is a command line window (on your laptop) that has the PATH and other environment variables set you can use nmppc and other utility programs (.exe, .com, .bat in Windows) from Wind River.

If the exact same code deploys from another robot, something else is wrong. But you could have the same code and not be linking it in the same manner. For example, are you linking to the WPI libraries? Are you using a copy of the same project? Do both robots have the same types of cRIOs? Did you load the WPI stuff on your laptop?

You can send me your code and I'll look at it. Please send the .out file.
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #9   Spotlight this post!  
Unread 28-11-2013, 17:48
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

I can't see anything obviously wrong with your example code. Here is a sample of the output of nmppc:

...
U taskRestart
U taskResume
U taskSpawn
U taskSuspend
U time
U tolower
U toupper
U trcStack
U unldByModuleId
U vsprintf
00000154 D wpi_error_s_CommandIllegalUse
00000118 D wpi_error_s_CompressorUndefined
0000010c D wpi_error_s_DriveUninitialized
U write
...


But there are a lot of symbols in there to go through manually. Since you have two laptops with the same Wind River and NI install I would look for reasons that the FTP session might fail (which is what the download really does). Do you have any way to monitor network traffic to see the FTP session (on the wire) when start the download? Is it possible you have firewall settings stopping the FTP session?
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #10   Spotlight this post!  
Unread 28-11-2013, 18:16
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: Problems deploying code

I have the standard windows firewall enabled, could that be stopping the deployment process. I won't have access to the robot until later tomorrow, but when I do, I will disable my firewall, and see if that helps at all.

Also, is it possible for me to somehow take the .out file of the program, and transfer it to the FTP? I've read about doing it before, but I'm wondering if the process can still be done manually.
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
Reply With Quote
  #11   Spotlight this post!  
Unread 28-11-2013, 21:45
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

Quote:
Originally Posted by ArzaanK View Post
I have the standard windows firewall enabled, could that be stopping the deployment process. I won't have access to the robot until later tomorrow, but when I do, I will disable my firewall, and see if that helps at all.

Also, is it possible for me to somehow take the .out file of the program, and transfer it to the FTP? I've read about doing it before, but I'm wondering if the process can still be done manually.

Sure, you can ftp to the robot (the user name and password are 'user' and 'password') and put the file in the login directory (so no need to change directories on the robot) - our autonomous code runs scripts that we download to the robot via ftp prior to each match

Hey - the name of the file might be important on the robot, it will not be SimpleTemplate.out. I can't remember what it is and have no way to check it right now. Log in to the robot and do a directory listing, the name is kinda obvious looking.
__________________
Fast, cheap or working - pick any two!

Last edited by wireties : 28-11-2013 at 21:48.
Reply With Quote
  #12   Spotlight this post!  
Unread 29-11-2013, 12:12
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: Problems deploying code

I found out why I was having the problem. My Windows firewall must have been denying me access to deploy the code to the robot. I probably messed up on the permissions when I installed the program. All I had to do was disable the firewall, and I was able to deploy code.

Thank you all for your help,
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
Reply With Quote
  #13   Spotlight this post!  
Unread 29-11-2013, 15:05
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Problems deploying code

No problem - good luck to you and 1325 this year!
__________________
Fast, cheap or working - pick any two!
Reply With Quote
  #14   Spotlight this post!  
Unread 30-11-2013, 01:32
garyk garyk is offline
Programming Mentor: 668, 972, 2643
FRC #0668 (Apes of Wrath)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Santa Clara (Silicon Valley) Calif.
Posts: 94
garyk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the rough
Re: Problems deploying code

Quote:
Originally Posted by ArzaanK View Post
I found out why I was having the problem. My Windows firewall must have been denying me access to deploy the code to the robot. I probably messed up on the permissions when I installed the program. All I had to do was disable the firewall, and I was able to deploy code.

Thank you all for your help,
Thanks for posting what you did to solve the problem! A question, though - was this the same computer with which you wrote and downloaded LabView code? I'm wondering if LV uses a different mechanism than FTP to deploy code to the cRio.
__________________

Silicon Valley Regional 2005, 2006 972
Silicon Valley Regional 2007 668 Xerox Creativity Award
Championship Event 2007 668
Portland Regional 2008 668
Silicon Valley Regional 2008 668, 972
Beta Test Team 2008 668 (with 100 & 254)
Silicon Valley Regional 2009 668 Regional Chairman's Award; 2643
Sacramento Regional 2009 668 Winning Alliance (thanks, 1717 & 2473!), 2010 Winning Alliance 3256
CalGames 2006, 2007, 2008, 2009, 2010, 2011 Field Tech
NorCal FTC Regional 2008, 2009 Inspector
Championship Event 2009
San Diego, Silicon Valley Regionals; Champ. Event 2010 668, 2643, 3256
Silicon Valley, Madera Regional 2012 2643
WRRF Programming Instructor 2006-2016
Regional Woodie Flowers Award 2014 2643 Utah Regional

Reply With Quote
  #15   Spotlight this post!  
Unread 30-11-2013, 10:16
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Re: Problems deploying code

Quote:
Originally Posted by garyk View Post
Thanks for posting what you did to solve the problem! A question, though - was this the same computer with which you wrote and downloaded LabView code? I'm wondering if LV uses a different mechanism than FTP to deploy code to the cRio.
I'm not sure exactly how LabVIEW deploys code onto the robot, but I have read somewhere that some teams have had success finding the raw executable and then performing an FTP transfer. I don't exactly remember where the thread is unfortunately.

Also, the computer that I am using is the exact same computer that I wrote and downloaded LabVIEW code with.
__________________
Arzaan Khairulla
Programmer/Driver
2013 Greater Toronto Regional East Winners with 1114 and 2056
2013 Galileo Division
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


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

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