31
AN12398 EdgeLock TM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 — 25 November 2019 Application note 534620 Document information Information Content Keywords EdgeLock SE050, EdgeLock SE050 Plug & Trust middleware, Visual Studio projects Abstract This document explains how to get started with EdgeLock SE050 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 SE050 Plug & Trust middleware.

EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

AN12398EdgeLockTM SE050 Quick start guide with Visual Studioproject examplesRev. 2.0 — 25 November 2019 Application note534620

Document informationInformation Content

Keywords EdgeLock SE050, EdgeLock SE050 Plug & Trust middleware, Visual Studioprojects

Abstract This document explains how to get started with EdgeLock SE050 Plug &Trust middleware using the Visual Studio project examples. It providesdetailed instructions to run the Microsoft Visual Studio projects using theCMake-based build system included in the EdgeLock SE050 Plug & Trustmiddleware.

Page 2: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 2 / 31

Revision historyRevision historyRevisionnumber

Date Description

1.0 2019-06-08 First document release

1.1 2019-06-20 Update of board figures

2.0 2019-11-25 Update of CMake buld system materials

Page 3: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 3 / 31

1 How to use this document

The SE050 Plug & Trust middleware package is delivered with the CMake files thatinclude the set of directives and instructions describing the project's source files andtargets. The CMake architecture allows developers to build files for their platform andnative build environment and run exactly the same project example on PC/Windows/Linux and embedded targets.

This document provides detailed instructions to run EdgeLock SE050 Visual Studioexamples using FRDM-K64F and OM-SE050ARD boards. The main body of thisdocument should be used in this sequence:

1. Order board samples. Required hardware contains the ordering details of the boardsrequired in this document

2. Setup your boards. Section 3 describes how to setup the OM-SE050ARD and FRDM-K64F boards.

3. Run project examples. Go to Section 4 for instructions to import and run EdgeLockSE050 Visual Studio project examples.

Supplementary material has been provided in the appendices.

Page 4: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 4 / 31

2 Hardware required

This guide provides detailed instructions to run the SE050 Plug & Trust middlewareVisual Studio project examples using the hardware described below. However, you coulduse other MCU boards supported by SE050 Plug & Trust middleware for this purpose aswell.

1. OM-SE050ARD development kit:

Table 1. OM-SE050ARD development kit detailsPart number 12NC Content Picture

OM-SE050ARD 935383282598 EdgeLock SE050development board

2. FRDM-K64F board:

Table 2. FRDM-K64F detailsPart number 12NC Content Picture

FRDM-64F 935326293598 Freedomdevelopment platformfor Kinetis K64, K63and K24 MCUs

Page 5: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 5 / 31

3 Boards setup

This section explains how to prepare the OM-SE050ARD and FRDM-K64F boards to runthe SE050 Plug & Trust middleware project examples. This consists of:

1. Update FRDM-K64F with DAPLIink firmware2. Hardware setup for FRDM-K64F3. OM-SE050ARD and FRDM-K64F board connection.

3.1 Update FRDM-K64F board with DAPLink firmwareArm Mbed DAPLink is an open-source software project that enables programming anddebugging application software running on Arm Cortex CPUs. DAPLink runs an open-source bootloader and enables developers with drag-and-drop programming, a serial portand CMSIS-DAP based debugging.

Note: To debug MCUXpresso project examples, we need to flash FRDM-K64F withDAPLink firmware. If your FRDM-K64F board already includes DAPLink firmware, youcan skip these steps.

To flash DAPLink firmware, follow these steps:

1. Go to NXP OpenSDA site2. Scroll down and select FRDM-K64F board from the Download - OpenSDA bootlader

and application drop down list as indicated in Figure 1:

Figure 1.  DAPLink firmware update - select board

3. Download the latest DAPLink firmware version as shown in Figure 2:

Page 6: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 6 / 31

Figure 2.  DAPLink firmware update - select board

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):

