C++

From RoboWiki

Jump to: navigation, search

Programming The Robot Using C++

Installation

Programming the robot in C++ requires installing the Wind River Development environment. FIRST includes the installation DVD each year with the kit of parts.

The installation is straightforward except for the licensing step. I discovered a PDF file at the top of the DVD that describes the installation process. When you get to the license step of the installer, select Permanent activation, then click browse. Navigate to the top of the DVD and select "FRC_2011_install.txt". This file contains the installation license.

The rest of the installation is just defaults.

Wind River will need updates. Go to FIRST. Find the C++ link and follow the link. This will lead to a page where you end up going to WPI Resource Center. Read the instructions. Go to File Releases. Look for WPILib C++ updates for 2011 FRC Season. Download the latests release. Run the installer.

Next, insert the NI DVD and run the FRC_Tools_Setup. This will take a while to install everything.

Then install this update

All of the workstations working with the same cRio must be using the same version of WindRiver Workbench. The VxWorks image file in C:\WindRiver\WPILib must be the same for all systems. The VxWorks file is part of the Workbench Update.


Read How to Build and Load Programming in LabVIEW, C, and Java. Follow the section on building and loading a C/C++ program.

Links to WindRiver information:

Fun info for programming the cRio inC++:

  • You can use a real debugger. WindRiver will debug a running program. There can be no deployed program (undeploy), then you can debug your program. Breakpoints, single step, variable view. Like a real development environment.
  • You can printf to a console window. Enable NetConsole in the imaging tool. Then use NetConsole (Programs->NetConsole for cRio). Note that the netmask must be set to 255.0.0.0 (instead of 255.255.255.0).
Personal tools