FRC Programming Environment¶
Joseph Jackson
The official FIRST documentation for installing the FRC programming tools is a bit convoluted and time-consuming. I’ve created a streamlined process for Girls of Steel by:
- downloading and unpacking all the files ahead of time,
- focusing only on Java and the third-party libraries we rely on,
- writing scripts to automate many of the steps on the Mac, and
- adding steps for using GitHub to share code.
- Obtain a USB drive with all the installers
- See Joe or the Programming Lead to borrow one. The contents of the drive are documented on the [[Software installers kept on USB Drive]] page.
- Follow the steps specific to your platform of choice
- macOS (the red pill)
- Open the
Macfolder on the USB drive- There’s no need to make a copy of the folder unless others are waiting for a flash drive
- Drag
Visual Studio Codeto your Applications folder- As a shortcut, you can drop it on the
Applications aliasfound in the Mac folder - If prompted, choose to
Replaceany older version
- As a shortcut, you can drop it on the
- Drag
GRIPto your Applications folder, same as above - Launch (double-click) the
WPILib-Installer.commandscript- A Terminal window will open to show the progress as the script runs
- Confirm there aren’t any error messages; If so, show them to Joe
- Close the Terminal window after you see the
[Process completed]message - If you see an error “cannot be opened because the developer cannot be verified”, take these steps:
- Open
System Preferencesfrom the Apple menu - Go to the
Security & Privacypreference pane - Switch to the
Generaltab - Click the
Open Anywaybutton, if present - Back in the error dialog, click
Cancel - Let the installer script finish, but be sure to run it again to complete any canceled steps
- Open
- Launch (double-click) the
CTRE-Installer.commandscript- A Terminal window will open to show the progress as the script runs
- Confirm there aren’t any error messages; If so, show them to Joe
- Close the Terminal window after you see the
[Process completed]message
- Open the
- Windows (the blue pill)
- Open the
Windowsfolder on the USB drive- There’s no need to make a copy of the folder unless others are waiting for a flash drive
- Run (double-click) the WPI library installer:
WPILibInstaller_Windows64-*.exe- It is recommended to install for
All Userswhen prompted - In the main installer window, click on
Select/Download VS Code, thenSelect Existing Download - Select the
OfflineVsCodeFiles-*.zipfrom theWindowsfolder of the USB drive - Make sure the checkbox for
Visual Studio Codeis checked - Click
Execute Installand wait for the installer to finish
- It is recommended to install for
- Run the National Instruments FRC Game Tools installer
- Open the
ni-frc-2020-gamefolder found in theWindowsfolder of the USB drive - Run
install.exeto begin the installation - Review and accept the license agreements to continue
- Take all the default installation options by clicking
Nextbuttons - When prompted to log into your NI User Account, use the
Create accountlink, if necessary - NOTE: When the NI Licensing Wizard prompts you to activate the Vision Development Module, use the
Xbutton in the upper right to cancel out of the window - Reboot when the installer offers the
Reboot Nowoption
- Open the
- Run the FRC Radio Configuration installer:
FRC_Radio_Configuration-*.exe- Accept any default installation options
- You will be prompted to install a network packet utility as subtask of this installer
- Be sure to choose
I want to reboot later, as instructed by the installer
- Run the Git installer:
Git-*.exe- There are many, many pages of options presented to customize your Git environment
- Just accept all defaults and click through the pages to complete the installation
- Run the GRIP installer:
GRIP-*.exe- Accept any default installation options
- Note that the GRIP tool is automatically launched after installation
- Quit out of GRIP before continuing
- Run the CTRE Phoenix installer:
CTRE Phoenix Framework *.exe- De-select the Hero C# and LabView options, leaving the others enabled
- This provides support for the Talon SRX motor controllers
- Run the Spark Max installer:
spark-max-client-setup-*.exe- Includes a utility and libraries for the Spark Max motor controller
- (Optional) Install the Limelight firmware flashing tools
- You can skip this for personal laptops (unless you work with the Limelight often and want it)
- All team laptops should have this installed
- Run the USB Flash Driver installer (it’s for the embedded Raspberry Pi):
rpiboot_setup.exe - Copy the Balena Etcher imaging tool to the laptop:
balenaEtcher-Portable-*.exe- You can leave it in your Downloads folder or create a new folder such as:
C:\Program Files\Limelight Image Tool\ - Right-click on your copy of the balenaEtcher* file and create a shortcut to it on your Desktop
- You can leave it in your Downloads folder or create a new folder such as:
- Copy the latest image file to the same location on your laptop as the imaging tool:
LL_*_RELEASE.zip
- Open the
- macOS (the red pill)
- [Mac & Windows] Essential VS Code settings
- Start
Visual Studio Codeif it’s not already running- On the Mac, it is in Applications
- On Windows, you must use the desktop icon
FRC VS Code 2020to start the correct version of VS Code
- Bring up the Command Palette by pressing:
- On the Mac, Command-Shift-P
- On Windows, Control-Shift-P
- In the palette, enter the command
WPILib: Set VS Code Java to FRC Homeand press return or select from the list of matching commands
- Start
- First-time import (clone) of projects from GitHub
- Run through this process once per season to establish access to this year’s GitHub code repository
- If you’ve done this during the preseason, there’s no need to do it again
- Start
Visual Studio Codeif it’s not already running- On the Mac, it is in Applications
- On Windows, you must use the desktop icon
FRC VS Code 2019to start the correct version of VS Code
- Bring up the Command Palette by pressing:
- On the Mac, Command-Shift-P
- On Windows, Control-Shift-P
- In the palette, enter the command
Git: Cloneand press return or select from the list of matching commands - Enter in the URL for this year’s GitHub repository:
https://github.com/GirlsOfSteelRobotics/2020GirlsofSteel.git- (Adjust the URL above for the current season, if necessary)
- Select a location to create a new folder for the repository
- Your
Documentsfolder is a reasonable place to put it
- Your
- If prompted to open the repository, cancel out with the
Xbutton- Only open individual VS Code projects found inside the repo instead of opening the entire repo!
- To open a project, use the
Open Folderoption from the VS Code Welcome page or from theFilemenu
- Run through this process once per season to establish access to this year’s GitHub code repository
- Create a personal GitHub account
- http://github.com/
- If you already have one for school, there’s no need to create another
- Ask Joe or the Programming Lead to invite your GitHub account to the Contributors team for Girls of Steel
- See your e-mail to accept the invitation
- When finished, you can push changes to GitHub to share them with the rest of the team
- VS Code will prompt you for your GitHub username and password the first time you push code
- Installing Third-Party Libraries
When using third-party hardware on the robot, the project needs to have the associated libraries installed.