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\SimpleTemplate\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:

http://imgur.com/XDCodZ3

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,

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/3120/m/7913/l/79736-debugging-a-robot-program

and also on page 26 of the pdf manual:
http://wpilib.screenstepslive.com/s/3120/m/7913/pdf

I have done the steps shown in those documents, however, the problem still exists on my laptop. Does anyone have any suggestions?

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?

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.

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

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.

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?

In your case you would run the nmppc program from a command line like this:

nmppc C:\WindRiver\workspace\SimpleTemplate\PPC603gnu\SimpleTemplate\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.

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?

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.

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,

No problem - good luck to you and 1325 this year!

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.

OK, that tells us that LV and WindRiver use different mechanisms to download/deploy the code to the cRIO - handy to know for troubleshooting.