Wiki

Clone wiki

Greyhound Lua / Installation

Installation

Greyhound Lua must be installed on your cRIO before you can run Lua code. You only need to do this when you start using Greyhound Lua, if an update is released, or if you change cRIOs.

<<toc>>

Introduction

Greyhound Lua is simply a program written in C/C++ that runs Lua code, just like other programs built in WindRiver. Once you've installed Greyhound Lua, however, you won't need to use WindRiver anymore.

Lua is an interpreted programming language, which means that it does not need to be compiled. This eliminates the long "Build" step from your workflow, and allows you to download code directly onto the cRIO without having to use a complicated IDE like WindRiver.

It is assumed you have already flashed the cRIO with the latest image (ensuring that you selected the WindRiver C/C++ option).

  1. Download the latest .out file from the Downloads page
  2. Connect your computer to the cRIO (setting your computer's IP address to 10.XX.YY.6, where XXYY is your team number).
  3. Open an FTP program (like Cyberduck) and connect to ftp://10.XX.YY.2/ni-rt/system/##, where XXYY is your team number.
  4. Copy the .out file you downloaded into this folder, and rename it to FRC_UserProgram.out. If the FRC_UserProgram.out file already exists, delete it.

Install from Source (for advanced users)

You should only need to install from source if a) you need to modify the interpreter itself or b) you compile things for a living (the author is firmly in this category).

  1. Download the latest source code by one of the two methods:
  2. Generate the WPILib bindings using http://www.swig.org/
    • The exact method for doing this varies from system to system, but generally, you want to get to a command-line prompt and run: swig -lua -c++ wpilib.i
    • You may find SWIG's Getting started on Windows document helpful.
  3. Import the source code directory as a WindRiver project.
  4. Build and download as usual.

Running Code

See the Basic Tutorial.

Updated