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:
Perl: multipurpose. http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
Terminal Program. Bray Terminal (http://www.vems-group.org/files/TuningSoftware/TerminalProgram/BrayTerm20030217.zip) is a commonly used terminal program for Win32. You will need a decent (better than Hyperterm) terminal program to communicate with Genboard v3.
CVS. http://www.cvs.org/ CVS can be used to download the up-to-the-minute latest version of the firmware.
WinAVR. http://sourceforge.net/projects/winavr WinAVR can be used to upload the firmware to Genboard v3, and includes a utility called Make, which is described below.
Make. Make is included with the latest version of WinAVR and is used to compile config and table files. You will only need make if you are running Win32.
MegaTune (latest version information: http://www.vems-group.org/wiki/index.php?page=MegaTune) or MegaTunix (latest version information: http://www.vems-group.org/wiki/index.php?page=MegaTunix). These programs are used to tune maps, log data from engine sensors, and watch engine variables in realtime on a PC.
EasyTherm. (http://forums.yahoo.com/) EasyTherm is used to generate configuration files for your sensors, using your measurements.
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.
uisp. Linux. Available in source or Debian package. http://savannah.nongnu.org/projects/uisp/
Avrdude. Linux/Win32. Included in http://winavr.sourceforge.net/ or from http://www.nongnu.org/avrdude/
Avrprog. Linux. Available in source or debian package
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
There will be a number of errors displayed but don't worry about these. Finally
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.
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:
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:
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:
Attach the communications cable
Start your terminal program. Port settings should be: 9600 baud, 8 bits, N(o) parity, 1 stop bit.
Power-up Genboard v3
Connect to the v3 ECU via the terminal program
Execute this command via the terminal program: Manmcbffmcb . This takes us to bootloader mode.
Change port settings to: 19200 baud, 8 bits, N(o) parity, 1 stop bit
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
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.
Download and install the most recent bleeding edge version of MegaTune at http://www.not2fast.com/megasquirt/mt/
Download the latest firware snapshot for VEMS at http://megasquirtavr.sourceforge.net/msavr_fw_snapshot.tar.gz
to (overwriting the existing file)
to (adds to a long list)
to (overwriting the existing file)