How To Flash the Midifighter with New Firmware
Page 1 of 4 1234 LastLast
Results 1 to 10 of 40
  1. #1
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Arrow How To Flash the Midifighter with New Firmware

    How To Flash the Midifighter with New Firmware
    20100220: created by Fatlimey
    20100524: added Mac instructions

    The Midifighter uses a DFU (Device Firmware Update) style bootloader that allows
    the chip, once put into "bootloader mode", to receive new programs and settings
    over the USB connection. Any tool that supports the DFU command set can be
    used to flash a new program to the Midifighter over USB.

    To drop your Midifighter into Bootloader Mode, plug in the USB cable while
    holding down the four corner keys:
    Code:
       # . . #
       . . . .
       . . . .
       # . . #
    Continue to hold the four corner keys until bootloader mode is reached, this will take about 2 seconds, the Midifighter will show a checkerboard pattern to indicate that it is ready to accept DFU commands:
    Code:
       * . * .
       . * . *
       * . * .
       . * . *
    An alternative method is to solder two microswitches to the spaces
    available at the top-left of the PCB. Pressing the Reset button will act
    as if the USB cable was removed then connected again, while holding
    down both buttons will immediately drop the device into Bootloader
    Mode without the need to hold down the 4-corners key pattern. If you
    think you are going to be doing a lot of programming with the Midifighter
    I would highly recommend adding these switches, simply for the
    convenience factor.

    Putting the Midifighter into bootloader mode causes it to disconnect from
    USB and reconnect as a different kind of USB device (i.e. not a MIDI class
    device), and on some systems this device type requires the installation of a
    driver before the reflashing software will recognize the bootloader
    device. Setting up this driver is a one-time installation that is only
    required of you wish to reflash your Midifighter.

    The EEPROMs inside the chip are designed to be programmable for several
    thousand cycles, a number of flashes that would take heavy amounts of
    development time and testing. It's just worth knowing that there is a limit
    and that one day, a long, long time in the future, with enough reflashes the
    chip may break.


    1. PC using Atmel Flip

    Using the program "Flip" from Atmel.

    At the end of installation, you *must* select the option to read the README file:

    file:///C:/Program%20Files/Atmel/Flip%203.4.1/info/Readme.html
    as it contains instructions for installing the USB driver for the DFU
    device. This driver allows connection to the DFU bootloader so that a
    program can be uploaded. It's a normal driver install involving:

    • Go to the device manager.
    • Find the AT90USB162 device in the "Jungo" section.
    • Right-click and select "Update Driver...".
    • Select "Install from a specific location".
    • Select "Include this location in the search" and specify the driver
      location, which by default would be "C:/Program Files/Atmel/Flip 3.4.1/usb"
    • Select "Finish" to finally install the driver.
    • The device should appear in the "LibUSB-Win32 Devices" section.


    Once installed, Flip is simple to use.

    1. Select the chip that is to be programmed. Use the "chip" icon,the menu
    item "Device/Select..." or press Ctrl-S. Select the option:

    AT90USB162
    This will tell the program what start address and size to use for
    program uploads.

    2. With the Midifighter connected and in Bootloader Mode, connect to the
    device by pressing the "usb cable" icon and selecting "USB", or by
    pressing Ctrl-U. Then select "Open" to connect to the Midifighter.

    (TIP: If you are going to be doing software development on the
    Midifighter, and uploading fresh firmware often, it's useful to
    select the option:

    "Settings/Preferences/Connecting-Closing/Auto-Connect"

    This will save you from having to hit Ctrl-U to connect over USB
    before each firmware upload.)


    3. Load a ".hex" firmware file using the "File/Load Hex File..." option,
    or by hitting Ctrl-L, and navigating to the hex file and hitting "OK".

    4. Select the programming steps "Erase", "Program" and "Verify". This
    will cause the old program data to be removed, the new data to be
    written and then read back to verify that it was successfully uploaded
    to the device. ("Blank Check" is used to verify that the erase
    operation completed successfully and is mainly used to verify that a
    chip is bad.)

    5. Hit the "Run" button to execute the reprogramming.

    6. Restart the Midifighter using the "Start Application" button, making
    sure the "reset" option is selected, or just unplug and replug the USB
    cable. The Midifighter should reset and act as if it has just been
    plugged in. Depending on the purpose of the new firmware you may
    notice no immediate difference, and if the EEPROM version has been
    incremented you may have lost your persistent settings or you may in
    rare situations encounter the "first boot hardware test". Read the
    firmware release notes for more information on the exact behavior to
    expect.

    Note: If you have issues getting FLIP to either run or connect to the MF please try copying the contents of "C:/Program Files/Atmel/Flip 3.4.1/usb" into "C:/Program Files/Atmel/Flip 3.4.1/bin" and copy atlibusbdfu.dll from the bin folder into you windows folder.

    2. PC using the command line.

    If you are developing software for the Midifighter, it's sometimes useful to
    be able to automate the reflashing process. Atmel Flip comes with a
    command-line application for this called "batchisp.exe", and it can be found in
    the same directory as the "flip.exe" binary.

    The simplest way to access this program is to add the directory containing
    the Flip binaries to the $PATH environment variable. For example, if you
    have installed Flip version 3.4.1, the path can be appended using:
    Code:
       > set PATH = %PATH%;"C:\Program Files\Atmel\Flip 3.4.1\bin"
    Reprogramming and rebooting a chip takes three calls of the program. To
    reflash the Midifighter with a firmware file called "myhexfile.hex" you
    would issue these three commands:

    Code:
       > batchisp -hardware usb -device at90usb162 -operation memory EEPROM erase
       > batchisp -hardware usb -device at90usb162 \
                  -operation memory EEPROM loadbuffer myhexfile.hex program
       > batchisp -hardware usb -device at90usb162 -operation start reset 0

    3. Mac
    (Thanks to SarahEmm)

    You will need to download the latest ".hex" firmware from the Midifighter sourceforge site:

    Then your steps are:

    1. Ensure you have the Apple Developer Tools installed (they come on a CD/DVD with new macs/new OSes)
    2. Install MacPorts. An installer can be found at http://www.macports.org/install.php.
    3. Open a Terminal window (found under /Applications/Utilities/Terminal) to get a command line.
    4. At the command line, run
      Code:
      sudo /opt/local/bin/port install dfu-programmer
      to build and install dfu-programmer and dependencies.
    5. Hold down the four corner buttons on your Midifighter and plug in the USB cable.
    6. At the command line, run
      Code:
      dfu-programmer at90usb162 erase &&
      dfu-programmer at90usb162 flash --debug 1 midifighter.hex &&
      dfu-programmer at90usb162 reset
      (without the linebreaks, where midifighter.hex is the name of the new firmware file to be programmed).
    7. Unplug and re-plug your Midifighter to start running the new firmware.



    4. Linux

    Coming soon
    Last edited by midifidler; 05-12-2011 at 04:22 PM. Reason: Extra tip for common FLIP isntall issue

  2. #2
    Tech Wizard
    Join Date
    Jan 2010
    Location
    Shanghai
    Posts
    25

    Default

    whats new in this firmware?

  3. #3
    Tech Wizard jasonmd2020's Avatar
    Join Date
    Jan 2010
    Location
    Middle of frakkin' nowhere Michigan
    Posts
    25

    Default

    You need the new firmware before wiring the extra controls in right?
    "The music business is a cruel and shallow money trench, a long plastic hallway where thieves and pimps run free, and good men die like dogs. There's also a negative side."
    -Hunter S. Thompson

  4. #4
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    The 2010-01-18 firmware has a patch that enables the analog inputs to function correctly:

    http://sourceforge.net/projects/midifighter/files/

    Digital inputs need a pull-up resistor for now until I can enable the internal resistor inside the chip.

  5. #5
    Tech Wizard jasonmd2020's Avatar
    Join Date
    Jan 2010
    Location
    Middle of frakkin' nowhere Michigan
    Posts
    25

    Default

    Just flashed the firmware in & breadboard tested a knob a few days ago. Knob worked perfectly. Fatlimey, thou art a frakkin' genius! Many thanx.
    "The music business is a cruel and shallow money trench, a long plastic hallway where thieves and pimps run free, and good men die like dogs. There's also a negative side."
    -Hunter S. Thompson

  6. #6
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    All part of the service.

  7. #7
    DJTT Moderator Dude Jester's Avatar
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    12,370

    Default

    Hi limey there are a couple spammers around you may wanna slap mate
    Acer E5 i7 2TB 16GB ~ 512GB SSD ~ WIN 10 ~ TSP 2.11 ~ AUDIO 6 ~ X1 ~ DN-X1600 ~ X1 ~ SPECTRA ~ TWISTER ~ ATH-PRO500 MK2 ~ AT2020 MIC

    "This aggression will not stand, man."

  8. #8
    Tech Student
    Join Date
    May 2010
    Posts
    2

    Default

    plz help, im trying to flash my midifighter

    i was following the PC instructions and i installed FLIP, but am stuck now i cant find jungo or update the usb DFU thing.
    and if i try to connect to usb using flip i get an error asking for atlibusbdfu.dll
    i tried to download sum kind of jungo thing, but all i could get is sumthing called WinDriver

    i also tried the mac instructions and installed macports and dev tools.
    after doing the whole " sudo /opt/local/bin/port install dfu-programmer " thing and typing my password i get another error . .

  9. #9
    Tech Student
    Join Date
    May 2010
    Posts
    2

    Default

    sussed it by copying the contents of "C:/Program Files/Atmel/Flip 3.4.1/usb" into "C:/Program Files/Atmel/Flip 3.4.1/bin" and copied the atlibusbdfu.dll from the bin folder into the windows folder. . .

    then was able to continue the steps without error

  10. #10
    Tech Convert
    Join Date
    Mar 2010
    Posts
    6

    Default signed driver for flip

    I needed a signed driver for flip on windows 7 64bit.

    here is a link: http://www.avrfreaks.net/index.php?m...842&showinfo=1

Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •