Previous Up Next Home

Section 4.3: Software Installation


In order to upload and maintain the engine management software (firmware) on the board we will need to install a few support programs. Many of the support programs are written in a language called Perl. You do not need to learn Perl to use VEMS. Useful utilities include:

The wiki should be used to find and download the latest stable version of the firmware. If you plan on using non-standard sensors, you will have to download the uncompiled version of the firmware and build it manually. If you are using GM sensors, you may use the precompiled version, which is ready to upload to your Genboard v3. The wiki page for the latest version of the firmware is: http://www.vems-group.org/wiki/index.php?page=GenBoard%2FUnderDevelopment%2FFirmwareChanges

Below is a list of programs that can be used to write the firmware to the flash memory of Genboard v3, in addition to WinAVR, which is listed above.

Section 4.3.a: Basics.Install.Software.Perl

Windows users may also have to install a couple of Perl packages to allow Perl to access the serial port. The first is the Win32-API, which can be found at: http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/Win32-API-0.41.zip

Unzip the file into a useful directory and read the installation instructions in the file readme.txt, which is found in the directory that you unziped the file into. Secondly, you will need Win32::SerialPort which is available here: http://www.x-dsl.hu/genboard/builders/SerialPort-0_19.zip

Unzip the file to a local directory. Open a command window and change to the directory you unzipped the file into. Type

perl Makefile.pl

followed by

perl test.pl

There will be a number of errors displayed but don't worry about these. Finally

perl install.pl

Section 4.3.b: Basics.Install.Software.Connecting

Do not connect the GenBoard to the power supply yet. These steps should be done before any testing of sensors or outputs. Complete this test connection with only the power applied to Genboard v3 and the communications cable attached. Plug the serial cable into the GenBoard and to the PC. Start your terminal program.

Set the port settings at 9600 baud, 8 bits, N(o) parity, 1 stop bits, and connect.

Attach the power supply. At power-up you will see: "HeloPingOK". Say "Man". You will see: "Helo>". It works!

If this does not work then check that the power supply is good. Next check your soldered connections as dry joints can be a problem that even those who are most skilled with a soldering iron can face. There is a jumper near the max232 chip that needs to be connected, otherwise the PC to AVR direction will not work.

Disconnect the power supply and terminate your terminal connection.

Section 4.3.c: Basics.Install.Software.Bootloader

This is intended to be a step through guide, but there are many more detailed documents on the wiki pages SoftwarePage and BuildFirmwareFAQ. Skip this step if you have downloaded and plan to use the precompiled version of the firmware.

The sensor tables are included in the firmware build process, so you will need to configure a the tables before building the firmware. If you are not using the standard GM sensors (or very similar) then you'll need to measure the resistance of your sensors at 0, 25, and 100 degrees Celcius. 2.2k to 2.7k ohm values are common and close to the nominal value of an NTC sensor.

After the new sensor files are created, you will need to convert them to a format recognizable by Genboard v3. This is done with a conversion program included with the firmware source code. If you use Win32, enter into the WinAVR shell (by starting a command prompt and typing 'sh'). At the shell prompt, execute these commands:

perl bin/inc2tbl NAME-OF-THE-MAT-INC-FILE > etc/airdenfactor.c

perl bin/inc2tbl NAME-OF-THE-CLT-INC-FILE > etc/thermfactor.c

If you use the standard Motorola MAP sensor, copy , , and to the directory from the directory.

Skip this step if you have downloaded and plan to use the precompiled version of the firmware.

The README file is the main guide here. It will be updated as needed per release of the firmware so that appropriate changes can be made in the compilation procedures. These instructions are general, but the README is the letter of the law.

To compile the firmware in a Win32 environment, change your working directory to the firmware root directory, enter into the WinAVR shell and execute the following commands:

make clean

make all

Compilation in a Unix/Linux environment does not require the starting of a shell program; you already have an unbroken shell to work with.

There will probably be warnings emitted during compilation, but if the file vems.hex is output into the firmware directory, it was ultimately successful. This is the file you will upload to the Genboard v3 flash memory.

Once the firmware has been compiled into the file vems.hex, we need to write it to the Genboard v3 flash memory:

To use the prog.pl Perl program to upload the firmware: at the command prompt, change your working directory to the firmware root directory, then execute the command

perl bin/prog.pl vems.hex w

To use WinAVR to upload the firmware: start Start WinAVR Studio. Go to Tools, AVRProg, and browse to your vems.hex file. Under "Flash", click the button labeled "Program". Click Exit when it is finished.

Copy files:

Previous Up Next Home