Once you have installed the required software on your programming computer, do the following:
You should see a file listing that looks much like the image below. The window borders and colorization of the filenames will depend on which operating system you use, but the text should be the same. This snapshot was taken on FreeBSD with the KDE desktop.
![]() |
shell: ls
![]() |
Now it's time to edit the program. You can use your favorite editor and then compile and upload the program from the command line by running "make install".
This tutorial uses APE (Another Programmer's Editor), which is installed by the robotize scripts included with OpenVex. APE allows you to build and upload the program using the menus and/or hot keys within the editor.
shell: ape firmware.c
![]() |
Select "YES" when APE asks if it should use Makefile. Then accept the default parameters that pop up in the next window.
The Makefile is a script-like file that contains the rules for building the executable file for the Vex controller from the C source code. The process is somewhat complicated, so for now you can simply use the provided Makefile, and focus just on editing the main source file. This is all you should need to do for most Vex programming projects, but you're free to explore and edit the Makefile and library code when you feel adventurous.
![]() |
To build and upload the firmware, open the Build menu using Alt+b (hold Alt while pressing b) or Esc-b (press and release Esc and then press b within 1 second). Then select Install from the Build menu.
![]() |
The firmware should build, and the Makefile should automatically run vexctl, the program that uploads HEX files to the controller. The vexctl program will remind you to press the button on the programming dongle (the orange box in the middle of the cable connecting your computer's USB port to the serial port on the Vex controller).
![]() |
Press the dongle button, and then press return on your computer to begin the upload. The firmware will begin to run as soon as the upload completes. At this point, the Makefile will run cutecom (on real Unix systems) or Bray++ Terminal (on Cygwin) to display output from the Vex controller. The output messages from the controller are sent to your computer through the same cable used to upload the firmware. Make sure the serial port settings (baud, data, and stop) match those shown below, and then open the device. After opening the device, you should see the output from the firmware appear on the screen.
![]() |