User Tools

Site Tools


manual:microboot

Differences

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
Next revision Both sides next revision
manual:microboot [2016/12/17 11:37]
voorburg [Building Microboot from sources]
manual:microboot [2018/07/04 18:23]
voorburg [Building Microboot from sources]
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]].
  
 +MicroBoot was written in Object Pascal using the [[https://​www.lazarus-ide.org/​|Lazarus IDE]] and developed with cross-platform support in mind. It has been successfully tested on a Windows PC, Linux PC and even runs on a Raspberry PI.
  
 +{{:​manual:​olimex_stm32p405_download_can.png?​|}}
  
-What is special about Microboot is the fact that it provides a generic and and standalone user interface for  downloading softwarewhich is independent of the communication interface. The communication interface controls the communication and actual data flow between the PC and the microcontroller and is located in a dynamic linked ​library (DLLfile. This means that support ​for new communication ​interfaces can be added without having to modify ​the MicroBoot user interface.+Under the hoodMicroBoot relies on the OpenBLT host library ([[manual:​libopenblt|LibOpenBLT]]) for handling the actual ​communication ​with the bootloader.
  
 +{{:​manual:​microboot_architecture_75.png?​|}}
  
 +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.
  
-This part of the user manual explains how to use the Microboot utility. First a detailed overview of the user +===== User interface ​=====
- +
-interface is provided, followed by an explanation of the command line options that can be used when invoking the Microboot utility. +
- +
- +
- +
-===== User Interface ​=====+
  
 The illustration below provides an overview of the Microboot user interface. \\  The illustration below provides an overview of the Microboot user interface. \\ 
  
 +{{:​manual:​microboot_gui_explained.png?​|}}
  
 +(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,​ after which the dialog titled “Settings” appears. Start 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.
  
-{{:​manual:​microboot_gui.png?​nolink|}}+(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.
  
 +(3) To close MicroBoot, simply click the “Exit”-button. If a firmware update is in progress, it will be automatically interrupted.
  
 +===== Command line options =====
  
-(1) When starting Microboot for the first time it is important ​to select and configure ​the communication interfaceThis 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. +It is possible ​to start MicroBoot from the command lineAt this point the only command line argument ​that is supports ​is the firmware ​file itselfincluding its full absolute ​(or relativepathWhen 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.
- +
- +
- +
-(2) Once the Microboot communication interface ​is configured, you can start using it to download software to your microcontroller. Make 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 barallowing you to track the progress of your software download: +
- +
- +
- +
-{{:​manual:​microboot_session.png?​nolink|}} +
- +
- +
- +
-(3To close the Microboot utility, simply click the "​Cancel"​-buttonIf a download ​is in progress, it will automatically ​be interrupted for you before ​the Microboot utility is closed. +
- +
- +
- +
- +
- +
-===== Command Line Options ===== +
- +
-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 examples, Microboot can be invoked directly from a Makefile or Batchfile allowing you to automatically download ​your software at the end of the build process. Another 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 interface. The following options can be used: +
- +
-**-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. +
- +
-**-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. +
- +
-**-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 successful ​firmware update, allowing a 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 includes full source ​code of the Microboot program and all the supported interface DLLs. The Microboot program and interface DLLs were developed using [[https://​www.embarcadero.com/products/​delphi|Delphi 10.1 (Berlin)]]. At the time of this writingthe Starter-edition of Delphi 10.1 is [[https://www.embarcadero.com/products/delphi/starter/promotional-download|available for free]]. This Starter-edition is sufficient for building the Microboot program and interface DLLs from sources. +The free and open source [[https://​www.lazarus-ide.org/|Lazarus IDE]] was used to develop MicroBootTo install ​the Lazarus IDEpoint your browser to its project page on [[https://sourceforge.net/projects/lazarus/files/|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.txt · Last modified: 2022/02/10 11:23 by voorburg