User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:microboot [2018/07/03 16:04]
manual:microboot [2019/09/24 22:03] (current)
Line 1: Line 1:
-====== ​Microboot ​Utility ======+====== ​MicroBoot ​Utility ======
-OpenBLT ships with download ulitity called Microboot ​for MS WindowsMicroboot ​is an easy-to-use program through which the user selects ​the file that is to be downloaded to the target. After that it handles all the communication with the microcontroller target ​that runs OpenBLT ​and provides ​status ​information to the user.+MicroBoot is graphical user interface (GUI) program ​for performing firmware updates on a microcontroller that runs the OpenBLT bootloaderIt is an easy-to-use program through which the user select ​the firmware ​file that is to be programmed on the microcontroller ​target. After that it handles all the communication with the microcontroller target and provides ​progress ​information to the user. For those that prefer a command line interface (CLI) program for handling firmware updates, there is [[manual:​bootcommander|BootCommander]].
-What is special about Microboot is the fact that it provides a generic ​and and standalone user interface for  downloading software, which is independent of the communication interfaceThe communication interface controls the communication and actual data flow between the PC and the microcontroller and is located in dynamic linked library (DLL) file. This means that support for new communication interfaces can be added without having to modify the MicroBoot user interface.+MicroBoot was written in Object Pascal using the [[https://​​|Lazarus IDE]] and developed with cross-platform support in mindIt has been successfully tested on a Windows PC, Linux PC and even runs on Raspberry PI.
-This part of the user manual ​explains how to use the Microboot utility. First a detailed overview of the user interface is provided, followed by an explanation of the command line options that can be used when invoking the Microboot utility.+{{:manual:​olimex_stm32p405_download_can.png?|}}
-===== User Interface =====+Under the hood, MicroBoot relies on the OpenBLT host library ([[manual:​libopenblt|LibOpenBLT]]) for handling the actual communication with the bootloader.
-The illustration below provides an overview of the Microboot user interface\\ +{{:​manual:​microboot_architecture_75.png?|}}
-{{:​manual:​microboot_gui.png?​nolink|}}+Thanks to the open source nature of the OpenBLT project, full source code is available for the MicroBoot program. This makes it a great reference and starting point for those that would like to develop their own firmware update tool.
-(1) When starting Microboot for the first time it is important to select and configure the communication ​interface. This is achieved by clicking the "​Settings"​-button. The dialog titled "​Interface Settings"​ will appear. All the communication interfaces that were delivered with your version of Microboot will appear in the dropdown box. Select the one you intend to use. Next, click on the "​Options"​-button to further configure the selected communication interface. Your interface selection is stored in the MS Windows Register and therefore, this step only has to be done once.+===== User interface ​=====
-(2) Once the Microboot ​communication ​interface ​is configured, you can start using it to download software to your microcontrollerMake sure your microcontroller is in a state that it can receive and program the new software. To start the software download, click the "​Browse"​-button and select the software file that you want to download to the microcontroller. The download will start automatically after you selected the file. The text box on the user interface will change into a progress bar, allowing you to track the progress of your software download:+The illustration below provides an overview of the Microboot ​user interface. ​\\ 
-(3To close the Microboot utilitysimply click the "​Cancel"​-button. ​If a download is in progressit will automatically be interrupted for you before ​the Microboot utility is closed.+(1When starting MicroBoot for the first timeit is important to select and configure the communication interface. This is achieved by clicking ​the “Settings”-button, after which the dialog titled “Settings” appearsStart by selecting the desired communication transport layer from the “Interface selection”-dropdown box. After selecting the communication transport layer, the options on the dialog are updated accordingly,​ allowing you to further configure it.
-===== Command Line Options =====+(2) Once the communication interface is selected and configured in MicroBoot, you can start using it to perform firmware updates on your microcontroller,​ which has the OpenBLT bootloader in flash. To start the firmware update procedure, click the “Browse”-button and select the firmware file for your microcontroller. The firmware update will start automatically after you selected the file. If necessary, MicroBoot will request you to reset your microcontroller to active the OpenBLT bootloader. For most demo programs, this happens automatically and no user action is required. The progress bar on the user interface allows you to keep track of the firmware update progress.
-There are several ways that you can start the Microboot utility using the supported command line options. This allows a flexible use of the utility. ​To give some examplesMicroboot can be invoked directly from a Makefile or Batchfile allowing you to automatically download your software at the end of the build processAnother possibility ​is to create a shortcut ​in MS Windowscustomized for the desired command line options, and once double-clicked,​ the software download ​will start right away with the correct communication interfaceThe following options can be used:+(3) To close MicroBootsimply click the “Exit”-buttonIf a firmware update ​is in progressit will be automatically interrupted.
-**-i<​interface>​** Using this option, you can specify what communication interface to use. <​interface>​ should be replaced with the *.dll filename of the communication interface. Without this option, the Microboot utility will use the communication interface that was last used.+===== Command line options =====
-**-l** When this option ​is specified, ​the Microboot utility will generated the logfile called "log.txt" during ​the download process. The logfile contains details about the download process and is especially helpful when resolving download problems. The logfile ​is stored in the same directory as where "​Microboot.exe" ​is located. +It is possible to start MicroBoot from the command lineAt this point the only command line argument that is supports ​is the firmware file itself, including its full absolute (or relative) pathWhen MicroBoot ​is started ​this way, it automatically starts ​the firmware update procedure using the specified firmware ​file. This feature enables ​the integration of MicroBoot into your integrated development environment (IDE)such that for example ​a firmware update ​is automatically ​started ​after building your firmware.
- +
-**-p** Invoking the Microboot utility with this option will display ​the "​Select ​file for download"​-dialog. This option simulates ​the "​Browse"​-button click. +
- +
-**-s** Invoking the Microboot utility with this option will keep the program open after a successful firmware updateallowing ​consecutive ​firmware update ​to be started. +
- +
-**<​filename>​** At the end of the command line you can specify the software file that should be downloaded. This way you don't have to manually specify this file every time you start the Microboot utility. When Microboot detects this <​filename>​ option, it will start the download right away for you using the specified file, allowing you to fully automate the download sequence. +
- +
-Example command line: **Microboot.exe –l –iopenblt_uart.dll c:​\my_files\test_app.s19**+
 ===== Building Microboot from sources ===== ===== Building Microboot from sources =====
-The OpenBLT download package includes full source ​code of the Microboot program and all the supported interface DLLs. The Microboot program and interface DLLs were developed using [[https://​​delphi|Delphi 10.2 (Tokyo)]]. At the time of this writingthe Starter-edition of Delphi 10.2 is [[|available for free]]. This Starter-edition is sufficient for building the Microboot program and interface DLLs from sources. +The free and open source [[https://​|Lazarus IDE]] was used to develop MicroBootTo install ​the Lazarus IDEpoint your browser to its project page on [[|SourceForge]]. Windows users can download ​the 32-bit installer ​from thereFor Linux users, DEB and RPM packages are providedHoweverit is recommended to install ​the version of the Lazarus IDE that is offered ​in the package repositories ​of your Linux distributionHere are the installation instructions for most popular Linux distributions:​
- +
-Assuming that you installed Delphi on your PC, you can open the Microboot project by double-clicking the **MicroBoot.dproj** ​from the Windows ExplorerIt is located in the \Host\Source\MicroBoot\ directoryTo build the Microboot project from sourcesselect //​Project->​Build All Projects// from the program menu. +
- +
-Building ​the interface DLLs is similar. Their project files (*.dproj) are located ​in the appropriate sub-directory ​of Host\Source\MicroBoot\interfaces\. +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
 +  * **Debian**: <​code>​sudo apt install make gdb fpc fpc-source lazarus</​code>​
 +  * **Ubuntu**: <​code>​sudo apt install make gdb fpc fpc-source lazarus lcl</​code>​
 +  * **Fedora**: <​code>​sudo dnf install make gdb fpc fpc-src lazarus</​code>​
 +  * **openSUSE**:​ <​code>​sudo zypper install make gdb fpc fpc-src lazarus</​code>​
 +To build MicroBoot, start the Lazarus IDE by selecting it from the start menu of your desktop environment. Next, select //​Project->​Open//​ from the program menu. Browse to the **./​Host/​Source/​MicroBoot/​** directory and select the **MicroBoot.lpi** file. Build, run and debug MicroBoot by simply clicking the green play-button in the toolbar or by selecting //​Run->​Run//​ from the program menu.
manual/microboot.1530626678.txt.gz · Last modified: 2019/09/24 22:09 (external edit)