Difference between revisions of "Firmware Update"
Line 24: | Line 24: | ||
== Using medusa.inf or stmcdc.zip == | == Using medusa.inf or stmcdc.zip == | ||
In case of Windows 10 and newer nothing needs to be done and any CDC device is automatically recognized, but in case of older Windows systems user has to manually assign driver (usbser.sys in this case) to specific device (Medusa in this case). By default Medusa in "device manager" | In case of Windows 10 and newer nothing needs to be done and any CDC device is automatically recognized, but in case of older Windows systems the user has to manually assign a driver (usbser.sys in this case) to a specific device (Medusa in this case). By default Medusa is shown in "device manager" as an "unrecognized device". To allow Windows to use usbser.sys you need to: | ||
=== Option 1 - using unsigned medusa.inf file === | === Option 1 - using unsigned medusa.inf file: === | ||
# go to "device manager" and find Medusa under "other devices" | # go to "device manager" and find Medusa under "other devices"; | ||
# right click on it and pick "update driver software..." and then "browse my computer for driver software" | # right click on it and pick "update driver software..." and then "browse my computer for driver software"; | ||
# click "browse" button and select catalog with "medusa.inf" file that you downloaded from this page and then click "next" button | # click the "browse" button and select the catalog with the "medusa.inf" file that you downloaded from this page and then click the "next" button; | ||
# you see red warning that file you are going to use can be dangerous (because this inf file is not signed) - pick "install this driver software anyway" | # you will see a red warning that the file you are going to use can be dangerous (because this inf file is not signed) - pick "install this driver software anyway". | ||
=== Option 2 - using signed, universal stmcdc.zip file === | === Option 2 - using signed, universal stmcdc.zip file: === | ||
# unzip stmcdc.zip file | # unzip the "stmcdc.zip" file; | ||
# go to "device manager" and find Medusa under "other devices" | # go to "device manager" and find Medusa under "other devices"; | ||
# right click on it and pick "update driver software..." and then "browse my computer for driver software" | # right click on it and pick "update driver software..." and then "browse my computer for driver software"; | ||
# pick option "let me pick from a list of available drivers on my computer" | # pick the option "let me pick from a list of available drivers on my computer"; | ||
# if windows asks you to choose device type - just click "next" | # if windows asks you to choose a device type - just click "next"; | ||
# | # in the next window click on "Have disk..."; | ||
# click "browse" button and select 'stmcdc.inf' in 'stmcdc' folder | # click the "browse" button and select 'stmcdc.inf' in the 'stmcdc' folder; | ||
# | # click "ok" and then "next"; | ||
# Windows will inform you that this driver might not be good for | # Windows will inform you that this driver might not be good for the selected device (because it is a universal driver for all STM32 CDC devices - not specifically for Medusa, but it works perfectly ok) - press the "yes" button. | ||
In both cases you should see new COM port in your system. In case of using medusa.inf you will see "Medusa CDC serial port" and in case of using stmcdc.zip you will see "STMicroelectronics Virtual COM Port" - it doesn't matter. In both cases medusa firmware update software should work | In both cases you should see a new COM port in your system. In case of using medusa.inf you will see "Medusa CDC serial port" and in case of using stmcdc.zip you will see "STMicroelectronics Virtual COM Port" - it doesn't matter. In both cases the medusa firmware update software should now work without any problems. | ||
== To brick or not to brick == | == To brick or not to brick == | ||
Firmware in Medusa is divided into two parts - simple updater (let's call it part A) and the main program (call it part B). | Firmware in Medusa is divided into two parts - a simple updater (let's call it part A) and the main program (call it part B). | ||
Part A updates part B (plus FPGA core) and part B updates part A | Part A updates part B (plus FPGA core) and part B updates part A | ||
The boot code in Medusa checks checksums of both parts. If both checksums are correct then it jumps to part B (or part A when the "right" button is pressed). If only one of them is correct then it jumps to this part directly. This design prevents device "bricking". Even if you loose power during Medusa firmware update, after you turn it back on it will just use the valid part of the firmware. You will only need to run the updater again to complete the procedure. |
Revision as of 14:39, 2 March 2023
Firmware Update
- Download firmware from Medusa Firmwares Page. Firmware updater is a binary application that will update the firmware automatically. Binaries are available for Linux (64bit binary for Intel), Max OS X (Intel and ARM binaries) and Windows (32bit and 64bit binaries for Intel).
- Make sure that Medusa has been correctly detected by your operating system. Medusa uses standard "virtual serial port" (CDC) protocol on USB, so usually it should work without any drivers on Linux, Macos and Windows 10+. In case of Window 8.1 and older you need this file: medusa.inf (unsigned file specifically designed for Mesusa) or this file: stmcdc.zip (signed driver for all CDC devices with stm32 chips). See below how to use those files.
- Run the application. On the console you should see something like this (typically it takes less than 10 seconds):
$ ./firmware_updater_macosx_arm firmware leng: 170328B Found port: /dev/cu.usbmodemF2ECEB871 port: /dev/cu.usbmodemF2ECEB871 - main app Sending fwupdater data ...................................... Sending fwupdater hmac Found port: /dev/cu.usbmodemF2ECEB871 port: /dev/cu.usbmodemF2ECEB871 - updater Sending main code data ................................................................................................................................... Sending main code hmac Sending fpga core data ........................................................................................................................................................................ Sending fpga core hmac
Using medusa.inf or stmcdc.zip
In case of Windows 10 and newer nothing needs to be done and any CDC device is automatically recognized, but in case of older Windows systems the user has to manually assign a driver (usbser.sys in this case) to a specific device (Medusa in this case). By default Medusa is shown in "device manager" as an "unrecognized device". To allow Windows to use usbser.sys you need to:
Option 1 - using unsigned medusa.inf file:
- go to "device manager" and find Medusa under "other devices";
- right click on it and pick "update driver software..." and then "browse my computer for driver software";
- click the "browse" button and select the catalog with the "medusa.inf" file that you downloaded from this page and then click the "next" button;
- you will see a red warning that the file you are going to use can be dangerous (because this inf file is not signed) - pick "install this driver software anyway".
Option 2 - using signed, universal stmcdc.zip file:
- unzip the "stmcdc.zip" file;
- go to "device manager" and find Medusa under "other devices";
- right click on it and pick "update driver software..." and then "browse my computer for driver software";
- pick the option "let me pick from a list of available drivers on my computer";
- if windows asks you to choose a device type - just click "next";
- in the next window click on "Have disk...";
- click the "browse" button and select 'stmcdc.inf' in the 'stmcdc' folder;
- click "ok" and then "next";
- Windows will inform you that this driver might not be good for the selected device (because it is a universal driver for all STM32 CDC devices - not specifically for Medusa, but it works perfectly ok) - press the "yes" button.
In both cases you should see a new COM port in your system. In case of using medusa.inf you will see "Medusa CDC serial port" and in case of using stmcdc.zip you will see "STMicroelectronics Virtual COM Port" - it doesn't matter. In both cases the medusa firmware update software should now work without any problems.
To brick or not to brick
Firmware in Medusa is divided into two parts - a simple updater (let's call it part A) and the main program (call it part B).
Part A updates part B (plus FPGA core) and part B updates part A
The boot code in Medusa checks checksums of both parts. If both checksums are correct then it jumps to part B (or part A when the "right" button is pressed). If only one of them is correct then it jumps to this part directly. This design prevents device "bricking". Even if you loose power during Medusa firmware update, after you turn it back on it will just use the valid part of the firmware. You will only need to run the updater again to complete the procedure.