Getting Started Guide Flashing With The Bootloader

From OpenMBD
Jump to: navigation, search


This chapter describes the steps that have to be taken to flash the controller by CAN or USB. This is only possible in combination with an Olimexino that has the correct bootloader. If you don't have a board with the correct bootloader you will need to install it with a flash tool like the ST-Link. To flash the bootloader onto the Olimexino please follow the steps in chapter 5.3 Flashing the controller with the ST-Link.

Flashing the controller via USB

It is possible to flash the Olimexino via the CANbus or via an USB connection. This paragraph describes how to flash the Olimexino using USB.
Downloading the software program to the flash memory of the microcontroller can be done with the MicroBoot utlity. Before continuing, make sure that:
• The board is connected to the PC’s USB port.
• Power is supplied to the Olimexino board.
• The Olimexino has the correct bootloader on it

GettingStartedGuideSTM32 ResetButton.png

Install bootloader driver

To install the driver the program should be kept in bootloader mode. This is achieved by having D2 pulled down to ground with at least a 150 Ohm resistor(max 820 Ohm), while resetting the microcontroller using the RESET-button. The first time the USB is activated on a different PC, Window’s will ask you to install the USB driver. The driver can be found here.

Quoting OpenBLT:
Before installing the USB driver, make sure the USB device that runs the OpenBLT USB bootloader is not connected to your PC. If a prior version of the USB driver was installed, it is recommended to first uninstall this driver. The installation of the USB driver is performed using the Zadig tool. You can download the necessary files here: OpenBLT USB Driver Package. After downloading the OpenBLT USB Driver Package, unzip the archive to a location of your liking and start the program zadig_2.2.exe. From the program menu, select Device → Load Preset Device and select the file openblt.cfg, which is found in the same directory as where zadig_2.2.exe is located. Next, click the Install Driver button to install the USB driver for the OpenBLT bootloader:

GettingStartedGuideSTM32 USBbootloaderInstallation.png

After successfully completion of the USB driver installation, you can plug in the USB device that runs the OpenBLT USB bootloader. Windows will automatically detect the USB device and map it to the newly installed USB driver. You can verify the correct USB driver installation and USB device detection using the Device Manager in Windows. You should see an entry for WinUSB Bulk Device, without a yellow exclamation mark in the icon:
GettingStartedGuideSTM32 USBbootloaderInstallationDeviceManager.png

Flash using Mircoboot

Start the MicroBoot utility. It can be found in ‘\Host\MicroBoot\MicroBoot.exe’. Click the Settings-button and select ‘OpenBLT using USB’, and click the OK-button to save the settings.
Next, click the Browse-button to select the .srec file (Motorola S-Record file) of the software program. The one from the demo model is located at ‘\Target\HANcoder_Olimexino.srec’.
GettingStartedGuideSTM32 USBflashProcedure.png

Once selected, the firmware update with the bootloader is started. It might be necessary to reset the controller. The progress is shown in the main screen. Upon completion, the newly flashed software program is automatically started.
GettingStartedGuideSTM32 USBflashProgress.png

Flashing the controller via CAN

It is possible to flash the Olimexino via the CANbus or via an USB connection. This paragraph describes how to flash the Olimexino using the CANbus.

Downloading the software program to the flash memory of the microcontroller can be done with the MicroBoot utlity. Before continuing, make sure that:
• The board is connected to the CAN bus.
• The Peak PCAN interface is connected to the PC’s USB port
• Power is supplied to the Olimexino board.
• The Olimexino has the correct bootloader on it
Start the MicroBoot utility. It can be found in ‘\Host\MicroBoot\MicroBoot.exe’. Click the Settings-button and select ‘OpenBLT using CAN’, and click the OK-button to save the settings. Next, click the Browse-button to select the Motorola S-Record ( .srec ) of the software program. The one from the demo model is located at ‘\Target\HANcoder_Olimexino.srec’.
GettingStartedGuideSTM32 USBflashProcedure.png

Once selected, the firmware update with the bootloader is started. It might be necessary to reset the controller. The progress is shown in the main screen. Upon completion, the newly flashed software program is automatically started.
GettingStartedGuideSTM32 CANflashProgress.png

Alternative step (Flashing with the ST-Link)
Previous step (Build test)
Next step (Installing the virtual COM port)