SmartDisk II · User documentation · Latest firmware
How to put a new firmware on your SmartDisk II over USB (drag and drop a UF2 file), which file to take for the standard board and for the XL board, how to install the bootloader with an ST-Link, how to check the version, and how to go back.
← SmartDisk II documentation home · Page 4 of 16
On this page — 12 sections
Two programs are on the flash of your board: a bootloader (version 0.21) and the firmware (the latest release). You update the firmware over USB: you drag a .UF2 file onto a drive that the bootloader shows on your computer. You install the bootloader itself only once, with an ST-Link programmer. The configuration is on the SD card, not on the board, so a firmware update does not touch it (The SD card).
Warning. Never connect the ST-Link programmer at the same time as USB or the Apple II. Its voltage regulator is fragile. The silkscreen of the board says “ONLY 1 PWR SRC” (Hardware and installation, Power).
Which file for which board
| Board | Firmware file |
|---|---|
| SmartDisk II (revisions 8 and 9: 0.96 inch OLED, four keys) | the standard firmware |
| SmartDisk II XL (revision 10: 1.54 inch OLED, rotary encoder) | the XL firmware |
The two files are not interchangeable. Check that you pick the one for your board. The XL board uses the same bootloader and the same update procedure as the standard board.
Which method
| Method | What you need | When |
|---|---|---|
| UF2 over USB | the bootloader already on the board; a USB cable and a computer | every normal update |
| ST-Link (bootloader) | an ST-Link programmer and a header soldered on J6 | a board without bootloader (a board you built), or to change the bootloader |
There is no update from the SD card and none from the Apple II.
Where the files are
Download the firmware from the SmartDisk Firmware page: the releases are there as .UF2 files. The bootloader files are there too (bootloader_smartdisk_v0.21: .hex, .bin and .elf).
Before you start
- Note the version you have. See “Check the version” below.
- Copy the SD card, or at least
sdiskConfig.json(favorites, settings, last image, the four SmartPort volumes) to your computer. The file is at the root of the card. - Get the
.UF2file of the version you want for your board, and keep the one you have now, to go back. - Check the bootloader. The firmware needs bootloader v0.21. Do not use v0.15: it causes problems with the SmartPort of the IIgs. v0.21 is the latest. To see which bootloader you have, enter DFU mode (below): its version is on the OLED.
- Power. Update with the board out of the Apple II or the Macintosh. Remove the jumpers on
J1andJ7, so that USB is the only power source (Hardware and installation, Power).
The update over USB (UF2 drag and drop)
- Connect the board to your computer with a USB cable (the USB connector of the BlackPill module).
- Press the NRST (reset) button of the BlackPill twice, quickly: the second press must come within half a second of the first. At every reset the bootloader waits half a second before it starts the firmware. A second reset during that wait puts it in DFU mode. A single reset starts the firmware as usual. If your board is in its case, the case has a reset key for this.
- The board shows as a USB drive named DISKIIBOOT. It holds
INFO_UF2.TXT,INDEX.HTMandCURRENT.UF2. The OLED shows SMARTDISK II BOOTLDR, DFU MODE and the version of the bootloader (the display is optional: the drive appears even when the OLED stays blank). - Copy the
.UF2file onto that drive. The bootloader writes the firmware into the flash as the blocks arrive. It accepts only UF2 files made for the STM32F4. It ignores any other file, a.binfor example. - When the copy is complete, wait. The bootloader checks that your computer has finished writing, restarts the board by itself and starts the new firmware after its half second wait. The drive disappears and the splash shows on the OLED.
- Unplug the USB cable. Check the version (below).
What the update does not touch
- The bootloader. The bootloader write-protects its own flash sectors, and it ignores every UF2 block that is addressed outside the firmware area (
0x08010000to0x0807FFFF). A UF2 file cannot overwrite it. - The SD card and everything on it. The firmware never writes the configuration into the flash.
Installing the bootloader with an ST-Link
You need this only for a board that has no bootloader (for example a board you built), or to change the bootloader. No other power source may be connected to the board.
What you need: an ST-Link V2, 4 wires, the J6 header soldered on the board (the assembly house does not fit it), and the bootloader file bootloader_smartdisk_v0.21.hex (or .bin).
Wiring:
Board J6 pin | Silkscreen | ST-Link |
|---|---|---|
| 1 | 3V | 3.3V |
| 2 | SDIO | SWDIO |
| 3 | SCK | SWCLK |
| 4 | GND | GND |
The reset line of the board is not on J6. The board takes its 3.3 V from the ST-Link: J1 and J7 stay open.
- Wire the ST-Link to
J6as in the table. Connect nothing else: no USB, no Apple II. - Run OpenOCD with the
.hexfile:
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg \
-c "init" -c "reset init" -c "flash protect 0 0 last off" \
-c "program bootloader_smartdisk_v0.21.hex verify reset exit"
The command removes the write protection of the first two flash sectors, writes the bootloader and verifies it. The bootloader sets the protection again the first time it starts. With another tool, write the .bin at address 0x08000000.
- Remove the ST-Link and the wires.
- Connect USB only and do the UF2 update above to put the firmware on the board.
On a chip with no valid firmware, the bootloader goes straight to DFU mode, ready for the .UF2 file.
Check the version
- The splash at power up shows the version at the bottom right, for about half a second (the release number followed by two digits).
- The footer of the image menu and of the directory options shows the version too.
- The log: with Settings > Log to SD on, each start writes
---- SmartDisk II vX.YY.NN, run started ----intoSMARTDISK.LOGat the root of the card. The same log comes out on the UART headerJ4, 460800 baud. - The first part,
vX.YY., is the release. The two digits after it are a build number. A release file is named with its own number.

