FRC 2013 Software Installation Guide
This document summarizes the steps of installing software to develop code using Wind River C++. The detail information can be found in various documents posted on FIRST. But the information is scattered in many different documents and difficult to locate. Therefore, this document summarizes the necessary information in a single place.
To install the software environment, you need to install the following components:
- FRC 2013 FRC Tools: contains the cRIO imaging tool and other tools.
- FRC 2013 Driver Station Support: contains the Driver Station software.
- Wind River Workbench: the C++ Integrated Development Environment (IDE).
- Updates: There are mandatory updates to the above software including the latest cRIO image file, matching WPI library and utilities.
Installing the FRC 2013 Tools and Utilities
The Tools and Utilities can be found on the DVD in the LabView envelop from the Kit of Parts. The DVD contains three software:
- FRC 2013 FRC Tools and Utilities
- FRC 2013 Driver Station Support
Since we are programming in C++, installing LabView is optional. We may need it to modify the Dashboard application but otherwise, we don't need it. Insert the DVD into your DVD drive and let AutoRun execute the installer. If it doesn't run automatically, open the DVD drive folder and double click AutoRun.exe. If you want to install LabView too, pick "Install Everything", otherwise click "Install Only FRC Tools" first. After it's done then click "Install Only Driver Station Support". If prompted for the Serial Number, type in S14X86763.
Installing Wind River Workbench
If you have installed Wind River last season, you must uninstall it and all associated software before installing the new version for this season. To uninstall the previous version, run the maintenance tool at C:\WindRiver\maintenance\mtool\mtool.exe. You can either run this in a CMD prompt or navigate to the folder in file explorer and double click mtool.exe.
Wind River comes in 2 DVDs. If your computer is running x86 (32-bit) Windows XP or Vista, you just need to install DVD 1 (V 3.3.1). If your computer is running Windows 7 (32-bit or 64-bit), you need to install both DVD 1 (V 3.3.1) and 2 (V 3.3.1). It is IMPORTANT that at the end of installing DVD 1, you MUST uncheck the check-box that automatically launch Workbench V 3.3.1. In other words, you must NOT run Wind River until you finish installing DVD 2. It is also IMPORTANT that you do not change the installation directory. Leave it at C:\WindRiver. This is because the update tool is expecting it there.
During the installation of DVD 1, it will prompt you for "Activation Type". Choose "Permanent activation" and click the "Browse..." button. Find the file "FRC_2013_WB30_WB33_install.txt" on the DVD and click "Open". This file contains the Wind River activation key. Once the path to the FirstRobotics_2012_install.txt is displayed under "Permanent activation", click "Next" to continue the installation. Follow the rest of the installation instructions until the process is complete. For detail screen shots of the installation process, please refer to: Installing the C++ Development Tools
Downloading and Installing Updates
Tools and Utilities update can be found here
Driver Station update can be found here
Wind River Workbench update can be found here
It is also important to check the FIRST Team updates site periodically for any news and updates. There could be announcement for rules changes, clarifications as well as updates on software and various issues.
Configuring Wind River Workbench
Enable line numbers in the text editor:
- Launch Wind River Workbench
On the left pane, expand General->Editors and click Text Editors.
- Check the box "Show line numbers" and click "OK".
Set code style:
Click Window->Preferences again.
- On the left pane, expand C/C++ and click Code Style.
- On the right pane, click the "New" button and type TRC492 as the Profile Name.
- On the "Initialize settings with the following profile" drop-down list, select "BSD/Allman (built-in)", click "OK" to open the edit dialog
- In the Edit dialog, select "Spaces only" on the "General settings" drop-down list.
- Make sure both "Indentation size" and "Tab size" have the value 4.
- Click "OK" to save the code style profile.
Set FIRST downloader preferences:
Click Window->Preferences again.
- On the left pane, click "FIRST downloader preferences".
- Type 492 as the team number.
For "The file to download to the robot", browse to the root folder of your project and select the file "PPC603gnu\<Project>\Debug\<Project>.out". Note that the file only exists after you have compile your project without error. Please refer to the section "Creating a new project" to prepare a new project and to compile it.
- Click "OK" to close the preference dialog.
Creating a New Project
The easiest way to start a new project is to duplicate an existing project and change it to a new project.
Create a new Mercurial repository for the new project on the server (see Create a new Mercurial Repository).
- Clone the empty project onto your laptop.
- Copy an existing project tree into the new project folder.
- Edit the files .project and .wrproject and replace all occurrences of the old project name with the new project name.
- Add all the files into the new repository.
- Commit and push all the changes.
Compiling the New Project for the First Time
Before compiling the new project, you must import the new project into the Wind River Workspace.
- When starting Wind River Workbench the first time, it will ask you to specify the root of the Workspace. You should choose the folder where the new project repository is located (e.g. c:\Users\John\Frc\2013\code).
Click File->Import. Expand "General" and click "Existing Projects into Workspace" then click "Next".
Select the folder <WorkspaceRoot>\<Project> and click "OK".
- After the project is successfully imported, right click the project on the left pane and select "Build Project".
- If there are any build errors, fix them appropriately.
After the project is successfully built, the file <Project>\PPC603gnu\<Project>\Debug\<Project>.out is generated.