This version (23 Aug 2023 13:03) was approved by Adrian Suciu.The Previously approved version (29 Jan 2021 20:12) is available.Diff

ADALM2000 (M2K) Firmware Updates

The easiest way to update the firmware is to use the mass storage device included in the default image. There are times when this might not be possible (when you aren't using the default image).

There are very legitimate Security Risks about loading random firmware images onto devices like the ADALM2000, however, we decided early on that a learning tool must be open and accessible for people to experiment on. Please only use firmware images you have received from trusted locations.

ADI default firmware images:

This zip file should include these files:

Filename Purpose
boot.dfu DFU file for First Stage Boot Loader, and U-Boot
boot.frm Firmware file for First Stage Boot Loader, U-Boot and it's default environment
m2k.dfu DFU file for M2k Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system
m2k.frm Firmware file for M2k Firmware, this would include FPGA Bit File, Linux kernel (all drivers), and ram based file system
uboot-env.dfu DFU file which includes the default U-Boot environment

Mass Storage Update

Copy the m2k.frm file onto the mass storage device, and then eject it. LED1 will start blinking rapidly.

Don't disconnect the device until rapid blinking stops!


  1. Open the M2K mass storage device
  2. Download and open the firmware file
  3. Copy the file to the Mass Storage device
  4. Eject (don't unplug) the M2K mass storage device via the context menu of the associated drive available in the file explorer.
    1. Windows (only eject as shown below!)
  5. This will cause LED1 to blink rapidly. This means programming is taking place. Do not remove power (or USB) while the device is blinking rapidly. It does take approximately 4 minutes to properly program the device.
  6. Still do not unplug things. Try to be more patient.
  7. Once the device is done programming, it will re-appear as a mass storage device.
  8. Now you can unplug it, and use it as normal.



Command Line

It's exactly the same as the GUI instructions, copy it, and then eject it, then power cycle it. It's a little more tricky since eject needs the base device (it wants /dev/sdb not /dev/sdb1).

analog@imhotep:~/m2k$ cp ./m2k.frm /media/analog/ADALM2000/
analog@imhotep:~/m2k$ mount | grep ADALM2000 | awk '{print $1}'
analog@imhotep:~/m2k$ sudo eject /dev/sdb

DFU Update

USB Device Firmware Upgrade (DFU) is an official USB device class specification of the USB Implementers Forum. It specifies a vendor and device independent way of updating the firmware of a USB device. The concept is to have only one vendor-independent update tool as part of the operating system, which can then (given a particular firmware image) be downloaded into the device. During the firmware upgrade operation (when the M2K is in “DFU” mode), the M2K change its operating mode ( no longer uses it's standard PID/VID, but becomes a flash programmer).

Entering DFU mode

How to manually enter DFU mode?

In general the preferred firmware upgrade is via the mass storage device. There are 3 ways to enter the DFU mode manually:

  1. Press and hold the device button with a toothpick, paper-clip or similar while applying power by plugging in the USB cable.
  2. From the device linux console type device_reboot sf. There are three ways to access the linux console:
    1. The USB console USB CDC ACM aka. ttyACM0 using putty, minicom, tera Term, etc.
    2. The UART console using ADALM-JTAGUART.
    3. The network console using ssh/slogin.
  3. Directly from u-boot serial console type: run dfu_sf. Access to the uboot command console is only available using ADALM-JTAGUART

When does the device automatically enter DFU mode?

The device enters DFU mode in case booting the multi component FIT image (Flattened Image Tree) fails. This may happen due to checksum failure caused by a corrupted previous firmware update.

How can I check if the device is in DFU mode?

When the device is in DFU mode, the DONE LED is OFF, while LED1 is constantly ON.

Update using DFU mode

How to update the firmware using DFU mode? How to rewrite the default uboot environment?


The M2K driver package bundles also a dfu utility. There is a windows command console batch script called UPDATE.BAT which eases the update procedure.

  1. Download and save UPDATE.BAT
  2. Download and unzip the latest M2k release M2k Release
  3. Open a windows command prompt
  4. Execute UPDATE.BAT with the path to the m2k.dfu file. (In case you need to rewrite the default uboot environment the use the uboot-env.dfu file)
  5. Wait for the script to complete
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\tmp>UPDATE.BAT c:\tmp\m2k.dfu
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

Opening DFU capable USB device...
ID 0456:b674
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download        [=========================] 100%      8694467 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(2) = dfuIDLE, status(0) = No error condition is present



dfu-util -a firmware.dfu -D m2k.dfu

m2k.dfu is your firmware file in the dfu format.


dfu-util does not come with a default OSX install. You can install it with brew as:

brew install dfu-util

Updating the firmware is the same as Linux:

dfu-util -a firmware.dfu -D m2k.dfu

m2k.dfu is your firmware file in the dfu format.

university/tools/m2k/common/firmware.txt · Last modified: 21 Aug 2023 15:25 by Adrian Bogdan Stanea