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 |
Copy the m2k.frm
file onto the mass storage device, and then eject it. LED1 will start blinking rapidly.
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.
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}' /dev/sdb1 analog@imhotep:~/m2k$ sudo eject /dev/sdb
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).
In general the preferred firmware upgrade is via the mass storage device. There are 3 ways to enter the DFU mode manually:
device_reboot sf
. There are three ways to access the linux console: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.
When the device is in DFU mode, the DONE LED is OFF, while LED1 is constantly ON.
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.
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 http://sourceforge.net/p/dfu-util/tickets/ 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 Done! C:\tmp>
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.