Navigation
External Links
Donate
Show your appreciation for OpenBLT
and support future development by
donating.
External Links
Donate
Show your appreciation for OpenBLT
and support future development by
donating.
This is an old revision of the document!
In order to perform firmware updates with the OpenBLT through the CAN communication interface, double-check that this communication interface is configured in “blt_conf.h”. The following macro should have a value of 1. If this macro did not yet have a value of 1, the bootloader should be rebuild after making the change.
#define BOOT_COM_CAN_ENABLE (1)
The Microboot utility needs to be configured to connect to the correct CAN interface on the PC:
Once you saved the settings by clicking the “OK”-button, Microboot is now ready for action!
After building your user program, its S-record formatted firmware file can be downloaded to the remaining flash memory using the bootloader. In Microboot click the “Browse”-button and select your user program's firmware file. For the demo programs, this one is located in the “.\Prog\bin\” directory. Once the firmware file was selected, the download should automatically start.
Once the download completed, the newly programmed software will be started by the bootloader. For the demo program's you can verify this by checking that the LED blinks. Congratulations! That's all there is to using the bootloader.
The BootCommander command line interface (CLI) program allows you to configure all communication settings via options on the command line. The following example demonstrates how to call BootCommander for making a firmware update with one of the demo programs. Just correct the “-d” option to select the CAN communication device that your PC uses to connect to the CAN bus.
On Windows, the name of the CAN device depends on those that are supported by BootCommander and LibOpenBLT. Refer to the BootCommander user manual for a list of supported CAN devices. On Linux, specify the SocketCAN device on your system, for example can0 or slcan0. You can use the “ip addr” command to find out the name of the SocketCAN devices on your system. It is assumed that the SocketCAN device is already configured and online (this also means that the “-b” baudrate command line option is don't care when using Linux).
BootCommander -s=xcp -t=xcp_can -d=peak_pcanusb -b=500000 -c=0 -tid=667 -rid=7e1 -xid=0 demoprog_olimex_stm32p405.srec
The example assumes that the S-record of the demo user program is located in the same directory as where the BootCommander executable itself resides. If not, then simply prepend the absolute (or relative) directory to the name of the S-record firmware file.
Depending on the configuration of the bootloader, there might be a delay between a system reset and the actual start of the user program. This is needed by design for the bootloader's backdoor functionality. Check configurable BOOT_BACKDOOR_ENTRY_TIMEOUT_MS in “blt_conf.h” for the exact delay time.
When using the Lawicel CANUSB interface, the 32-bit driver for the CANUSB DLL API should be installed.