How to update firmware
USB bootloader:
There is a USB bootloader in product version of Versaloon.
The bootloader uses VCOM demo code from ST, which emulates a COM Port, and a
STM32 COM ISP protocol is implemented.
So you can update the firmware using any STM32 ISP tools. In
vsprog, there is STM32 ISP support, so you can also use vsprog/vsgui to update
the firmware.
Note that the bootloader locates at 0x08000000 to
0x08001FFFF, application firmware should start from 0x08002000 and can be
56Kbytes in size at max. You can write your application and download to
Versaloon using the bootloader.
For Versaloon Mini hardware, there is a key on the board, you
can press the key down; for Versaloon Nano hardware, connect PIN2(KEY) and
PIN4(P_VREF) of P1 toghether. And then connect Versaloon to PC, the USB
bootloader will be validated. Use stmcdc.inf as driver for the bootloader and
make sure the COM port appears on your PC.
update firmware using vsprog/vsgui:
In bootloader mode, simply run: vsprog -sstm32 -mi -CCOM1 -I
new_firmware.hex -oe -owf -ovf. -sstm32 defines stm32 as target; -mi means ISP
mode; -C is used to defined the comport(COMx under windows, /dev/ttyACMx under
linex); -I is used to define the input hex file.
If application is running, use this command: vsprog -Z
-sstm32 -mi -CCOM1 -I new_firmware.hex -oe -owf -ovf. It only adds a -Z option,
which will tell the application to perform a reset and run bootloader. Note that
the COM1 defined is not current comport, but the comport in bootloader mode
after reset.
Such operation can also be done under vsgui. In bootloader
mode, you can operate it as downloading to a STM32 using "i:ISP" mode. In
application mode, you can update firmware in "FW Update" section in "About"
page. Simply select the hex file for firmware and the comport in bootloader
mode, and then click "Update" button.