This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
manual:security [2022/02/10 11:17] voorburg [Building on Windows with MinGW] |
manual:security [2022/02/10 19:10] (current) voorburg [Building on Windows with MinGW] |
||
---|---|---|---|
Line 74: | Line 74: | ||
</code> | </code> | ||
- | To customize, change the code in these two functions and use your creativity to change the seed generation and the key verification algorithm. One good approach is to use a seed that changes, such as the value of a free running counter of the timer system. Don't forget to rebuild the bootloader and program it into the flash memory of your microcontroller after making changes. | + | To customize, change the code in these two functions and use your creativity to change the seed generation and the key verification algorithm. One good approach is to use a seed that changes, ideally using a random number generator peripheral, if your microcontroller offers one. Otherwise, you can use a software solution such as the on available in [[https://github.com/feaser/microtbx|MicroTBX]]. Don't forget to rebuild the bootloader and program it into the flash memory of your microcontroller after making changes. |
==== Seed/Key Shared Library ==== | ==== Seed/Key Shared Library ==== | ||
Line 151: | Line 151: | ||
Note that this builds a 64-bit version of **libseednkey.dll**, which only works together with 64-bit versions of the PC binaries (MicroBoot, BootCommander and LibOpenBLT). This is the default starting with OpenBLT version 1.14. | Note that this builds a 64-bit version of **libseednkey.dll**, which only works together with 64-bit versions of the PC binaries (MicroBoot, BootCommander and LibOpenBLT). This is the default starting with OpenBLT version 1.14. | ||
- | When using the PC binaries from before OpenBLT version 1.14, or if you rebuilt them yourself as 32-bit, then you should build **libseednkey.dll** as 32-bit as well. To build a 32-bit version of **libseednkey.dll**, generate the build environment with command “cmake -A Win32..”. | + | When using the PC binaries from before OpenBLT version 1.14, or if you rebuilt them yourself as 32-bit, then you should build **libseednkey.dll** as 32-bit as well. To build a 32-bit version of **libseednkey.dll**, generate the build environment with command "**cmake -A Win32..**". |
==== Building on Windows with MinGW ==== | ==== Building on Windows with MinGW ==== | ||
- | This method assumes that the MinGW compiler toolchain is installed on your PC. A convenient way to install it, is by downloading 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 the included PC binaries (MicroBoot, BootCommander and LibOpenBLT) 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]]. | + | 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 the included PC binaries (MicroBoot, BootCommander and LibOpenBLT) 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 166: | Line 166: | ||
<code> | <code> | ||
- | cmake -G "MinGW Makefiles" .. | + | cmake -G "CodeBlocks - MinGW Makefiles" .. |
mingw32-make | mingw32-make | ||
</code> | </code> |