How To Flash the Midifighter with New Firmware
How To Flash the Midifighter with New Firmware Posted on: 21.02.2010 by robert chanda How To Flash the Midifighter with New Firmware20100220: 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:
# . . # . . . . . . . . # . . # Code:
* . * . . * . * * . * . . * . * 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 believe 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 DFUdevice. This driver allows connection to the DFU bootloader so that a program can be uploaded. It's a normal driver install involving:
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 forprogram 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" 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:
4. Linux Coming soon | |
Ronald Fallert 01.03.2012 | Seriously why there isn't a compiled firmware to download? I can't get my head around compiling the firmware. I am a musician and not a programer and just wanna be able to use the config plugin!! I would really appreciate if someone could point me to a place where I can download the new firmware in .hex file. thanks |
Ronald Fallert 01.03.2012 | Ok Now the Midifighter is at least working. The only way it worked was by using the Utility tool as if I was flashing a custom firmware. But I still can't use the utility thing as it is suposed to be used. Where can I get the compiled new firmware. I found the new firmware but it is a bunch of files which I don't know what i am supposed to do with that. Where can I find the .hex one? thanks |
Ronald Fallert 01.03.2012 | Could explain me how can I specify the path? |
Adolf Hit 01.03.2012 | What issue did the utility give you? The hex file can be anywhere as long as you specify the correct path |
Ronald Fallert 01.03.2012 | I know but it does not work. The .hex file should be somewhere specific? thanks |
Adolf Hit 01.03.2012 | Try downloading the Midi Fighter Utility - this is much easier that using the command line |
Ronald Fallert 01.03.2012 | I am on Mac OSX 10.7.3. I don't exactly know what you mean by what updater am i using. I am just following the steps from this thread. Is there a exact place where the .hex file should be? or I should I write the path in this line "dfu-programmer at90usb162 flash --debug 1 midifighter-20110204.hex && dfu-programmer at90usb162 reset" thanks |
Adolf Hit 02.03.2012 | The desktop should be fine. What OS are you using? And also what type of updater? |
Ronald Fallert 01.03.2012 | Hey guys, I am having a evening mare here trying to update the firmware using the old method. Where should the .hex file be in my computer so the DFU programmer can find it? I tryed everything and I always get this message "Error opening the file. Something went wrong with creating the memory image." thanks |
Era Roka 12.02.2012 | TNX it worked for me! |
Joella Stottsberry 26.06.2011 | tried 4 corners and switch method and it still not uploading... do you believe it might alredy be updated ..how can i test this? |
Randal Miniter 30.05.2011 | Thanks, Needed that |
Laurena Schlimgen 13.05.2011 | I can't get my midifighter to flash either. I went through all the code Mac steps as described in step 1 from FatLimey. Get to the final step and I receive this message in the terminal: dfu-programmer: no device present. I'll continue working but any sort of assistance is appreciated. Thank You! |
Monty Strauder 04.05.2011 | Is there in alternative to go in boot mode ?! Thats why i cant reflash! |
Harriet Allain 30.04.2011 | Trying to connect my usb in the flip program and wont connect due to no digital signature for the device? |
Britni Fausnight 30.12.2010 | I changed the AT90USB162 and now my own homemade Midifighter works! |
Britni Fausnight 19.11.2010 | Okay, I found the MF-Schematic in Internet. I bought all Parts and downloaded the Sources. I build my MF on a perfboard. Now i try to connect the MF with the PC, but i get the "Unknown Device" Message. I installed Flip and de Windows 7 x64 Drivers. It still doesen't work. Now you i said, i can flash the Bootloader fpr the At90usb162 again. I can use my Arduino as ISP to flash my MF with the new Bootloader. Whether it will work, i don't know. |
robert chanda 19.11.2010 | So you're doing several nonstandard things. 1. You have your own board. 2. You want to flash the Midifighter firmware to a fresh CPU over USB. 3. You seem to be confusing Arduino and Midifighter as essentially the same. 4. You seem to have avrdude and it looks like you know how to use it, but do you have the JTAG pins set up on your target? I'm a little confused how to help you. Either you're comfortable with flashing raw AVR devices in which case you just get the source project and go from there, or you're new to AVR development and are trying to use advanced shortcuts to avoid spending $30 on a real ISP. What are you trying to do *precisely*? What is the end result you are looking for? |
Britni Fausnight 19.11.2010 | You mean, my bootloader doesn't work correctly, and I have to flash the chip with the bootloader again? Can I use any other drivers except atmel flip? I can try to flash the chip with my arduino: avrdude -p at90usb162 -P com7 -c acrisp -b 19200 -v -B10 -F -U flash:w:C:\midifighter\midifighter.hex:a |
robert chanda 19.11.2010 | If you erased the device before flashing, you may have removed the bootloader from the AVR chip. To reinstate it you need a copy of the bootloader (available from Atmel's website) and an ISP - In System Programmer, a piece of hardware that connects to the JTAG pins on the device and allows you to directly inject code onto the chip and set the fuses. This device from Adafruit will do the ISP programming for you. Instructions and tutorials are all on Adafruit.com http://www.ladyada.net/make/usbtinyisp/ http://www.adafruit.com/index.php?ma...products_id=46 |
Britni Fausnight 19.11.2010 | I rebuild the MF and created my own PCB. Now, if i plug in my MF with the AVR to flash the Firmware first time, I got the "Unknown Device" Message. It's an AT90USB162 with the original Bootloader. I tried everything, Flip, the singend Drivers from Flip for Windows 7 x64, but my PC won't communicate with the MF. Can anybody help me? (Sorry for my bad english, i'm german) Greets |
Lorelei Przybylowicz 18.11.2010 | Maybe one for the weekend ! Where are you stuck? Do you have Developer Tools and Mac Ports installed? |
Debbra Sciutto 18.11.2010 | notshy-i havnt figured it out yet a video would be great! |
Dillon Paganini 13.11.2010 | My buddy wants to build a midi controller using an arduino and we were wondering if this firmware could be flashed on to other boards or PCB? |
Lorelei Przybylowicz 01.11.2010 | D-Step - Have you managed to flash it yet? I've just flashed mine using OSX and can help ! Maybe I should make that vid .... |
Debbra Sciutto 13.10.2010 | a video on how to would be great it would make alot of sense to make one, why make a video of the vci firmware update and not your brand controller with your name on it? |
Latrice Boever 13.10.2010 | I got them for free on their website. |
Debbra Sciutto 12.10.2010 | im so lost this whole flashing thing scares the shit outta me to be honest and im stuck at #1 for macs: "Ensure you have the Apple Developer Tools installed (they come on a CD/DVD with new macs/new OSes)" i got my mac as a handy down with no cds :/ |
Shahriar Seyedifar 12.09.2010 | why dose any boddy make a "How to Flash the Midifighter" Video, a super great Article to the Video and Post this to the Dj Tech Tools Home Site ? Is this not Easyer for all Midifighters user? |
Ji Pursel 09.09.2010 | i need a signed driver for my vista install also would that link work pencap? once unzipped how exactly do i install this? iv gotten to the part where i need to update my drivers in the device manager but it doesnt want to let me with unsigned drivers. midifighters died a couple days ago =( edit: ok forget all that just copy the new .dll and stuff into 'atmel/usb'. also doesnt really have to be in checkerboard pattern to flash. totally got it working -cheers- |
Daniell Lessie 10.08.2010 | 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 |
Kelsi Machon 02.07.2010 | 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 |
Kelsi Machon 02.07.2010 | 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 . . |
Latoria Kavulich 27.02.2010 | Hi limey there are a couple spammers around you may wanna slap mate |
robert chanda 27.02.2010 | All part of the service. |
Thersa Nearn 27.02.2010 | Just flashed the firmware in & breadboard tested a knob a few days ago. Knob worked perfectly. Fatlimey, thou art a frakkin' genius! Many thanx. |
robert chanda 23.02.2010 | 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. |
Thersa Nearn 24.02.2010 | You need the new firmware before wiring the extra controls in right? |
Melania Wollenhaupt 21.02.2010 | whats new in this firmware? |
<< Back to MIDIfighter Resources and DiscussionReply