Firmware Update
Please remember it is always wise to make FAT disk backups periodically and especially before any update. |
The latest firmware version is available at https://technical.swissmicros.com/{webdir}/firmware/ |
For quick update instructions, please follow Quick Update Guide.
The preferred firmware update method is by copying firmware file to calculator FAT disk. See Quick Update Guide for update procedure.
Firmware update from FAT disk is implemented in main firmware, so it could be unavailable if the main firmware is corrupted. In such a case, another method of update based on internal CPU flashing routine should be used. This method requires the calculator to be switched in so called 'Bootloader mode'. Once activated, the internal bootloader exposes standard DFU interface and can be programmed by any DFU programming software.
Following sections cover the use of two programs able to use this DFU interface:
Availability of the particular update method on mainstream operating systems outlines following table:
FAT disk[1] | dm_tool | dfu-util[2] | |
---|---|---|---|
Windows |
✓ |
✓ |
✓ |
Linux i686 |
✓ |
✓ |
✓ |
Linux x86_64 |
✓ |
✓ |
✓ |
macOS |
✓ |
✓ |
[1] FAT disk update was made available starting with DMCP version 3.5; therefore, a calculator with an earlier firmware version must be updated with one of the other methods.
[2] macOS users can get dfu-util via Homebrew.
Quick Update Guide (FAT disk update)
- Prerequisites
-
{fwtmpl}
- Complete {platform} firmware file e.g.{fwfile}
Steps
-
Activate USB disk from
SETUP → File → Activate USB Disk
or alternatively from DMCP System menu. -
Connect USB cable from {platform} to PC/Mac computer.
-
Copy the
{fwtmpl}
file from the PC/Mac computer to root folder of calculator disk. -
Eject (safely remove) the calculator disk from PC/Mac computer. Please, be patient this can take some time. Do not unplug the cable, even after the calculator’s USB disk has been successfully ejected by the OS, as USB power is required for the rest of the procedure.
-
If calculator does not detect OS ejection, shut down USB connection by pressing btn:[C]. New firmware file is detected and the calculator prompts for update. Confirm it immediately with btn:[ENTER] or cancel by pressing btn:[EXIT] to activate flashing process later using
Flash firmware from FAT
either from {platform} programSETUP → System
or directly from DMCP System menuEnter System Menu
. -
Flash progress is displayed from 0 to 100%. An automatic verification pass follows.
-
Once finished, the calculator resets and should restart to updated {platform}.
Any State which hasn’t been saved to a Statefile prior to updating is lost. |
Bootloader mode activation
Bootloader mode can be activated from main Setup menu: SETUP → System → Bootloader
or by using RESET and PGM button.
The sequence of entering bootloader mode using RESET and PGM button is:
-
Press and hold PGM button
-
Press and release the RESET button
-
Release the PGM button
FW Update Using dm_tool
The latest version of dm_tool can be downloaded from
the Tools web page.
|
Prerequisites for Windows
Install libusb driver as described here: http://technical.swissmicros.com/doc/libusb_install/libusb_install.html.
Prerequisites for Linux
USB device access rights: this configuration is optional.
Allow access to the DFU device for users in plugdev
group by running as root:
cd /etc/udev/rules.d/ cat << OI > 49-stm32-dfuse.rules # This is udev rules file (place in /etc/udev/rules.d) # Makes STM32 DfuSe device accessible to the "plugdev" group ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="664", GROUP="plugdev" OI udevadm control --reload-rules
Then add users to plugdev
group.
Launching dm_tool
- Switch the calculator to bootloader mode
-
From menu or by RESET+PGM buttons (see Bootloader mode activation).
- Connect the calculator to the PC
-
Be sure the libusb driver is installed if used in Windows (http://technical.swissmicros.com/doc/libusb_install/libusb_install.html).
- Launch
dm_tool
-
It can be launched by clicking on the exe file or from command line with firmware filename as argument.
If everything works well and the calculator was connected before launching dm_tool
,
then the message on the right side of [Program] button should show device number.
If it shows "No DFU capable devices found (Click to refresh)" try to click at the message
and it should display the ID of connected device after refresh and
Memory layout: 0x8000000-0x80fffff: size 1024kB = 512*2kB pages
in the text area.
If the message "No DFU capable devices found" still remains there something is wrong with libusb driver installation or connection to the calculator or the calculator isn’t in bootloader mode.
Finally press the [Program]
button to flash new firmware.
When the update is completed, you can close dm_tool, then Press [ON]
to launch the new f/w.
FW Update Using dfu-util
macOS users can get dfu-util via Homebrew |
Linux users (and possibly macOS users too) can avoid sudo use by setting appropriate user rights
for DFU interface, see user rights configuration for Linux.
|
Note that dfu-util
is command line utility launched from a terminal application and controlled by commands from the console.
For new users, here are some tutorials on how to use command-line interfaces:
Proceed with the following steps:
- Switch the calculator to bootloader mode
-
From menu or by RESET+PGM buttons (see Bootloader mode activation).
- Connect the calculator to the computer
-
List information about connected DFU device using console command
sudo dfu-util -l
Sample output of this command (from macOS)
$ sudo dfu-util -l Password: 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/ Deducing device DFU version from functional descriptor length Found Runtime: [05ac:828b] ver=0149, devnum=6, cfg=1, intf=3, path="29-1.8.1.3", alt=0, name="UNKNOWN", serial="UNKNOWN" Found DFU: [0483:df11] ver=2200, devnum=14, cfg=1, intf=0, path="20-4", alt=2, name="@OTP Memory /0x1FFF7000/01*0001Ke", serial="207B35994E34" Found DFU: [0483:df11] ver=2200, devnum=14, cfg=1, intf=0, path="20-4", alt=1, name="@Option Bytes /0x1FFF7800/01*040 e/0x1FFFF800/01*040 e", serial="207B35994E34" Found DFU: [0483:df11] ver=2200, devnum=14, cfg=1, intf=0, path="20-4", alt=0, name="@Internal Flash /0x08000000/512*0002Kg", serial="207B35994E34"
Where lines
Found DFU: [0483:df11]
indicate that calculator is correctly connected to the computer and switched into bootloader mode. - Prepare firmware file
-
Download the latest firmware file from https://technical.swissmicros.com/{webdir}/firmware/ and ensure it is accessible from current directory in console e.g. by
ls -l {fwfile}
.Alternatively, download firmware file directly to current directory using command (edit to use correct firmware file name according to before-mentioned page)
curl -O https://technical.swissmicros.com/{webdir}/firmware/{fwfile}
- Launch dfu-util command
-
Start flashing using command (edit to use correct firmware file name)
sudo dfu-util -D {fwfile} -d 0483:df11 -a "@Internal Flash /0x08000000/512*0002Kg" -s 0x8000000
Please, be patient, as the operation takes some time (up to a few minutes).
Press RESET button after
dfu-util
finishes the flashing.
Example output of dfu-util
$ dfu-util -D {fwfile} -d 0483:df11 -a "@Internal Flash /0x08000000/512*0002Kg" -s 0x8000000
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/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting # 0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 756288
Download [=========================] 100% 756288 bytes
Download done.
File downloaded successfully
real 1m55.929s
user 0m0.044s
sys 0m0.048s