After the update
- Power the board and watch the splash: the version is the one you installed.
- The main menu appears. Your settings, favorites, last image and SmartPort volumes are read from
sdiskConfig.jsonon the card. Check them (Favorites, File manager, Settings). - A setting that your old configuration does not have takes its default: 5.25 write on, Autoboot last img on, the other new options off. The Settings list shows only the options of the emulation that runs (Settings reference, Firmware release notes).
- Mount an image and boot a machine, as in Usage guide. On a IIgs, test the emulation you use: SmartPort is the most sensitive to timing.
What an update does to the configuration
| Case | Result |
|---|---|
| Update from an older release, normal file | read as it is. The absent keys take their defaults. The file is rewritten at the next save with the new keys |
| An old file that was cut at 1024 bytes | Every firmware up to v0.80.45 wrote at most 1024 bytes of the file. A longer text was cut, and a cut file is not valid. The firmware uses the defaults and leaves the file as it is until your first save, which replaces it. Favorites beyond the cut are already lost |
| Going back to v0.80.x | v0.80.45 reads at most 2048 bytes of the file. A longer file written by the firmware is cut there, and the old firmware then replaces it with the defaults. Put your backup copy of sdiskConfig.json back after the downgrade |
| Clear prefs (Settings, ENTER, ENTER) | deletes sdiskConfig.json and restarts: defaults for everything, empty favorites and volumes. Your images are not touched |
| A configuration that stops the board | an emulation type that does not exist is replaced by Disk II at start. Delete the file on a computer if needed |
If the update fails
| Symptom | What to try |
|---|---|
No DISKIIBOOT drive after the double press | Press NRST twice again, a little faster. Try another USB cable (one with data lines) and another USB port |
| The copy was interrupted and the board does not start | Press NRST twice to enter DFU mode and copy the .UF2 file again. A board with no valid firmware stays in DFU mode |
| The board starts, then the screen stays black | The display recovers by itself: the board tries it again every 5 seconds. See Troubleshooting, FAQ and the log |
| The board no longer enters DFU mode | Install the bootloader again with an ST-Link, as above |
| The Apple II no longer boots a disk after the update | See Compatibility. Go back to the previous release |
Going back to an older release
- Take the
.UF2file of the older release. - Do the update above with that file: press NRST twice and drag the older file onto the drive. No change of bootloader is needed.
- Restore the copy of
sdiskConfig.jsonthat you made before, see the table above. - Check the bootloader: v0.21. A board with the v0.15 bootloader has problems with the IIgs SmartPort whatever firmware runs.
- Remember what an older firmware does not have: the Macintosh and 3.5 inch drive emulation, Create disk, the settings that follow the emulation, Log to SD. It ignores their keys in
sdiskConfig.json.
The bootloader
- At each reset a double press enters DFU mode, a single one starts the firmware, and a board with no valid firmware stays in DFU mode.
- The firmware has no key combination and no menu entry to enter DFU mode: you always use the NRST button.
- You update the bootloader only with an ST-Link, as above.
Building the firmware yourself
This part is for people who build the firmware. If you only install releases, skip it.
The images to use are built with CMake presets:
| Preset | Board |
|---|---|
bootloader | standard board |
bootloader-xl | XL board |
cd firmware
cmake --preset bootloader-xl # or: cmake --preset bootloader
cmake --build --preset bootloader-xl -j 8
cmake --build --preset bootloader-xl --target uf2
The result is in the folder build-cmake/<preset>/, with the .UF2 file for the bootloader. The UF2 file is made from the hex file with the family id 0x57755A57. The target flash writes the image with an ST-Link instead.
In this layout the vector table of the firmware is at 0x08010000 and the code starts at 0x08018000, above the bootloader.
The presets standard and standard-xl build a different layout, without bootloader: the image is linked at 0x08000000 for the whole flash. Written with an ST-Link, it replaces the bootloader. Do not use it on a board that has the bootloader.
Related: Hardware and installation for the board and the J6 header.
← Previous
Next →
SmartDisk II user documentation · latest firmware · Documentation home