Figure 3.  Enter bootloader mode

5. Drag and drop or copy and paste the binary file into the BOOTLOADER drive fromyour computer file explorer as shown in Figure 4. The FRDM-K64F will automaticallyun-mount after the drag and drop operation.

Page 7: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 7 / 31

Figure 4.  Enter bootloader mode

6. Un-plug and re-plug the USB cable from the SDA USB port without keeping resetbutton pressed.

7. Check the category Ports (COM & LTP) from your computer Device Manager toensure that new devices have been properly detected and their driver correctlyinstalled by your computer OS.

Figure 5.  Enter bootloader mode

3.2 OM-SE050ARD jumper configurationThe OM-SE050ARD board has jumpers that allow you to interface the EdgeLock SE050I2C interface via the Arduino header. Configure the jumper settings as shown in Figure 6to enable this option.

Page 8: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 8 / 31

Figure 6.  Jumper configuration for FRDM-K64F

For more information about the OM-SE050ARD jumper settings, refer to AN12395 OM-SE050ARD hardware overview .

3.3 OM-SE050ARD and FRDM-K64F board connectionThe OM-SE050ARD and FRDM-K64F boards can be directly connected using theArduino headers present in both boards. Connect the OM-SE050ARD board on top of theFRDM-K64F as shown in Figure 7:

Figure 7.  Arduino connectors of OM-SE050ARD and FRDM-K64F boards

Double check that the two boards are connected as shown in Figure 8:

Page 9: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 9 / 31

Figure 8.  OM-SE050ARD mounted in FRDM-K64F board

Page 10: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 10 / 31

4 Run SE050 Plug & Trust middleware Visual Studio project examples

This section explains how to run SE050 Plug & Trust middleware Visual Studio projectexamples using the CMake-based build system.

4.1 PrerequisitesThe following tools are required to run the SE050 Plug & Trust middleware Visual Studioprojects:

1. Visual Studio Community 2017. Check Section 5 for detailed installation instructions2. CMake.Check Section 6 for detailed instructions.3. Python 3.7.x version 32 bit. Check Section 7 for detailed installation instructions.

4.2 Download SE050 Plug & Trust middlewareThe SE050 Plug & Trust middleware stack includes several MCUXpresso projectexamples for cloud service onboarding. To download SE050 Plug & Trust middleware:

1. Download SE050 Plug & Trust middleware from the NXP website.2. Create a folder called se050_middleware in C: directory as shown in Figure 9:

Figure 9.  Create se050_middleware folder

3. Unzip the SE050 Plug & Trust middleware inside the se050_middleware folder. Afterunzipping, you will see a folder called simw-top created. The contents of the simw-top directory should look as shown in Figure 10:

Page 11: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 11 / 31

Figure 10.  Unzip se050 middleware

Note: It is recommended to keep se050_middleware with the shortest path possibleand without spaces in it. This avoids some issues that could appear when building themiddleware if the path contains spaces.

4.3 Build SE050 Plug & Trust middleware project examplesThe SE050 Plug & Trust middleware uses CMake for building the project examples intoyour local machine. To build SE050 Plug & Trust middleware, open a Command Promptand 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

3. Generate the SE050 Plug & Trust middleware project examples:(3) Send >> create_cmake_projects.pyNote: This command may take a few seconds to complete.

Page 12: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 12 / 31

Figure 11.  Generate SE050 Plug & Trust middleware project examples

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 softwareThe VCOM software allows the FRDM-K64F board to be used as a bridge between theWindows machine and the EdgeLock SE050 and enables the execution of the EdgeLockSE050 ssscli tool and other utilities from the laptop. To flash the VCOM software intothe FRDM-K64F, follow these steps:

1. Unplug and plug again the USB cable to the openSDA USB port as shown inFigure 13:

Page 13: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 13 / 31

Figure 13.  Unplug and plug OpenSDA port

