This page is created to simplify and join different pages as: GenBoard/InstallPage/PowerUpToBootloader , GenBoard/Firmware/BootLoader and some of GenBoard/FirmWare, GenBoard/InitialConfig to a easy page to understand and follow.
This is for the person who wants a GenBoard/VerThree but the reason is not to develop software but to use it in his/hers car
Please add or change this wiki page for the benefit of everyone!
1. Getting firmware
- CVS NOT SUPPORTED ANY MORE NEW FILE REPOSITORY IS SVN!!!
Download the released firmware from GenBoard/UnderDevelopment/FirmwareChanges so you can skip this chapter.
Only get a development firmware version with the below CVS method if you are a developer or want to help table-testing
- This program is checking for the latest firmware when running Getfirm, see below
Unzip the downloaded file and rename it to simply 'cvs.exe' if it has additional numbers in the filename. Windows will sometimes hide the file extension. Verify that this feature is turned off. Move the cvs.exe file to your c:\windows folder or any other directory pointed to by the PATH (This is for Getfirm to find it)
- This program uses CVS anyonymous (pserver, port 2401) access to download the latest firmware over the internet (requires expertise to make it work behind too restrictive firewalls, but usually works).
Unzip it and open GETFIR~1.txt, there you have all steps needed to get firmware (below is a cut out of GETFIR~1.txt).
- Step 1:
- Put getfirm.bat in the root folder of your firmware storage area. Usually C;\vems
- A small amount of one time setup must be done first on win98 systems, see GETFIR~1.txt.
- Step 2:
- From windows explorer double click on getfirm.bat
- In the dos window enter getfirm xxxx <enter> . xxxx is a folder name you want to store the firmware under. I have stored a few different versions. I store them by date. If today is Dec 7, 2003 , I would enter getfirm 2003-12-07 in the dos window.
- That will make C;\vems\2003-12-073\firmware\
- When asked for pass just press Enter
- It's finished when you see C;\vems\2003-12-07> exit And C;vems\2003-12-07>
- Type exit and hit Enter to close cmd
The getfirm1.bat is a simplified version, intended to be run from a DOS window that you start in the usual way. It does not create a new folder.
2. Compiling firmware - optional
The downloaded zip has a compiled vems.hex so you can likely skip this chapter as well, unless you need some special customization in my_make file.
Avr-gcc compiler: http://sourceforge.net/projects/winavr Download latest stable WINAVR package (18MB)and install
Perl interpreter: http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl Download the 8.6MB Perl 5.6.1 MSI package, and the 2MB Microsoft MSI installer package if required and install
- Compiling the code
- 1. Copy my_make file from the docs directory into the main firmware directory and edit to your needs. You can use Programmers Notepad to do this (should have installed an icon on your desktop when you loaded Win AVR)
- 2. Save changes to my_make
- 3. Start windows command prompt
- 4. Navigate to directory where firmware resides (C;\vems\2003-12-07\firmware)
- 5. type make clean (Special note: on non GNU OSes you must use the GNU version of make often called gmake)
- 6. type sh (start shell)
- 7. type make all
- 8. If everything went OK just type exit to get out of 'sh'
- 9. check firmware directory, and you should have some newly made files, the most interesting being vems.hex you will upload to the genboard.
3. Uploading firmware
After you have compiled your firmware you can upload it to your controller. You may need to check the serial connection before uploading:
Do Not connect the GenBoard to the power supply yet
- 3.1 Plug the RS232 cable into the GenBoard to SV1 and to the PC. See GenBoard/BuildProcedures/SerialPort if you need to make a cable
- 3.2 Select your TerminalProgram, connect at 9600 baud, 8 bits, No parity, 1 stop bits
- 3.3 Turn on the power supply and you will see something like: '<00>' This may depend on firmware and terminal program?.
- 3.4 Type Man (Capital M!!) and send the reply should be 'Hello>' This is a good sign that the board is alive for the first time (If you have BootLoader flashed onto your system)
- 3.5 There is few ways to enable bootloader mode: prog.pl, terminal, connect Pin 1 and 4 of JP_ISP, loopback the 8V side of the max232 that normally goes to the PC, use the ISP to write and verify flash and AVR internal fuses. Here we describe the following ways:
- 4 Pin 1 and 4 of JP_ISP NOT the recommended way
- 4.1 Now power down the board!
- 4.2 Connect Pin 1 and 4 of JP_ISP to enable bootloader mode
- 4.3 Select your TerminalProgram, connect at 19200 baud, 8 bits, No parity, 1 stop bits
- 4.4 Turn on the power supply
- 4.5 Remove Connection between Pin 1 and 4 of JP_ISP
- 4.6 Sending S should return "AVREFI1"
- 4.7 Sending v should return something like: "20" (20 is the version of software in AVR, reads 2.0)
- 4.8 Seeing this echos from Genboard confirms that connection is OK
- 5 Terminal
- 5.1 Send Manmcbffmcb command in 9600,8n1 baudrate. This will enable bootloader
- 5.2 Now change settings of terminal to: 19200 baud, 8 bits, No parity, 1 stop bits
- 5.3 Sending S should return "AVREFI1"
- 5.4 Sending v should return something like: "20" (20 is the version of software in AVR, reads 2.0)
- 5.5 Seeing this echos from Genboard confirms that connection is OK
- 6 For prog.pl see below
AVRStudio (27,5MB) Download from: http://www.atmel.com and search for 'studio' or directly use this link: http://www.atmel.com/dyn/resources/prod_documents/aStudio4b356.exe ( to save download time you could ask someone to email you the AVRprog.exe program )
prog.pl Found under bin/ in the firmware directory (Very small)
Steps to upload firmware to genboard:
- Ensure that you have the Genboard in Bootloader mode
- Open AVRStudio and run avrprog (in tools menu)
- Navigate to the vems.hex file you want to download.
- Under Flash hit the program button
- When it's finished press the EXIT button! If you just close, the keyword will not be set in bootloader. If you do this the AVR will not function or communicate via RS232. If you forget, you will have to repeat the steps to get genboard into bootloader again
- Ensure that you have the Genboard in Bootloader mode use the prog.pl script to upload the .hex file (or pass the t option if it's not in bootloader mode: write wt instead of w below)
- use the prog.pl script to upload the .hex file perl bin/prog.pl vems.hex w
- If you have uploaded before you will have to use the t command as in perl bin/prog.pl vems.hex t as this will force the working program into bootloader mode before uploading.
And that's it...now you have firmware on your genboard!
- In the case were your firmware is corrupted and get some errors with prog.pl, you can try and start the board into bootloader mode:
- Make sure the power is OFF.
- Jump PIN 1 and 2 on the Genboard RS232 Pin header, or if serial cable and connector is soldered already (updating firmware etc.) short pins 2 and 3 in 9-pin D-Sub connector.
- Power up the Genboard.
- Remove Jumper and plug your RS232 cable.
- Use the download procedure as above without the 't' parameter because we are already in Bootloader mode.
4. Downloading Config and Tables
Downloading is to retrive your config if your PC backup is lost and is not necessary on a new GenBoard since you want your own car specific settings
- Downloading config.mtt and/or tables.mtt through terminal window by navigating to the config.mtt and/or tables.mtt file in your firmware
- Open your favorite TerminalProgram
- Connect at 9600 baud, 8 bits, No parity, 1 stop bits
- Type Man and send
- Type mcd and send to print config in the terminal window.
- Copy/Paste contents of the terminal window to text editor for changes.
- Save changes (For mcd: config.txt and mct: tables.txt).
- Now repeat the above two steps for table changes except use mct in place of mcd to get the contents of the tables in the terminal window.
5. Uploading Config and Tables
Uploading the etc/config.mtt and etc/tables.mtt to Genboard, this is best done using a terminal program. Ensure that you upload the .mtt extension or you will have problems getting your installation running.
- 1. Copy the files to the etc/ directory of your firmware directory.
- 2. Open the config.txt and tables.txt and make needed changes to fit your setup.
- 3. Save the changes
- 4. Open command prompt, navigate to firmware directory and type make mtt(this converts and adds config.mtt and tables.mtt to etc/ from config.txt and tables.txt)
The above steps need only be used once as long as firmware version changes are not made. After you have done these steps, you can use the following to make changes:
- Open your favorite TerminalProgram
- 5. Connect at 9600 baud, 8 bits, No parity, 1 stop bits
- 6. Select and send "config.mtt" using the send file function
- 7. When GenBoard replys 'Bye' the upload is finished
- 8. Select and send "tables.mtt" using the send file function
- 9. When GenBoard replys 'Bye' the upload is finished
THX verry helpful for us dummies :)
Yup. Mad props for writing that up. :)