EdgeLockTM SE05x Quick start guide with Visual Studio
project examples
Rev. 2.3 — 7 December 2020Application note
534622
Document information
InformationContent
KeywordsEdgeLock SE05x, EdgeLock SE05x Plug & Trust Middleware, Visual Studio
projects
AbstractThis document explains how to get started with EdgeLock SE05x Plug &
Trust middleware using the Visual Studio project examples. It provides
detailed instructions to run the Microsoft Visual Studio projects using the
CMake-based build system included in the EdgeLock SE05x Plug & Trust
middleware.
NXP Semiconductors
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
Revision history
Revision history
Revision
number
1.02019-06-08First document release
1.12019-06-20Update of board figures
2.02019-11-25Update of CMake buld system materials
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
1How to use this document
The Plug & Trust middleware package is delivered with the CMake files that include
the set of directives and instructions describing the project's source files and targets.
The CMake architecture allows developers to build files for their platform and native
build environment and run exactly the same project example on PC/Windows/Linux and
embedded targets.
This document provides detailed instructions to run Visual Studio examples provided in
the Plug & Trust middleware using FRDM-K64F and OM-SE05xARD boards. The main
body of this document should be used in this sequence:
1. Order board samples. Section 2 contains the ordering details of the boards required in
this document
2. Setup your boards. Section 3 describes how to setup the OM-SE05xARD and FRDMK64F boards.
3. Run project examples. Go to Section 4 for instructions to import and run EdgeLock
SE05x Visual Studio project examples.
Supplementary material has been provided in the appendices.
The EdgeLock SE05x works as an auxiliary security device attached to a host controller,
communicating with through an I²C interface. To follow the instructions provided in this
document, you need an EdgeLock SE05x development board and a FRDM-K64F MCU
board, acting as a host controller.
EdgeLock SE05x development boards ordering details
The EdgeLock SE05x support package provides development boards for evaluating
EdgeLock SE050 and EdgeLock SE051 features. Select the development board of the
product you want to evaluate. Table 1 details the ordering details of the EdgeLock SE05x
development boards.
Table 1. EdgeLock SE05x development boards.
Part number12NCDescriptionPicture
OM-SE050ARD935383282598SE050 Arduino
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
®
compatible
development kit
OM-SE051ARD935399187598SE051 Arduino
compatible
development kit
®
Note: The pictures in this guide will show EdgeLock SE050, but EdgeLock SE051 can be
used as well with the same configuration.
FRDM-K64F MCU board ordering details
Table 2 details the ordering details for the FRDM-K64F board.
This section explains how to prepare the OM-SE05xARD boards and FRDM-K64F board
to run the Plug & Trust middleware project examples. This consists of:
1. Update FRDM-K64F with DAPLIink firmware.
2. OM-SE05xARD jumper configuration.
3. OM-SE05xARD and FRDM-K64F board connection.
3.1 Update FRDM-K64F board with DAPLink firmware
Arm Mbed DAPLink is an open-source software project that enables programming and
debugging application software running on Arm Cortex CPUs. DAPLink runs an opensource bootloader and enables developers with drag-and-drop programming, a serial port
and CMSIS-DAP based debugging.
Note: To debug MCUXpresso project examples, we need to flash FRDM-K64F with
DAPLink firmware. If your FRDM-K64F board already includes DAPLink firmware, you
can skip these steps.
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
To flash DAPLink firmware, follow these steps:
1. Go to NXP OpenSDA site
2. Scroll down and select FRDM-K64F board from the Download - OpenSDAbootloader and application drop down list as indicated in Figure 1:
4. Start the board's bootloader mode. To do so, (1) keep reset button pressed while (2)
connecting the USB cable to the SDA USB port and release it after 1s (Figure 3):
5. Drag and drop or copy and paste the binary file into the BOOTLOADER drive from
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
your computer file explorer as shown in Figure 4. The FRDM-K64F will automatically
un-mount after the drag and drop operation.
Figure 4. Enter bootloader mode
6. Un-plug and re-plug the USB cable from the SDA USB port without keeping reset
button pressed.
7. Check the category Ports (COM & LTP) from your computer Device Manager to
ensure that new devices have been properly detected and their driver correctly
installed by your computer OS.
Figure 5. Enter bootloader mode
Note: In case the device does not show up in your Device Manager, please download
the latest bootloader version, as shown in Figure 2, or check / exchange the USB cables
used.
The OM-SE05xARD boards have jumpers that allow you to configure the I2C interface of
EdgeLock SE05x secure elements via the Arduino header. Configure the jumper settings
as shown in Figure 6 to enable this option.
Note: For more information about the jumper settings, refer to AN12395 (OM-
SE050ARD) and AN13016 (OM-SE051ARD) respectively.
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
Figure 6. Jumper configuration for FRDM-K64F
3.3 OM-SE05xARD and FRDM-K64F board connection
The OM-SE05xARD boards and FRDM-K64F board can be directly connected using the
Arduino connectors. The OM-SE05xARD boards come with male connectors while the
FRDM-K64F board comes with female headers.
Mount any OM-SE05xARD board on top of the FRDM-K64F as shown in Figure 7:
Figure 7. Arduino connectors of OM-SE05xARD and FRDM-K64F boards
Double check that the two boards are connected as shown in Figure 8:
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
AN12398
4Run Plug & Trust middleware Visual Studio project examples
This section explains how to run Plug & Trust middleware Visual Studio project examples
using the CMake-based build system.
4.1 Prerequisites
The following tools are required to run the Plug & Trust middleware Visual Studio
projects:
1. Install Visual Studio 2017 version, or higher, in your laptop. For reference, Section 5
illustrates how Visual Studio 2017 version can be installed, but the same procedure
can be applied for more recent versions.
2. Install CMake. For reference, Section 6 illustrates the detailed installation instructions.
3. Install Python 3.7.x 32-bit version, or higher, in your laptop. For reference, Section 7
illustrates how Python 3.7.x 32-bit version can be installed, but the same procedure
can be applied for more recent versions.
4.2 Download Plug & Trust middleware
Follow these steps to download the Plug & Trust middleware in your local machine:
1. Download Plug & Trust middleware from the NXP website.
2. Create a folder called se050_middleware in C: directory as shown in Figure 9:
3. Unzip the Plug & Trust middleware inside the se050_middleware folder. After
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
unzipping, you will see a folder called simw-top created. The contents of the simwtop directory should look as shown in Figure 10:
Figure 10. Unzip se050 middleware
Note: It is recommended to keep se050_middleware with the shortest path possible
and without spaces in it. This avoids some issues that could appear when building the
middleware if the path contains spaces.
The Plug & Trust middleware uses CMake for building the project examples into your
local machine. To build Plug & Trust middleware, open a Command Prompt and use the
following steps as shown in Figure 11:
1. Go to folder with the unzipped SE050 middleware:
(1) Send >> cd C:\se050_middleware\simw-top\scripts
2. Define the environment:
(2) Send >> env_setup.bat
4. Your project directory should now contain two folders: a (1) simw-top folder and a (2)
simw-top_build folder as shown in Figure 12:
Figure 12. SE050 middleware project structure
4.4 Flash FRDM-K64F with VCOM software
The VCOM software allows the FRDM-K64F board to be used as a bridge between the
Windows machine and the EdgeLock SE05x and enables the execution of the EdgeLock
SE05x ssscli tool and other utilities from the laptop. To flash the VCOM software into
the FRDM-K64F, follow these steps:
3. Flash the VCOM software to FRDM-K64F. The VCOM software binary can be found
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
in the Plug & Trust middleware package, inside the simw-top\binaries folder as
shown in Figure 15:
Figure 15. VCOM binary folder
4. Drag and drop or copy and paste the a7x_vcom-T1oI2C-frdmk64f-SE050x.bin
file into the FRDM-K64F drive from your computer file explorer as shown in Figure 16:
Figure 16. Drag and drop VCOM binary
5. The serial and VCOM ports should be recognized by your Device Manager. To check
that the ports are recognized, follow the steps indicated in Figure 17:
a. Unplug the USB cable from the OpenSDA USB port.
b. Plug the USB cable to the OpenSDA USB port.
c. Check that the serial port is recognized in the category Ports (COM & LTP). In
this document, it is recognized as USB Serial Device (COM7) but this naming
might change depending on your computer. Therefore, it is important that you
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
identify which device is recognized at the moment you plug the SDA USB port to
the computer.
d. Plug the USB cable to the K64F USB port.
e. Check that the VCOM port is recognized in the category Ports (COM & LTP).
In this document, it is recognized as Virtual Com Port (COM8) but this naming
might change depending on your computer (e.g. It could also appear named as
USB Serial Device). Therefore, it is important that you identify which device is
recognized at the moment you plug the K64F USB port to the computer.
Figure 17. Check VCOM and serial ports
4.5 Execute EdgeLock SE05x Visual Studio project examples
This section explains how to run the Plug & Trust middleware project example called
se05x_minimal. The se05x_minimal project outputs the memory left in EdgeLock
SE05x security IC.
Note: The execution of the se05x_minimal project is shown as an example. The steps
detailed in this section can be replicated to run any other project example included as
part of the Plug & Trust middleware.
To execute the se05x_minimal test example, follow these steps:
3. Go to the C:\se050_middleware\simw-top_build\se_x86 directory. Double
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
If you have edited any of the parameters in the menu, before exiting press the buttons
Configure and Generate to apply the changes.
For more information about the CMake options please refer the CMake section
of Plug & Trust middleware documentation: simw-top/doc/scripts/
cmake_options.html
click the PlugAndTrustMW.sln Visual Studio project solution as shown in Figure 21:
Figure 21. Open PlugAndTrustMW.sln Visual Studio project solution
4. The Visual Studio IDE will open with the Plug & Trust middleware project examples
included in the workspace as can be seen in Figure 22:
Figure 22. PlugAndTrustMW.sln Visual Studio project workspace
5. Change the VCOM port number in the Plug & Trust middleware project. To do so,
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
follow the instructions shown in Figure 23:
a. Go to the ex_common project and open the ex_sss_ports.h file inside the
headers directory.
b. Change #define EX_SSS_BOOT_SSS_COMPORT_DEFAULT "\\\\.\\COMx"
with the port COM number your laptop assigned to your FRDM-K64F. In this setup,
the COM number is COM9.
Figure 23. Change VCOM port number in your solution
6. Select the se05x_minimal project from the Solution Explorer window located on the
right-hand side of the Visual Studio IDE. Do right-click on the project and click on Setas StartUp project as shown in Figure 24:
7. Right click on the se05x_minimal project and build it by clicking the build option as
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
shown in Figure 25.
Figure 25. Build se05x_minimal project
8. Click on Local Windows Debugger button in the top menu to run se05x_minimal
project as shown in Figure 26. The project will be executed after the project building
process has finished.
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
5Appendix A: Install Visual Studio
Visual Studio is Microsoft's fully-featured IDE for Android, iOS, Windows, web, and cloud.
Visual Studio 2017 introduces rich support for CMake, including cross-platform CMake
projects.
This section explains how to install Visual Studio 2017 version, but the same procedure
can be applied for more recent versions.
1. Go to Visual Studio site.
2. Select (1) Windows and click on Community 2017 in the Download Visual Studio
button as shown in Figure 28:
3. An *.exe installer will download to your laptop. Double click on the installer file and
AN12398
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
follow the setup wizard until the installation is completed. This process might take a
few minutes. Figure 29 shows Visual Studio installation wizard as an example:
Figure 29. Visual Studio IDE installation wizard
4. As part of the Visual Studio setup, it is mandatory that you enable the installation of
Desktop development with C++. Select (1) Desktop development with C++ and
(2) click install as shown in Figure 30:
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
6Appendix B: Install CMake
CMake is an open-source, cross-platform family of tools that helps you build C/C++
projects on multiple platforms using a compiler-independent method. It has minimal
dependencies, requiring only a C++ compiler on its own build system. SE05x middleware
leverages on CMake to generate native makefiles and workspaces that can be used in
the compiler environment of your choice.
To install CMake:
1. Go to CMake downloads page: https://cmake.org/download/
2. Scroll down and select your binary distribution. For this guide, the binary distribution is
Windows as shown in Figure 33:
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
7Appendix C: Install Python
This section explains how to install Python 3.7.x 32-bit version, but the same procedure
can be applied for more recent versions. Follow these steps to install Python in your local
machine:
1. Go to https://www.python.org/downloads and download Python v.3.7.x 32 bit
version. Make sure you download Python v3.7.x 32 bit version.
EdgeLockTM SE05x Quick start guide with Visual Studio project examples
8Legal information
8.1 Definitions
Draft — A draft status on a document indicates that the content is still
under internal review and subject to formal approval, which may result
in modifications or additions. NXP Semiconductors does not give any
representations or warranties as to the accuracy or completeness of
information included in a draft version of a document and shall have no
liability for the consequences of use of such information.
8.2 Disclaimers
Limited warranty and liability — Information in this document is believed
to be accurate and reliable. However, NXP Semiconductors does not
give any representations or warranties, expressed or implied, as to the
accuracy or completeness of such information and shall have no liability
for the consequences of use of such information. NXP Semiconductors
takes no responsibility for the content in this document if provided by an
information source outside of NXP Semiconductors. In no event shall NXP
Semiconductors be liable for any indirect, incidental, punitive, special or
consequential damages (including - without limitation - lost profits, lost
savings, business interruption, costs related to the removal or replacement
of any products or rework charges) whether or not such damages are based
on tort (including negligence), warranty, breach of contract or any other
legal theory. Notwithstanding any damages that customer might incur for
any reason whatsoever, NXP Semiconductors’ aggregate and cumulative
liability towards customer for the products described herein shall be limited
in accordance with the Terms and conditions of commercial sale of NXP
Semiconductors.
Right to make changes — NXP Semiconductors reserves the right to
make changes to information published in this document, including without
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
to the publication hereof.
Suitability for use — NXP Semiconductors products are not designed,
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
malfunction of an NXP Semiconductors product can reasonably be expected
to result in personal injury, death or severe property or environmental
damage. NXP Semiconductors and its suppliers accept no liability for
inclusion and/or use of NXP Semiconductors products in such equipment or
applications and therefore such inclusion and/or use is at the customer’s own
risk.
Applications — Applications that are described herein for any of these
products are for illustrative purposes only. NXP Semiconductors makes
no representation or warranty that such applications will be suitable
for the specified use without further testing or modification. Customers
are responsible for the design and operation of their applications and
products using NXP Semiconductors products, and NXP Semiconductors
accepts no liability for any assistance with applications or customer product
design. It is customer’s sole responsibility to determine whether the NXP
Semiconductors product is suitable and fit for the customer’s applications
and products planned, as well as for the planned application and use of
customer’s third party customer(s). Customers should provide appropriate
design and operating safeguards to minimize the risks associated with
their applications and products. NXP Semiconductors does not accept any
liability related to any default, damage, costs or problem which is based
AN12398
on any weakness or default in the customer’s applications or products, or
the application or use by customer’s third party customer(s). Customer is
responsible for doing all necessary testing for the customer’s applications
and products using NXP Semiconductors products in order to avoid a
default of the applications and the products or of the application or use by
customer’s third party customer(s). NXP does not accept any liability in this
respect.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
authorization from competent authorities.
Evaluation products — This product is provided on an “as is” and “with all
faults” basis for evaluation purposes only. NXP Semiconductors, its affiliates
and their suppliers expressly disclaim all warranties, whether express,
implied or statutory, including but not limited to the implied warranties of
non-infringement, merchantability and fitness for a particular purpose. The
entire risk as to the quality, or arising out of the use or performance, of this
product remains with customer. In no event shall NXP Semiconductors, its
affiliates or their suppliers be liable to customer for any special, indirect,
consequential, punitive or incidental damages (including without limitation
damages for loss of business, business interruption, loss of use, loss of
data or information, and the like) arising out the use of or inability to use
the product, whether or not based on tort (including negligence), strict
liability, breach of contract, breach of warranty or any other theory, even if
advised of the possibility of such damages. Notwithstanding any damages
that customer might incur for any reason whatsoever (including without
limitation, all damages referenced above and all direct or general damages),
the entire liability of NXP Semiconductors, its affiliates and their suppliers
and customer’s exclusive remedy for all of the foregoing shall be limited to
actual damages incurred by customer based on reasonable reliance up to
the greater of the amount actually paid by customer for the product or five
dollars (US$5.00). The foregoing limitations, exclusions and disclaimers shall
apply to the maximum extent permitted by applicable law, even if any remedy
fails of its essential purpose.
Translations — A non-English (translated) version of a document is for
reference only. The English version shall prevail in case of any discrepancy
between the translated and English versions.
Security — Customer understands that all NXP products may be subject
to unidentified or documented vulnerabilities. Customer is responsible
for the design and operation of its applications and products throughout
their lifecycles to reduce the effect of these vulnerabilities on customer’s
applications and products. Customer’s responsibility also extends to other
open and/or proprietary technologies supported by NXP products for use
in customer’s applications. NXP accepts no liability for any vulnerability.
Customer should regularly check security updates from NXP and follow up
appropriately. Customer shall select products with security features that best
meet rules, regulations, and standards of the intended application and make
the ultimate design decisions regarding its products and is solely responsible
for compliance with all legal, regulatory, and security related requirements
concerning its products, regardless of any information or support that may
be provided by NXP. NXP has a Product Security Incident Response Team
(PSIRT) (reachable at PSIRT@nxp.com) that manages the investigation,
reporting, and solution release to security vulnerabilities of NXP products.
8.3 Trademarks
Notice: All referenced brands, product names, service names and
trademarks are the property of their respective owners.
8Legal information .............................................. 31
AN12398
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section 'Legal information'.