User Tools

Site Tools


manual:libopenblt

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
manual:libopenblt [2018/07/10 17:27]
voorburg [Python]
manual:libopenblt [2022/03/02 13:11] (current)
voorburg
Line 2: Line 2:
  
 The OpenBLT Host Library contains an application programming interface (API) for communicating with a microcontroller target, running the OpenBLT bootloader, for making firmware updates on the target. The goal of the OpenBLT Host Library is to empower you to quickly and efficiently create your own firmware update tool, in case you don’t prefer the standard MicroBoot and BootCommander tools that are included in the OpenBLT bootloader package. The OpenBLT Host Library contains an application programming interface (API) for communicating with a microcontroller target, running the OpenBLT bootloader, for making firmware updates on the target. The goal of the OpenBLT Host Library is to empower you to quickly and efficiently create your own firmware update tool, in case you don’t prefer the standard MicroBoot and BootCommander tools that are included in the OpenBLT bootloader package.
 +
 +Note that LibOpenBLT was designed for PCs and embedded Linux devices. If you would like to integrate similar functionality on a microcontroller,​ have a look at [[manual:​libmicroblt|LibMicroBLT]].
  
 {{:​manual:​libopenblt_architecture.png?​nolink&​|}} {{:​manual:​libopenblt_architecture.png?​nolink&​|}}
Line 23: Line 25:
  
   * libopenblt.dll   * libopenblt.dll
-  ​UsbBulkLib.dll + 
-  * msvcr120d.dll+ 
 +**Important note for Windows users**: Starting with OpenBLT version 1.14, LibOpenBLT is built and distributed as a 64-bit library. That means that your own custom program, which accesses the LibOpenBLT library, must also be built as a 64-bit application. With other words: 
 +  * If you develop your custom program in Python, install and use the 64-bit Python interpreter 
 +  * If you develop your custom program in Lazarus, install the 64-bit version of Lazarus. 
 +  * If you develop your custom program in Delphi, set the __Target Platforms__ to __64-bit Windows Platform__ in the //Project Manager//​. 
 +  * If you develop your custom program in C#, set the __Platform target__ to __x64__. 
 +  * Etc. 
 + 
 +If you use the LibOpenBLT shared library from before OpenBLT version 1.14, or if you rebuilt it yourself as 32-bit, then your own custom program must also be built as a 32-bit application. 
  
 ===== Building LibOpenBLT from sources ===== ===== Building LibOpenBLT from sources =====
Line 47: Line 58:
 ==== Building on Windows with Microsoft Visual C++ ==== ==== Building on Windows with Microsoft Visual C++ ====
  
-This method assumes that Microsoft Visual C++ is installed. During the LibOpenBLT development,​ Microsoft Visual Studio ​2013 Express ​was used. The method outlined here should work just fine with both older and newer versions of Microsoft Visual Studio.+This method assumes that Microsoft Visual C++ is installed. During the LibOpenBLT development,​ Microsoft Visual Studio ​2019 was used. The method outlined here should work just fine with both older and newer versions of Microsoft Visual Studio.
  
 Using the Command Prompt in Windows, set the working directory to **.\Host\Source\LibOpenBLT\build** and type the command: Using the Command Prompt in Windows, set the working directory to **.\Host\Source\LibOpenBLT\build** and type the command:
Line 59: Line 70:
  
 After a successful build, the shared library **libopenblt.dll** is located in the **./Host** directory. After a successful build, the shared library **libopenblt.dll** is located in the **./Host** directory.
 +
 +Note that if you want to build a 32-bit version of LibOpenBLT, generate the build environment with command "​**cmake -A Win32 ..**" instead. This is recommended if you use OpenBLT from before version 1.14.
 ==== Building on Windows with MinGW ==== ==== Building on Windows with MinGW ====
  
-This method assumes that the MinGW compiler toolchain is installed on your PC. The installer can be downloaded from https://​sourceforge.net/​projects/​mingw-w64/. +This method assumes that the MinGW compiler toolchain is installed on your PC. A convenient way to install it, is by downloading the installer ​that bundles the Code::​Blocks IDE together with MinGW. When using OpenBLT version 1.14 or newer, it is recommended to download the [[https://​sourceforge.net/​projects/​codeblocks/​files/​Binaries/​20.03/​Windows/​codeblocks-20.03mingw-setup.exe/​download|64-bit installer version]], because all included PC binaries are 64-bit as well. Otherwise you can download the [[https://​sourceforge.net/​projects/​codeblocks/​files/​Binaries/​20.03/​Windows/​32bit/​codeblocks-20.03-32bit-mingw-32bit-setup.exe/download|32-bit installer version]].
  
 Make sure the **.\bin** directory of the MinGW installation directory is added to your path in Windows. A quick way to verify that this is the case, run the following command from the Command Prompt in Windows and make sure the program could be found: ​ Make sure the **.\bin** directory of the MinGW installation directory is added to your path in Windows. A quick way to verify that this is the case, run the following command from the Command Prompt in Windows and make sure the program could be found: ​
Line 68: Line 81:
 </​code>​ </​code>​
  
-Using the Command Prompt in Windows, set the working directory to **.\Host\Source\LibOpenBLT\build**. Next, type the following two commands to detect and generate the MinGW Makefiles based build environment and then build the static ​LibOpenBLT library: ​+Using the Command Prompt in Windows, set the working directory to **.\Host\Source\LibOpenBLT\build**. Next, type the following two commands to detect and generate the MinGW Makefiles based build environment and then build the LibOpenBLT library: ​
  
 <​code>​ <​code>​
-cmake -G "MinGW Makefiles"​ ..+cmake -G "CodeBlocks - MinGW Makefiles"​ ..
 mingw32-make mingw32-make
 </​code>​ </​code>​
Line 90: Line 103:
  
 A video tutorial about getting started with the Python bindings is available in [[https://​www.feaser.com/​en/​blog/?​p=208|this blog article]]. ​ A video tutorial about getting started with the Python bindings is available in [[https://​www.feaser.com/​en/​blog/?​p=208|this blog article]]. ​
 +
 +==== C# ====
 +
 +The C# bindings are formatted as a wrapper class with static methods. You can directly copy the class file to your C# project. Refer to the README file in the SVN trunk for getting started instructions:​
 +
 +https://​sourceforge.net/​p/​openblt/​code/​HEAD/​tree/​trunk/​Host/​Source/​LibOpenBLT/​bindings/​csharp/​
 +
 +A tutorial about getting started with the C# bindings is available on the [[https://​www.feaser.com/​en/​blog/​2021/​03/​develop-your-own-firmware-update-tool-in-c-with-libopenblt/​|developer blog]].
  
 ==== Pascal ==== ==== Pascal ====
Line 97: Line 118:
 https://​sourceforge.net/​p/​openblt/​code/​HEAD/​tree/​trunk/​Host/​Source/​LibOpenBLT/​bindings/​pascal/​ https://​sourceforge.net/​p/​openblt/​code/​HEAD/​tree/​trunk/​Host/​Source/​LibOpenBLT/​bindings/​pascal/​
  
 +Note that the [[manual:​microboot|MicroBoot]] firmware update tool itself is developed using Lazarus, using exactly these bindings. The OpenBLT download package includes the full source code for MicroBoot. You can use it as a reference on how to use the Pascal bindings for LibOpenBLT.
  
manual/libopenblt.1531236432.txt.gz · Last modified: 2019/09/24 22:08 (external edit)