Closed dkonigsberg closed 2 years ago
As of recent updates, there is now a very basic way of doing this:
$ dfu-util -a 0 --dfuse-address 0x08000000 -D densitometer.bin
A more polished version is going to need a few additions, that may or may not end up as separate issues:
dfuse-pack.py
to make a proper DFU filedfu-util
and some processing of its output.There are now two ways to update on-device firmware, so I think its time to close this issue:
You might want to check out the nanoVNA, The update process is very easy and they use a similar processor. Basically select the file, select the device, and update.
Very interesting project. Looking forward to seeing how this goes almost more than the densitometer itself.
You might want to check out the nanoVNA, The update process is very easy and they use a similar processor. Basically select the file, select the device, and update.
NanoVNA uses DFU. There are a few utilities that can be used to do a DFU update, some easier to get going than others, but none really intended for normal end users. A polished DFU update process would require writing my own wrapper, and then dealing with OS-specific device issues.
The advantage of UF2 is that it requires no special software. Just boot into UF2 mode, the device shows up as a USB mass storage device, drag-and-drop the file to it, and you're done.
While it is the hope that a "launch" version of the device will effectively have finalized firmware, the possibility for future updates to fix bugs and add features will always remain.
Its probably not reasonable to expect average end-users to use an ST-Link with a Tag-Connect cable to install firmware updates on the device. Therefore, another option should be provided.
The biggest issue right now is that the current firmware build (which is not feature-complete, but is close) already uses up most of the available flash on the STM32L052 microcontroller. Furthermore, the built-in bootloader options on this MCU are really not suitable for handling end-user firmware updates.
The solutions to this problem can be broken up into two categories:
Options for a tiny cram-able bootloader include these projects: