6 Installing MPLAB® Code Configurator Melody Trust Anchor Library

Installing MPLAB® Code Configurator Trust Anchor Library

For the Trust Anchor family of secure element devices, such as the TA100, a separate firmware sub-module is required that is distributed through the Microchip Secure Document portal. Before using the CryptoAuthentication Library module in MCC Melody, a user must separately download and install the Trust Anchor Library sub-module.

The following instructions describe how to acquire and manually install the Trust Anchor Library in MPLAB® X IDE after the MPLAB® Code Configurator Melody CryptoAuthentication Library has been installed. For instructions on installing the MPLAB® Code Configurator Plug-in & CryptoAuthentication Library, please see the “Installing Melody CrytoAuth Library” section.

Acquiring the MPLAB® Code Configurator Trust Anchor Library

  1. Access to this library requires that the user has a myMicrochip account as well as a NDA. If you do not have a myMicrochip account or an existing NDA, create an account by following the instructions found in the link below. These instructions also detail how to request access to the required documents by specifying which secure device you are working with (e.g. TA100):microchipsupport.force.com/s/article/Secure-Document-Access-Request-using-myMicrochip-Account NOTE: To request access to the TA100 library, go to the request access page of myMicrochip. Enter TA-Lib-MCC in the "All Products" search bar. Then in the field/drop-down below select the product TA-Lib-MCC and follow the instructions on myMicrochip for submitting the request.
  2. After you have been given permissions to access the Trust Anchor associated documents, log back into the myMicrochip website to access those documents.
  3. Under the "myMicrochip > Dashboard", select My Products.
  4. Select TA-Lib-MCC from the list of products
  5. Select the desired TA Library for MCC (if multiple versions are available) and download the associated .zip file to your machine.

Installing the MPLAB® Code Configurator Trust Anchor Library

  1. Unzip the .zip downloaded from the secure documents website.
  2. Close any MPLAB® X IDE sessions that may be open.
  3. Open a folder to your local MCC libraries folder. The location of this folder will vary based on the OS and the user. For example, this might be C:\Users\<UserName>\.mcc\libraries on a Windows machine.
  4. Look for a folder named @mchp-mcc-local. If this folder does not exist, create a new folder. If it does exist, open that folder.
  5. Copy the trust-anchor-library folder from the downloaded folder into your @mchp-mcc-local folder library folder. If this folder already exists on your machine, you can overwrite the files.
  6. The last step is to create or update the local C:\Users\<UserName>\.mcc\libraries\catalog.json file entry. Go back to your MCC libraries folder as described in step 3 and look for a C:\Users\<UserName>\.mcc\libraries\catalog.json file.
    1. If this file does not exist, copy the catalog.json file in the downloaded folder to C:\Users\<UserName>\.mcc\libraries folder.
    2. If this file does exist already, follow the instructions below to merge the two files so we end up with a single C:\Users\<UserName>\.mcc\libraries\catalog.json file.

Merging two catalog.json files.

  1. Close any MPLAB® X IDE sessions that may be open.
  2. Create a backup copy of the existing catalog.json file just in case mistakes are made.
  3. Open both catalog.json files in a text editor, both the C:\Users\<UserName>\.mcc\libraries\catalog.json file and the one in the unzipped TA Library for MCC download package.
  4. In the file catalog.json from the TA Library for MCC download, complete the following:
    1. Locate the bolded section @mchp-mcc/trust-anchor-library shown below inside the content object array. Copy the section with the starting "{" and the ending "}" highlighted below:
      {
          "name": "@mchp-mcc/local-catalog",
          "version": "1.0.0",
          "content": [
              {
                  "name": "@mchp-mcc/trust-anchor-library",
                  "version": "*",
                  "meta": {
                      "keywords": [
                          "avr",
                          "pic8",
                          "pic24",
                          "dspic",
                          "driver",
                          ""
                      ],
                      "name": "Trust Anchor Library",
                      "category": "Libraries",
                      "deviceFilterRegEx": ".*",
                      "defaultSelection": true
                  }
              }
          ],
          "catalogs": []
      } 
    2. Find the content object array in your local .mcc\libraries\catalog.json file
    3. Search through the object array to see if the @mchp-mcc/trust-anchor-library entry exists already. If it does, you can stop here. If it does not, please continue with the rest of the instructions.
    4. Locate the end of the existing content object array, add a comma to the last entry, and paste the copied object from the TA Library for MCC download into the local catalog file. An example is provided below using the @mchp-mcc/crypto-authentication-library as an example of an existing local library. Your system may have other local files or packages, this is just an example.
      {
          "name": "@mchp-mcc/local-catalog",
          "version": "1.0.0",
          "content": [
              {
                  "name": "@mchp-mcc/crypto-authentication-library",
                  "version": "*",
                  "meta": {
                      "keywords": [
                          "avr",
                          "pic8",
                          "dspic",
                          "pic24",
                          "driver",
                          ""
                      ],
                      "name": "CryptoAuthentication Library",
                      "category": "Libraries",
                      "deviceFilterRegEx": ".*",
                      "defaultSelection": true
                  }
              },
              {
                  "name": "@mchp-mcc/trust-anchor-library",
                  "version": "*",
                  "meta": {
                      "keywords": [
                          "avr",
                          "pic8",
                          "pic24",
                          "dspic",
                          "driver",
                          ""
                      ],
                      "name": "Trust Anchor Library",
                      "category": "Libraries",
                      "deviceFilterRegEx": ".*",
                      "defaultSelection": true
                  }
              }
          ],
          "catalogs": []
      }
    5. Save the catalog.json file.

Verifying the change

  1. After these changes have been made, start MPLAB® X IDE.
  2. Open an existing project or create a new project with a supported device.
  3. Open MCC.
  4. Under Device Resources, select Content Manager
  5. Inside of Content Manger, open Libraries. If everything was successful, you should be able to see an entry for Trust-Anchor-Library as shown below.