2. When you plug the board, your laptop should recognize the board as an external driveas shown in Figure 14:

Figure 14.  FRDM-K64F drive

3. Flash the VCOM software to FRDM-K64F. The VCOM software binary can be foundin the SE050 Plug & Trust middleware package, inside the simw-top\binariesfolder as shown in Figure 15:

Figure 15.  VCOM binary folder

Page 14: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 14 / 31

4. Drag and drop or copy and paste the a7x_vcom-T1oI2C-frdmk64f-SE050x.binfile 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 checkthat 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 namingmight change depending on your computer. Therefore, it is important that youidentify which device is recognized at the moment you plug the SDA USB port tothe 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 namingmight change depending on your computer (e.g. It could also appear named asUSB Serial Device). Therefore, it is important that you identify which device isrecognized at the moment you plug the K64F USB port to the computer.

Page 15: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 15 / 31

Figure 17.  Check VCOM and serial ports

4.5 Execute SE050 Visual Studio project examplesThis section explains how to run the SE050 Plug & Trust middleware project examplecalled se05x_minimal. The se05x_minimal project outputs the memory left inEdgeLock SE050 security IC.

Note: The execution of the se05x_minimal project is shown as an example. The stepsdetailed in this section can be replicated to run any other project example included aspart of the SE050 Plug & Trust middleware.

To execute the se05x_minimal test example, follow these steps:

1. Connect the FRDM-K64F board to your laptop as shown in Figure 18. Check that yourWindows Device Manager recognizes FRDM-K64F board as shown in Figure 5.

Figure 18.  Plug OpenSDA and USB FRDM-K64F ports.

2. Go to the C:\se050_middleware\simw-top_build\se_x86 directory. Doubleclick the PlugAndTrustMW.sln Visual Studio project solution as shown in Figure 19:

Page 16: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 16 / 31

Figure 19.  Open PlugAndTrustMW.sln Visual Studio project solution

3. The Visual Studio Community 2017 IDE will open with the SE050 Plug & Trustmiddleware project examples included in the workspace as can be seen in Figure 20:

Figure 20.  PlugAndTrustMW.sln Visual Studio project workspace

4. Change the VCOM port number in the SE050 Plug & Trust middleware project. To doso, follow the instructions shown in Figure 21: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.

Page 17: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 17 / 31

Figure 21.  Change VCOM port number in your solution

5. Select the se05x_minimal project from the Solution Explorer window located on theright-hand side of the Visual Studio IDE. Do right-click on the project and click on Setas StartUp project as shown in Figure 22:

Figure 22.  Set se05x_minimal as StartUp project

6. Click on Local Windows Debugger button in the top menu to run se05x_minimalproject as shown in Figure 23. The project will be executed after the project buildingprocess has finished.

Page 18: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 18 / 31

Figure 23.  Build and run se05x_minimal project

7. If the se05x_minimal project runs successfully, a Console window will be opened.The logs in this Console window indicate the available memory in SE050 security IC(in this case, 592) as can be seen in Figure 24:

Figure 24.  Verify that se05x_minimal project is running

8. The same operation can be repeated with any of the other SE050 Plug & Trustmiddleware project examples.

Page 19: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 19 / 31

5 Appendix A: Install Visual Studio Community 2017

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 CMakeprojects. To install Visual Studio 2017:

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 25:

Figure 25.  Download Visual Studio IDE

3. An *.exe installer will download to your laptop. Double click on the installer file andfollow the setup wizard until the installation is completed. This process might take afew minutes. Figure 26 shows Visual Studio installation wizard as an example:

Figure 26.  Visual Studio IDE installation wizard

Page 20: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 20 / 31

4. As part of the Visual Studio setup, it is mandatory that you enable the installation ofDesktop development with C++. Select (1) Desktop development with C++ and(2) click install as shown in Figure 27:

Figure 27.  Select desktop development with C++

