Difference between revisions of "Template:FirmwaresNext/USB"

From GIMX
Jump to: navigation, search
(Using gimx-loader - Atmega32U4 boards)
 

(24 intermediate revisions by 2 users not shown)

Line 1: Line 1:
In order to use GIMX firmware need to be loaded first. '''A firmware is a program that is flashed to the USB adapter and allows adapter to mask itself as a genuine controller to the console.'''
+
This part explains how to load the right firmware into the adapter.
  
Official adapter comes with '''EMUG29PS4''' that's intended to emulate '''G29''' steering wheel on '''PS4''' console. You can skip this part if that's what you want to use adapter for.
+
{{#ifeq:{{{platform|}}}|ps4|<!--
 +
-->{{#ifeq:{{{device|}}}|SteeringWheel|<!--
 +
-->'''If you have a brand new official GIMX adapter you can skip this part (it has the right firmware preloaded).'''<!--
 +
-->|}}|}}
  
===Preparation for flash===  
+
===Preparation for flash===
To flash the firmware adapter needs to be connected to the PC. See the following guide:
+
 
 +
Connect both ends of the adapter to the computer, as shown in the picture below.
 +
 
 +
[[File:Schemeflash.png]]
  
<span style="color:red; font-weight: bold;">TODO: Insert photos</span>
 
* Connect '''AVR board''' (blue board) to the '''computer'''
 
* Connect '''UART converter''' (the other side) also to the '''computer'''
 
Ensure the connection is stable and proceed to the next point.
 
 
===Flashing firmware for official GIMX adapter===
 
===Flashing firmware for official GIMX adapter===
* Run gimx-launcher.
+
# Run gimx-launcher.
* Click on "Help > Update firmware".
+
# Click on "Help > Update firmware".
{{#ifeq:{{{platform|}}}|ps4|{{#ifeq:{{{device|}}}|SteeringWheel|* Select a '''EMUG29PS4''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|ps4|{{#ifeq:{{{device|}}}|Pad|* Select a '''EMUPS4''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|ps4|{{#ifeq:{{{device|}}}|Mouse|* Select a '''EMUPS4''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|ps3|{{#ifeq:{{{device|}}}|SteeringWheel|* Select a '''EMUG27PS3''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|ps3|{{#ifeq:{{{device|}}}|Pad|* Select a '''EMUPS3''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|ps3|{{#ifeq:{{{device|}}}|Mouse|* Select a '''EMUPS3''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|xboxone|{{#ifeq:{{{device|}}}|Mouse|* Select a '''EMUXONE''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|xboxone|{{#ifeq:{{{device|}}}|Pad|* Select a '''EMUXONE''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|xbox360|{{#ifeq:{{{device|}}}|Pad|* Select a '''EMU360''' firmware, click on "Load", and follow the instructions.|}}|}}{{#ifeq:{{{platform|}}}|xbox360|{{#ifeq:{{{device|}}}|Mouse|* Select a '''EMU360''' firmware, click on "Load", and follow the instructions.|}}|}}
+
# Select '''{{#switch:{{{platform|}}}
Upon success a "Firmware loaded successfully!" message should be displayed. Now disconnect the adapter from '''computer''' and proceed to the next part.
+
| ps4 = {{#switch:{{{device|}}}
 +
          | SteeringWheel = EMUG29PS4
 +
          | Mouse = EMUPS4
 +
          | Pad = EMUPS4
 +
        }}
 +
| xboxone = {{#switch:{{{device|}}}
 +
              | Mouse = EMUXONE
 +
              | Pad = EMUXONE
 +
            }}
 +
| ps3 = {{#switch:{{{device|}}}
 +
          | SteeringWheel = EMUG27
 +
          | Mouse = EMUPS3
 +
          | Pad = EMUPS3
 +
        }}
 +
| xbox360 = {{#switch:{{{device|}}}
 +
              | Mouse = EMU360
 +
              | Pad = EMU360
 +
            }}
 +
| ps2 = {{#switch:{{{device|}}}
 +
          | SteeringWheel = EMUGTF, EMUDF, or EMUDFP
 +
        }}
 +
| pc = {{#switch:{{{device|}}}
 +
        | SteeringWheel = EMUG27, EMUDFP, EMUDF, or EMUGTF
 +
        | Pad = EMUXBOX, EMU360, EMUXONE, EMUPS3, EMUPS4, or EMUJOYSTICK
 +
        }}
 +
| originalxbox = {{#switch:{{{device|}}}
 +
              | Mouse = EMUXBOX
 +
              | Pad = EMUXBOX
 +
            }}
 +
| #default = default
 +
}}''', click on "Load", and follow the instructions. Upon success a "Firmware loaded successfully!" message should be displayed.
  
 
===Flashing firmware for other adapters===
 
===Flashing firmware for other adapters===
 +
 
<div class="mw-collapsible mw-collapsed">
 
<div class="mw-collapsible mw-collapsed">
  
[http://gimx.fr/download/gimx-firmwares Download link]
+
'''Firmwares'''
 
 
====Using gimx-loader - Atmega32U4 boards====
 
 
 
'''(easy method, recommended)'''
 
 
 
* Run gimx-launcher.
 
* Click on "Help > Update firmware".
 
* Select a firmware, click on "Load", and follow the instructions.
 
Upon success a "Firmware loaded successfully!" message should be displayed.
 
 
 
====Using Avrdude====
 
'''(hard method, not recommended)'''
 
 
 
* Download the [https://gimx.fr/download/arduino_drivers.zip Arduino Leonardo drivers] and unzip the archive.
 
* Right-click on the arduino.inf file and click on Install.
 
* Make sure that the USB to UART board (e.g. CP2102) is connected and powered, and that the wiring with the atmega32u4 board is correct (see above GND->GND, TXD->RXD, RXD->TXD).
 
* Make sure that the atmega32u4 board is connected to your computer and powered.
 
* You should now have the atmega32u4 board connected via the USB-to-UART  ''and'' via its on-board USB port
 
* Download the [http://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/ArduinoBuilder-0.9.1.7z/download Arduino Builder tool] and extract the archive (using [http://www.7-zip.org/ 7zip]).
 
* Open a command window (cmd) and change the current directory to the extracted ArduinoBuilder folder. e.g. cd "C:\Path\To\ArduinoBuilder\", or simply shift-right-click in windows file explorer and click "open command window here."
 
* Type the following text but don't press enter:
 
avrdude -p atmega32u4 -c avr109 -P COMx -D -U flash:w:<path to atmega32u4.hex>:i
 
* Make sure to replace "<path to atmega32u4.hex>" in the command line with the location of the firmware to load (for example: C:\Users\YourUserName\Downloads\firmwares-5.0\EMUPS4\atmega32u4.hex).
 
* Open the device manager, and expand the "Ports" item. You should see your USB-to-UART driver (e.g. CP2102) connected to a COM port and the Arduino connected to another COM port. *Neither* of these are the COM ports you're looking for, in all likelihood.
 
* Unplug/replug the atmega32u4 on-board USB (''not'' the USB-to-UART) from your computer (doing this on the computer side rather than the Arduino side may be easier). When you replug it back in, watch the device manager, and notice which COM port is opened when the bootloader starts up. Ideally, this will be the same every time it is disconnected and reconnected. *THIS* is the COM port you want!
 
* Change the "x" in "COMx" in the above command to the number of the COM port that the bootloader uses.
 
* Unplug and replug the atmega32u4 USB again, and as soon the bootloader COM shows up, press enter to execute your command
 
* The bootloader is executed very briefly. You may have to make a few attempts before the firmware gets loaded correctly!
 
* If successful, avrdude should say "avrdude done. Thank you."
 
 
 
In GNU/Linux, the avrdude command is:
 
avrdude -p atmega32u4 -c avr109 -P /dev/ttyACM0 -D -U flash:w:atmega32u4.hex:i
 
(make sure to adjust the port and the file)
 
 
 
====Teensy boards====
 
 
 
Teensy boards can be easily flashed using the [http://www.pjrc.com/teensy/loader.html Teensy Loader].
 
 
 
It is only compatible with '''genuine''' teensy boards.
 
 
 
====Other tools (DFU-compatible boards)====
 
 
 
There are a few other tools that can be used to load the hex file:
 
* [http://www.atmel.com/tools/FLIP.aspx Flip utility from Atmel] (not compatible with genuine teensy boards and with Arduino-compatible atmega32u4-based boards)
 
* [http://dfu-programmer.sourceforge.net/ dfu-programmer command-line tool] (not compatible with genuine teensy boards and with Arduino-compatible atmega32u4-based boards)
 
  
dfu-programmer example:
+
[http://gimx.fr/download/gimx-firmwares Download link]<br/>
    sudo dfu-programmer at90usb162 erase
 
    sudo dfu-programmer at90usb162 flash at90usb162.hex
 
    sudo dfu-programmer at90usb162 reset
 
  
 +
{{FirmwareLoading}}
  
 
</div>
 
</div>

Latest revision as of 11:35, 6 May 2020

This part explains how to load the right firmware into the adapter.


Preparation for flash

Connect both ends of the adapter to the computer, as shown in the picture below.

Schemeflash.png

Flashing firmware for official GIMX adapter

  1. Run gimx-launcher.
  2. Click on "Help > Update firmware".
  3. Select default, click on "Load", and follow the instructions. Upon success a "Firmware loaded successfully!" message should be displayed.

Flashing firmware for other adapters

Firmwares

Download link

GIMX adapter or Arduino-compatible atmega32u4-based boards

Using gimx-loader

(easy method, recommended)

  • Install the GIMX software.
  • Run gimx-launcher.
  • Click on "Help > Update firmware".
  • Select a firmware, click on "Load", and follow the instructions.

Upon success a "Firmware loaded successfully!" message should be displayed.

Notes:

  • gimx-loader is available since GIMX 6.8
  • it is not necessary to download the firmwares since they are provided by the installer

Using Avrdude

(hard method, not recommended)

  • Download the Arduino Leonardo drivers and unzip the archive.
  • Right-click on the arduino.inf file and click on Install.
  • Make sure that the USB to UART board (e.g. CP2102) is connected and powered, and that the wiring with the atmega32u4 board is correct (see above GND->GND, TXD->RXD, RXD->TXD).
  • Make sure that the atmega32u4 board is connected to your computer and powered.
  • You should now have the atmega32u4 board connected via the USB-to-UART and via its on-board USB port
  • Download the Arduino Builder tool and extract the archive (using 7zip).
  • Open a command window (cmd) and change the current directory to the extracted ArduinoBuilder folder. e.g. cd "C:\Path\To\ArduinoBuilder\", or simply shift-right-click in windows file explorer and click "open command window here."
  • Type the following text but don't press enter:
avrdude -p atmega32u4 -c avr109 -P COMx -D -U flash:w:<path to atmega32u4.hex>:i
  • Make sure to replace "<path to atmega32u4.hex>" in the command line with the location of the firmware to load (for example: C:\Users\YourUserName\Downloads\firmwares-5.0\EMUPS4\atmega32u4.hex).
  • Open the device manager, and expand the "Ports" item. You should see your USB-to-UART driver (e.g. CP2102) connected to a COM port and the Arduino connected to another COM port. *Neither* of these are the COM ports you're looking for, in all likelihood.
  • Unplug/replug the atmega32u4 on-board USB (not the USB-to-UART) from your computer (doing this on the computer side rather than the Arduino side may be easier). When you replug it back in, watch the device manager, and notice which COM port is opened when the bootloader starts up. Ideally, this will be the same every time it is disconnected and reconnected. *THIS* is the COM port you want!
  • Change the "x" in "COMx" in the above command to the number of the COM port that the bootloader uses.
  • Unplug and replug the atmega32u4 USB again, and as soon the bootloader COM shows up, press enter to execute your command
  • The bootloader is executed very briefly. You may have to make a few attempts before the firmware gets loaded correctly!
  • If successful, avrdude should say "avrdude done. Thank you."

In GNU/Linux, the avrdude command is:

avrdude -p atmega32u4 -c avr109 -P /dev/ttyACM0 -D -U flash:w:atmega32u4.hex:i

(make sure to adjust the port and the file)

Teensy boards

Teensy boards can be easily flashed using the Teensy Loader.
It is only compatible with genuine teensy boards.

Other tools (DFU-compatible boards)

There are a few other tools that can be used to load the hex file:

dfu-programmer example:

   sudo dfu-programmer at90usb162 erase
   sudo dfu-programmer at90usb162 flash at90usb162.hex
   sudo dfu-programmer at90usb162 reset