Code Will Not Load

I have set up the robot hardware (cRIO, D-Link, Driver Station) according to the “Getting started with the 2013 control system” document on the FIRST website. However, when I open up the Driver Station Application, the “communications” light is green, but the code will not show up. I have checked the options in windriver under Window->Preferences->FIRST Dowloader Preferences, and when I hit FIRST->Deploy, the code acts as though it is deploying to the robot, but the Driver Station always says there is no code on the cRIO. Does anyone know what could be causing this?

I also get an error message on the Driver Station that says:

FRC: Driver Station ping status has changed. Warning <code> 44002 ocurred at ping results: link-good, DSradio(.4)-bad, robot radio(.1)-bad, cRIO(.2)-bad, FMS-bad driver station.

Are you connecting using wired ethernet, or wireless? The ping status shows that you don’t have a network connection to the cRIO.

This is when tethered from my laptop to the cRIO. I understand that it is saying that the connection is bad, but the driver station shows that it is good, if you look at the green lights on the bottom left of the screen.

Is your code crashing for some reason? I had this problem last night. If in the console on the DS, it says something about a lack of robot code, but the robot code light is on, this may be your problem.
Check to make sure you aren’t allocating already used resources or such.

and if your code is crashing (i.e. with a null pointer exception or something like that) you can see that with NetConsole, if you open netconsole then reboot you should see errors if there are any - you should also see if it’s trying to load the FRCUserProgram.out that should be deployed if your code got there.

The robot code light is not on in the driver station.

There was a bug in Robot Builder that caused C++ code to compile fine, but not load on the robot. It made me realize that debugging by deploying code and rebooting the cRIO is not enough.

Use the FRC instructions to set up your C++ (http://wpilib.screenstepslive.com/s/3120/m/7913/l/79733-configuring-wind-river-workbench) and then follow the debug instructions (http://wpilib.screenstepslive.com/s/3120/m/7913/l/79736-debugging-a-robot-program) instead of deploying and rebooting. You’ll be given lots more information and will not have to guess about what’s happening. Once you have confidence that things work, you can switch between deploy+reboot and debugging as needed.

It is more difficult to get going, but if nobody on your team can get debugging to work, you’re going to have a very rough time with C++. It’s not too late to switch languages!

Thanks very much, I’ll check that out when we get up to the shop tonight.

Ok, I’m not sure how, but for a few minutes I could change what code was on the robot. After that, the code light stayed green but the code would not update. I was following the instructions in the “Getting Started With C++” document, but when I tried to Undeploy the code from the cRIO, I got an error message saying that I could not.