5. Visual C++ Tools for CMake is installed by default as part of the Desktop developmentwith C++ workload. This process might take several minutes. Figure 28 shows VisualStudio installation wizard as an example:

Figure 28.  Install desktop development with C++

6. After the installation is completed, you might be asked to reboot your system asshown in Figure 29:

Page 21: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 21 / 31

Figure 29.  Visual Studio installation - reboot

Page 22: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 22 / 31

6 Appendix 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 minimaldependencies, requiring only a C++ compiler on its own build system. SE050 middlewareleverages on CMake to generate native makefiles and workspaces that can be used inthe 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 30:

Figure 30.  Download CMake

3. Double click on the downloaded installer file. Windows Defender SmartScreen mightpop-up the wizard shown in Figure 31:

Page 23: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 23 / 31

Figure 31.  Execute CMake installer

4. If this is your case: Click (1) on More info and then (2) click on Run anyway asshown in Figure 31:

Figure 32.  Run the CMake installer

5. The CMake installation wizard will open. Click (1) Next and (2) accept the End-UserLicense Agreement as shown in Figure 33:

Page 24: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 24 / 31

Figure 33.  CMake installation wizard

6. As part of the CMake setup, (1) Add Cmake to the system PATH for all users and(2) click Next as shown in Figure 34:

Figure 34.  Add CMake path

7. Select a destination folder, (1) click Next and then (2) click Install as shown inFigure 35:

Page 25: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 25 / 31

Figure 35.  Install CMake

8. Wait a few seconds until the installation is completed and click Finish as shown inFigure 36:

Figure 36.  Complete CMake installation

Page 26: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 26 / 31

7 Appendix C: Install Python 3.7.x 32-bit version

Use these screenshots to install Python 3.7.x in your Windows machine:

1. Go to https://www.python.org/downloads and download Python v.3.7.x 32 bitversion. Make sure you download Python v3.7.x 32 bit version.

Figure 37.  Download Python 3.7.x 32 bit version

2. Double click on the downloaded installer file. Select the "Install launcher for all users"and "Add Python 3.7 to Path" options and click Install Now as indicated in Figure 38:

Page 27: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 27 / 31

Figure 38.  Install Python 3.5.x 32 bit for Windows

3. Wait a few seconds until the installation is completed as indicated in Figure 39

Figure 39.  Python 3.5.x 32 bit installation completed

Page 28: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 28 / 31

8 Legal information

8.1 DefinitionsDraft — The document is a draft version only. The content is still underinternal review and subject to formal approval, which may result inmodifications or additions. NXP Semiconductors does not give anyrepresentations or warranties as to the accuracy or completeness ofinformation included herein and shall have no liability for the consequencesof use of such information.

8.2 DisclaimersLimited warranty and liability — Information in this document is believedto be accurate and reliable. However, NXP Semiconductors does notgive any representations or warranties, expressed or implied, as to theaccuracy or completeness of such information and shall have no liabilityfor the consequences of use of such information. NXP Semiconductorstakes no responsibility for the content in this document if provided by aninformation source outside of NXP Semiconductors. In no event shall NXPSemiconductors be liable for any indirect, incidental, punitive, special orconsequential damages (including - without limitation - lost profits, lostsavings, business interruption, costs related to the removal or replacementof any products or rework charges) whether or not such damages are basedon tort (including negligence), warranty, breach of contract or any otherlegal theory. Notwithstanding any damages that customer might incur forany reason whatsoever, NXP Semiconductors’ aggregate and cumulativeliability towards customer for the products described herein shall be limitedin accordance with the Terms and conditions of commercial sale of NXPSemiconductors.

Right to make changes — NXP Semiconductors reserves the right tomake changes to information published in this document, including withoutlimitation specifications and product descriptions, at any time and withoutnotice. This document supersedes and replaces all information supplied priorto 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 orsafety-critical systems or equipment, nor in applications where failure ormalfunction of an NXP Semiconductors product can reasonably be expectedto result in personal injury, death or severe property or environmentaldamage. NXP Semiconductors and its suppliers accept no liability forinclusion and/or use of NXP Semiconductors products in such equipment orapplications and therefore such inclusion and/or use is at the customer’s ownrisk.

