Summary of Contents for NXP Semiconductors AN12398
Page 1
AN12398 EdgeLock SE05x Quick start guide with Visual Studio project examples Rev. 2.5 — 12 September 2022 Application note 534625 Document information Information Content Keywords EdgeLock SE05x, EdgeLock SE05x Plug & Trust Middleware, Visual Studio projects Abstract This document explains how to get started with EdgeLock SE05x Plug &...
Page 2
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Revision history Revision history Revision Date Description number 2019-06-08 First document release 2019-06-20 Update of board figures 2019-11-25 Update of CMake buld system materials 2019-12-17 Corrected OM-SE05xARD J14 jumper setting...
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples How 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.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Hardware required 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.
Page 5
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Table 2. FRDM-K64F details Part number 12NC Content Picture FRDM-K64F 935326293598 Freedom development platform for Kinetis K64, K63 and K24 MCUs AN12398 All information provided in this document is subject to legal disclaimers.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Boards setup 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: OM-SE05xARD jumper configuration.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Figure 2. Arduino connectors of OM-SE05xARD and FRDM-K64F boards Double check that the two boards are connected as shown in Figure Figure 3. OM-SE05xARD mounted in FRDM-K64F board...
Page 8
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 1. Unplug and plug again the USB cable to the openSDA USB port as shown in Figure Figure 4. Unplug and plug OpenSDA port 2. When you plug the board, your laptop should recognize the board as an external drive...
Page 9
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Flash the VCOM software to FRDM-K64F. The VCOM software binary can be found in the Plug & Trust middleware package, inside the simw-top\binaries folder as shown in Figure Figure 6. ...
Page 10
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples might change depending on your computer. Therefore, it is important that you identify which device is recognized at the moment you plug the SDA USB port to the computer.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Run 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.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Unzip the Plug & Trust middleware inside the se05x_mw folder. After unzipping, you will see a folder called simw-top created. The contents of the simw-top directory...
Page 13
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 2. Define the environment: (2) Send >> env_setup.bat Figure 11. Generate Plug & Trust middleware define the environment Depending on your PC installation you may need to update the application file locations within the env_setup.bat file.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio 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 Figure 13. SE050 middleware project structure 4.4 Execute EdgeLock SE05x Visual Studio project examples...
Page 15
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 2. Open the CMake configuration menu as shown in Figure 15 and ensure that all the flags are set properly for your use case. a. Open a command prompt and go to the directory where the Plug & Trust middleware is built.
Page 16
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples development board or a different secure element product IC. The settings are described in Section 5. The default SE050E settings are shown in Figure In this example we use plain communication. Plain communication for the example execution is enabled by selecting the following options: •...
Page 17
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Go to the C:\se05x_mw\simw-top_build\se_x86 directory. Double click the PlugAndTrustMW.sln Visual Studio project solution as shown in Figure Figure 17. Open PlugAndTrustMW.sln Visual Studio project solution AN12398 All information provided in this document is subject to legal disclaimers.
Page 18
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 4. The Visual Studio IDE will open with the Plug & Trust middleware project examples included in the workspace as can be seen in Figure Figure 18. PlugAndTrustMW.sln Visual Studio project workspace 5.
Page 19
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 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 Set...
Page 20
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 8. Click on Local Windows Debugger button in the top menu to run se05x_minimal project as shown in Figure 22. The project will be executed after the project building process has finished.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Product specific CMake build settings The NXP Plug & Trust middleware supports the SE05x Secure Elements, the A5000 Secure Authenticator, and the legacy A71CH products. The EdgeLock Plug & Trust middleware is delivered with CMake files that include the set of directives and instructions describing the project's source files and the build targets.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Binding EdgeLock SE05x to a host using Platform SCP Binding is a process to establish a pairing between the IoT device host MPU/MCU and EdgeLock SE05x, so that only the paired MPU/MCU is able to use the services offered by the corresponding EdgeLock SE05x and vice versa.
Page 26
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples The establishment of an SCP03 channel requires three static 128-bit AES keys shared between the two communicating parties: Key-ENC, Key-MAC and Key-DEK. These keys are stored in the Java Card Secondary Security Domain (SSD) and not in the secure authenticator applet.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples SCP03 – Command protection Platform SCP creates an encrypted channel using Global Platform SCP03 • Figure 25. SPC03 mutual authentication – principle Plain communication Command Command data 040022...
Page 28
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Figure 27. Default Platform SCP keys are defined in ex_sss_tp_scp03_keys.h The fsl_sss_ftr.h.in file includes options to select one of the predefined default Platform SCP keys. This file is located in: C:\se05x_mw\simw-top\sss\inc Select the desired value of the compilation option by setting exclusively the corresponding C-preprocessor define SSS_PFSCP_ENABLE_xx to 1 (enable).
Page 29
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples the fsl_sss_ftr.h feature file. Selections from CMake edit cache would automatically make relevant updates into the generated feature file. Note: The Platform SCP key selection in the fsl_sss_ftr.h.in CMake input file is persistent.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Table 14. Platform SCP key define prefix for A5000 product variants Variant OEF ID Platform SCP key define to be set to '1' A5000 Dev. Board A736...
Page 31
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Figure 29. SE050E CMake Settings - PlatformSCP enabled If you have edited any of the parameters in the menu, before exiting press the buttons Configure and Generate to apply the changes. In the next step we need to rebuild the Visual Studio solution.
Page 32
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Figure 30. Verify that se05x_minimal project is running with Platform SCP enabled The Plug & Trust Middleware provides the following additional examples to rotate the PlatformSCP Keys and to mandate Platform SCP.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Appendix A: Install Visual Studio 2022 Visual Studio is Microsoft's fully-featured IDE for Android, iOS, Windows, web, and cloud. Visual Studio 2022 introduces rich support for CMake, including cross-platform CMake projects.
Page 34
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. An *.exe installer will download to your laptop. Double click on the installer file and follow the setup wizard until the installation is completed. This process might take a few minutes.
Page 35
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 5. Visual C++ Tools for CMake is installed by default as part of the Desktop development with C++ workload. This process might take several minutes. Figure 35...
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 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 minimal dependencies, requiring only a C++ compiler on its own build system.
Page 37
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Double click on the downloaded installer file. Windows Defender SmartScreen might pop-up the wizard shown in Figure Figure 37. Execute CMake installer 4. If this is your case: Click (1) on More info and then (2) click on Run anyway as...
Page 38
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 5. The CMake installation wizard will open. Click (1) Next and (2) accept the End-User License Agreement as shown in Figure Figure 39. CMake installation wizard 6. As part of the CMake setup, (1) Add Cmake to the system PATH for all users and...
Page 39
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 7. Select a destination folder, (1) click Next and then (2) click Install as shown in Figure Figure 41. Install CMake 8. Wait a few seconds until the installation is completed and click Finish as shown in Figure Figure 42. ...
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples Appendix C: Install Python This section explains how to install Python ≥ 3.7.x and ≤ 3.9.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.
Page 41
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Wait a few seconds until the installation is completed as indicated in Figure 45 Figure 45. Python 3.9.x 32 bit installation completed AN12398 All information provided in this document is subject to legal disclaimers.
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 10 Appendix D: 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 open- source bootloader and enables developers with drag-and-drop programming, a serial port and CMSIS-DAP based debugging.
Page 43
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 3. Download the latest DAPLink firmware version as shown in Figure Figure 47. DAPLink firmware update - select bootloader 4. Start the board's bootloader mode. To do so, (1) keep reset button pressed while (2)
Page 44
AN12398 NXP Semiconductors EdgeLock SE05x Quick start guide with Visual Studio project examples 5. Drag and drop or copy and paste the binary file into the BOOTLOADER drive from your computer file explorer as shown in Figure 49. The FRDM-K64F will automatically un-mount after the drag and drop operation.
11.1 Definitions 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 Draft — A draft status on a document indicates that the content is still customer’s third party customer(s).
Need help?
Do you have a question about the AN12398 and is the answer not in the manual?
Questions and answers