User guide

This page provides details about the usage of the OPTIGA™ Authenticate NBT Host Library for ModusToolbox™.

Getting started

See the GitHub repository for the background information on how to use this middleware for microcontrollers in ModusToolbox™. It also provides information about how to add this middleware to custom ModusToolbox™ projects.

Middleware details

In general, this middleware re-uses the generic OPTIGA™ Authenticate NBT Host Library for C. The library’s source files are stripped down and copied to the nbt folder.

In addition there are some ModusToolbox™-specific config files and a ready-to-use implementation of the library’s PAL based on the cyhal-layer, an abstraction available for many ModusToolbox™-supported MCUs.

Project layout

The OPTIGA™ Authenticate NBT Host Library for ModusToolbox™ is structured as follows:

Listing 1 Project layout (simplified).
optiga-nbt-lib-c-mtb/
├── images/                    # Documentation images
├── nbt/                       # Core library source files
├── nbt-mtb/                   # ModusToolbox™-specific PAL implementations
│   ├── i2c-cyhal/             # I2C interface implementation based on Cypress HAL
│   ├── logger-cyhal-rtos/     # Logger layer wrapping logging into RTOS tasks
│   ├── logger-printf/         # Logger implementation based on printf
│   ├── timer-cyhal/           # Timer implementation based on Cypress HAL
│   └── timer-freertos/        # Timer implementation based on FreeRTOS timers
├── .cyignore                  # Cypress-specific ignore file
├── EULA.txt                   # End User License Agreement
├── LICENSE                    # License file
├── README.md                  # Project overview and instructions
└── RELEASE.md                 # Release notes and changelog

Platform abstraction layer (PAL) implementation

The OPTIGA™ Authenticate NBT Host Library for ModusToolbox™ includes implementations of the PAL for the C host library. These platform-specific implementations are located in the mtb_shared/optiga-nbt-lib-c-mtb/release-vX.X.X/nbt-mtb folder. The implementations are built on the generic cyhal-layer, an abstraction available for many ModusToolbox™-supported MCUs or FreeRTOS functionality, which is also available for many ModusToolbox™-supported MCUs.

Table 7 Overview of the provided PAL implementations.

Implementation

Description

i2c-cyhal

I2C interface implementation based on the Cypress HAL

logger-cyhal-rtos

Additional logger layer, wrapping the logging function into an RTOS task

logger-printf

Logger implementation, based on printf

timer-cyhal

Timer implementation, based on the Cypress HAL

timer-freertos

Timer implementation, based on the FreeRTOS timers