Applications — Applications that are described herein for any of theseproducts are for illustrative purposes only. NXP Semiconductors makesno representation or warranty that such applications will be suitablefor the specified use without further testing or modification. Customersare responsible for the design and operation of their applications andproducts using NXP Semiconductors products, and NXP Semiconductorsaccepts no liability for any assistance with applications or customer productdesign. It is customer’s sole responsibility to determine whether the NXPSemiconductors product is suitable and fit for the customer’s applicationsand products planned, as well as for the planned application and use of

customer’s third party customer(s). Customers should provide appropriatedesign and operating safeguards to minimize the risks associated withtheir applications and products. NXP Semiconductors does not accept anyliability related to any default, damage, costs or problem which is basedon any weakness or default in the customer’s applications or products, orthe application or use by customer’s third party customer(s). Customer isresponsible for doing all necessary testing for the customer’s applicationsand products using NXP Semiconductors products in order to avoid adefault of the applications and the products or of the application or use bycustomer’s third party customer(s). NXP does not accept any liability in thisrespect.

Export control — This document as well as the item(s) described hereinmay be subject to export control regulations. Export might require a priorauthorization from competent authorities.

Evaluation products — This product is provided on an “as is” and “with allfaults” basis for evaluation purposes only. NXP Semiconductors, its affiliatesand their suppliers expressly disclaim all warranties, whether express,implied or statutory, including but not limited to the implied warranties ofnon-infringement, merchantability and fitness for a particular purpose. Theentire risk as to the quality, or arising out of the use or performance, of thisproduct remains with customer. In no event shall NXP Semiconductors, itsaffiliates or their suppliers be liable to customer for any special, indirect,consequential, punitive or incidental damages (including without limitationdamages for loss of business, business interruption, loss of use, loss ofdata or information, and the like) arising out the use of or inability to usethe product, whether or not based on tort (including negligence), strictliability, breach of contract, breach of warranty or any other theory, even ifadvised of the possibility of such damages. Notwithstanding any damagesthat customer might incur for any reason whatsoever (including withoutlimitation, all damages referenced above and all direct or general damages),the entire liability of NXP Semiconductors, its affiliates and their suppliersand customer’s exclusive remedy for all of the foregoing shall be limited toactual damages incurred by customer based on reasonable reliance up tothe greater of the amount actually paid by customer for the product or fivedollars (US$5.00). The foregoing limitations, exclusions and disclaimersshall apply to the maximum extent permitted by applicable law, even if anyremedy fails of its essential purpose.

Translations — A non-English (translated) version of a document is forreference only. The English version shall prevail in case of any discrepancybetween the translated and English versions.

Security — While NXP Semiconductors has implemented advancedsecurity features, all products may be subject to unidentified vulnerabilities.Customers are responsible for the design and operation of their applicationsand products to reduce the effect of these vulnerabilities on customer’sapplications and products, and NXP Semiconductors accepts no liability forany vulnerability that is discovered. Customers should implement appropriatedesign and operating safeguards to minimize the risks associated with theirapplications and products.

8.3 TrademarksNotice: All referenced brands, product names, service names andtrademarks are the property of their respective owners.

Page 29: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 29 / 31

TablesTab. 1. OM-SE050ARD development kit details ............4 Tab. 2. FRDM-K64F details ...........................................4

Page 30: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

AN12398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2019. All rights reserved.

Application note Rev. 2.0 — 25 November 2019534620 30 / 31

