Despite is feasible to upload sketches to olimexino-stm32 board using a classical USB to TTL Serial module (remember to set the switch or jumper to 3V3!!) it is more convenient to upload them with direct connection between the olimexino stm32 board and a USB port of a computer. To do so it is required a bootloader. Fortunately the great team and individuals STM32duino community, branching the excellent job of Leaflabs (smart MIT people), prepared one. This steps are essentially those of this link: http://wiki.stm32duino.com/index.php?ti … bootloader
Download the ST FlashLoaderDemonstration Tool from this site http://www.st.com/content/st_com/en/pro … stm32.html This tool manages flash memory pages of the STM32FXXX chips. It helps to erase the whole memory and flash a new .bin firmware.
Now an important step i got stuck as there are some different criteria in this forum regarding the Olimexino-STM32 board. Go to https://github.com/rogerclarkmelbourne/ … y_binaries. These are the bootloader binaries with no sketch on it. It has been updated “recently” and just takes 7 kbytes. it’s been improved (RAM and so…).The key point is to select the suitable binary for olimexino-stm32 board. After testing others, the one that perfectly works for me is “generic_boot20_pa1.bin”. Olimexino board has a secondary led in PA1 (yellow one) therefore you can see when the board is running in boot mode or executing the uploaded program.
Be reminded that olimexino-stm23 comes with a Maple bootoader pre-installed. So that if you just plug the USB to power the unit on it flashes the green led. We are going to replace this bootloader with the STM32duino bootloader, so that we can upload new sketches from direct USB connection from our Arduino IDE
Set the USB to TTL Serial board voltage switch to 3V3!!!. Connect it to the the olimexino-stm32 UEXT (check pdf manual https://www.olimex.com/Products/Duino/S … -STM32.pdf) connector so that:
Serial Board UEXT
GND — ————–GND (pin 2)
RX —————– TX (pin 3)
TX —————– RX (pin 4)
It is better if you do not connect VCC (pin1) as the olimexino-STM32 board will be powered from the USB to Serial Module…
Connect the USB Serial board to a free USB port in the PC. (Do not power the olimexino board yet). After connecting open windows device manager to check if a new Virtual COM port has been installed. This Virtual COM port corresponds to the USB to Serial board. If it does not appear (strange) check drivers and so. Windows shouid manage that setup by itself (it is a common driver). Leave the Device Manager open.
Now power up the olimexino board. I recommend to not use a free USB port from your PC as you could be confused with new hardware not configured yet. Better use an external cell phone charger. After powering up, if this is the first time you are about to flash it, the green led should flash 6 times. This is due to the Maple bootloader all boards come with.
Now put the board in perpetual boot mode. To do so you just need to keep reset button pushed (close to the LiPO connextor) and meanwhile push also the “button” (close to the mini usb connector). Keep the button pressed while you release the reset button, so that the board reboots with button pressed (forcing the BOOT0 line of the chip set at HIGH). It does not need to be kept for a long time (a couple of seconds to the most). Release the button. The board won’t flash the green led. Therefore you know that it is not running the program but it is in perpetual boot mode.
Run the ST FlashLoaderDemonstration Tool. Select the COM Port corresponding to the UBS Serial Board you checked before with the Device Manager. Leave the rest of the settings to their default values (some sites recommend to lower the speed to 19200, but I have sucessfully flashed the bootloader several times at 115200)
Press “Next” button twice till you see the commands selector window (erase, file selector etc). Choose the generic_boot20_pa1.bin. (You would need to change the file extension file to *.bin instead of *.s19). If the tool stalls before reaching the command window, repeat setting the perpetual bootloader mode.
Execute the flash command. Unplug the serial board and power cycle the olimexino.stm32 board by directly connecting to the USB PC port. You will see that now the yellow led flashes few times (instead of the green one). The unit will not be detected by windows because it needs a special driver.
Go to https://github.com/rogerclarkmelbourne/ … er/drivers download the win directory that contains the drivers. Run the “install_drivers.bat”. It actually does not install any new driver but helps windows to link USB reference to the serial driver and names it.
Unplug and replug the board so that we help windows to check for new devices. Open device Manager a new libusb device collection would appear with Maple DFU inside.
The board is ready to be uploaded sketches through USB