User Tools

Site Tools


manual:bootcommander

This is an old revision of the document!


BootCommander Utility

BootCommander is a command line interface (CLI) program for performing firmware updates on a microcontroller that runs the OpenBLT bootloader. It provides a firmware update tool for those that prefer a command line interface program over one with a graphical user interface, such as Microboot.

BootCommander was written in the C programming language (C99) and developed with cross-platform support in mind. It has been successfully tested on a Windows PC, Linux PC and even on embedded Linux systems such as a Raspberry Pi and a Beagle Board.

Under the hood, BootCommander relies on the OpenBLT host library (LibOpenBLT) for handling the actual communication with the bootloader. Thanks to the open source nature of the OpenBLT project, full source code is available for the BootCommander program. This makes it a great reference and starting point for those that would like to develop their own firmware update tool. For details on its implementation, refer to the compiled HTML help reference manual that is located at: .\Doc\RM_BootCommander.chm.

Program usage

When calling the BootCommander program from the terminal, it expects a few options followed by a firmware file. The currently supported firmware file format is S-records: BootCommander [options] [firmware file].

The options the make it possible to select and configure the communication protocol and transport layer to use:

  • -s=[name] specifies the name of the communication protocol. Supported names are:
    • xcp (default) = XCP version 1.0
  • -t=[name] specifies the name of the transport layer. Supported names are:
    • xcp_rs232 (default) = XCP on RS232.

Additional XCP version 1.0 communication protocol settings (xcp):

  • -t1=[timeout] sets the command response timeout in milliseconds as a 16-bit value (default = 1000 ms).
  • -t3=[timeout] sets the start programming timeout in milliseconds as a 16-bit value (default = 2000 ms).
  • -t4=[timeout] sets the erase memory timeout in milliseconds as a 16-bit value (default = 10000 ms).
  • -t5=[timeout] sets the program memory and target reset timeout in milliseconds as a 16-bit value (default = 1000 ms).
  • -t7=[timeout] sets the busy wait timer timeout in milliseconds as a 16-bit value (default = 2000 ms).
  • -sk=[file] sets the seek/key algorithm library filename (optional).

Additional XCP on RS232 settings (xcp_rs232):

  • -d=[name] sets the name of the communication device. For example COM1 or /dev/ttyUSB0 (mandatory).
  • -b=[value] sets the communication speed in bits per second, as a 32-bit value (default = 57600). Supported values are: 9600, 19200, 38400, 57600, 115200.

Note that is it not necessary to specify an option if its default value is already the desired value. This means that the following two examples behave exactly the same:

BootCommander -d=COM4 demoprog.srec

and

BootCommander -s=xcp -t=xcp_rs232 -d=COM4 -b=57600 -t1=1000 -t3=2000 -t4=10000 -t5=1000 -t7=2000 demoprog.srec

Building BootCommander from sources

manual/bootcommander.1497351873.txt.gz · Last modified: 2019/09/24 22:09 (external edit)