Customizing your VSCode project to build/deploy for VMX-pi

A few small changes to the FRC Robot Software project’s “build.gradle” file are required to build/deploy correctly to the VMX-platform.

After first creating your VSCode project using the official “Creating a Robot Program” documentation, follow the steps below for your chosen development language to correctly build/deploy FRC Robot Software to th VMX-pi platform.

Java

Modify build.gradle as follows:

Modify GradleRIO Version to “2019.4.1-VMX”
Modify target type to use “vmxpi” (instead of “roboRIO”)
Modify “nativeZip” dependency platform to “wpi.platforms.raspbian” (instead of “wpi.platforms.roborio”)

Note: a complete example Java build.gradle file is also available.

C++

build.gradle modifications


Modify GradleRIO Version to “2019.4.1-VMX”; add “toolchainsPlugin.withRaspbian()

Modify target type to use “vmxpi” (instead of “roboRIO”)
Modify targetPlatform to “wpi.platforms.raspbian” rather than “wpi.platforms.roborio”

Note: a complete example C++ build.gradle file is also available.

C++ Toolchain Installation

This step is only needed once, rather than in every project, and installs the necessary C++ compiler and linker tools needed that match the processor type on the Raspberry Pi.

From the WPILib Command Pallete, choose “Run a command in Gradle” and then when prompted enter this command and then hit Enter:

  • installRaspbianToolchain

Other Notes

Once the project build.gradle file has been changed to GradleRIO version “2019.4.1.VMX”, when re-opening the project in VSCode, you may receive this prompt:

Choose “No, Don’t ask again” to remove this prompt in the future.

NOTE: To re-enable this prompt later, select “Reset Ask for WPI Updates Flag” from the WPILib Command Palette at ant time.