FiguresFig. 1. DAPLink firmware update - select board ...........5Fig. 2. DAPLink firmware update - select board ...........6Fig. 3. Enter bootloader mode ......................................6Fig. 4. Enter bootloader mode ......................................7Fig. 5. Enter bootloader mode ......................................7Fig. 6. Jumper configuration for FRDM-K64F ...............8Fig. 7. Arduino connectors of OM-SE050ARD and

FRDM-K64F boards .......................................... 8Fig. 8. OM-SE050ARD mounted in FRDM-K64F

board ................................................................. 9Fig. 9. Create se050_middleware folder .................... 10Fig. 10. Unzip se050 middleware .................................11Fig. 11. Generate SE050 Plug & Trust middleware

project examples ............................................. 12Fig. 12. SE050 middleware project structure ............... 12Fig. 13. Unplug and plug OpenSDA port ......................13Fig. 14. FRDM-K64F drive ........................................... 13Fig. 15. VCOM binary folder ........................................ 13Fig. 16. Drag and drop VCOM binary .......................... 14Fig. 17. Check VCOM and serial ports ........................ 15Fig. 18. Plug OpenSDA and USB FRDM-K64F ports. ...15Fig. 19. Open PlugAndTrustMW.sln Visual Studio

project solution ................................................ 16

Fig. 20. PlugAndTrustMW.sln Visual Studio projectworkspace ....................................................... 16

Fig. 21. Change VCOM port number in your solution ... 17Fig. 22. Set se05x_minimal as StartUp project ............ 17Fig. 23. Build and run se05x_minimal project .............. 18Fig. 24. Verify that se05x_minimal project is running ....18Fig. 25. Download Visual Studio IDE ........................... 19Fig. 26. Visual Studio IDE installation wizard ............... 19Fig. 27. Select desktop development with C++ ............ 20Fig. 28. Install desktop development with C++ .............20Fig. 29. Visual Studio installation - reboot ....................21Fig. 30. Download CMake ............................................22Fig. 31. Execute CMake installer ................................. 23Fig. 32. Run the CMake installer ..................................23Fig. 33. CMake installation wizard ............................... 24Fig. 34. Add CMake path ............................................. 24Fig. 35. Install CMake .................................................. 25Fig. 36. Complete CMake installation ...........................25Fig. 37. Download Python 3.7.x 32 bit version ............. 26Fig. 38. Install Python 3.5.x 32 bit for Windows ........... 27Fig. 39. Python 3.5.x 32 bit installation completed ....... 27

Page 31: EdgeLockTM SE050 Quick start guide with Visual Studio project examples · 2020-05-26 · AN12398 EdgeLockTM SE050 Quick start guide with Visual Studio project examples Rev. 2.0 —

NXP Semiconductors AN12398EdgeLockTM SE050 Quick start guide with Visual Studio project examples

Please be aware that important notices concerning this document and the product(s)described herein, have been included in section 'Legal information'.

© NXP B.V. 2019. All rights reserved.For more information, please visit: http://www.nxp.comFor sales office addresses, please send an email to: [email protected]

Date of release: 25 November 2019Document identifier: AN12398

Document number: 534620

Contents1 How to use this document .................................32 Hardware required .............................................. 43 Boards setup ....................................................... 53.1 Update FRDM-K64F board with DAPLink

firmware ............................................................. 53.2 OM-SE050ARD jumper configuration ................ 73.3 OM-SE050ARD and FRDM-K64F board

connection ..........................................................84 Run SE050 Plug & Trust middleware Visual

Studio project examples .................................. 104.1 Prerequisites .................................................... 104.2 Download SE050 Plug & Trust middleware ..... 104.3 Build SE050 Plug & Trust middleware project

examples ..........................................................114.4 Flash FRDM-K64F with VCOM software ......... 124.5 Execute SE050 Visual Studio project

examples ..........................................................155 Appendix A: Install Visual Studio

Community 2017 ............................................... 196 Appendix B: Install CMake ...............................227 Appendix C: Install Python 3.7.x 32-bit

version ................................................................268 Legal information ..............................................28