STM32CubeIDE¶
wolfTPM is available as an STM32 Cube Pack, I-CUBE-wolfTPM.pack, downloadable from https://www.wolfssl.com/files/ide/I-CUBE-wolfTPM.pack. The pack has an optional but recommended dependency on the wolfCrypt library. The files live in IDE/STM32CUBE in the wolfTPM source tree.
Note
This page is short and will be expanded later.
Setup¶
- Set up the wolfCrypt library in your ST project by following the wolfSSL STM32Cube guide: https://github.com/wolfSSL/wolfssl/blob/master/IDE/STM32Cube/README.md. To run the wolfTPM unit tests, name the entry function
wolfTPMTestinstead ofwolfCryptDemo. - Install the wolfTPM Cube Pack in the same way as the wolfSSL pack, using CubeMX.
- Open the project
.iocfile, click theSoftware Packsdrop-down menu, thenSelect Components. Expand thewolfTPMpack and check all the components. - In the
Software Packsconfiguration category of the.iocfile, click the wolfTPM pack and enable the library by checking the box. - In the
Connectivitycategory, find and enable SPI for your project. - In the
Software Packsconfiguration category, open the wolfTPM pack and set theEnable wolfCryptparameter to True. - Save your changes and answer yes to the prompt asking about generating code.
- Build the project and run the unit tests on the target.
Notes¶
Redirect printf to the UART so the test output is visible. See the STM32 printf changes in the wolfSSL guide.
See Also¶
- Building, for the bare-metal build options
- System Interfaces, for the SWTPM over UART example on STM32H5
- Embedded Integrations