2026-02-03 3:25 PM
Hi everyone,
I’m working on an STM32CubeIDE project generated with CubeMX and I’m trying to integrate mbedTLS to run a TLS stack.
Setup details:
MCU: STM32U375
Secure Element: STSAFE-A120
IDE: STM32CubeIDE (v2.0.0)
CubeMX (v6.16.1) used for project generation
After generating the project with CubeMX, I see the following components:
Middlewares/ST/STM32_Cryptographic
Middlewares/ST/STSElib
X-CUBE-STSE01/Target folder at the project root
However, I can’t find any option in CubeMX → Middleware to enable or add mbedTLS. From what I can tell, CubeMX doesn’t expose mbedTLS as a selectable middleware for this MCU / configuration.
I’ve seen suggestions (including from Google AI) that mbedTLS needs to be added manually, for example by:
Adding the mbedTLS source to Middlewares/Third_Party/mbedtls
Updating include paths and compiler symbols
Configuring mbedtls_config.h
Potentially hooking mbedTLS crypto callbacks to the STM32 cryptographic drivers or STSAFE services
My questions:
Is manually adding mbedTLS to Middlewares/Third_Party/mbedtls the recommended approach for STM32U3 projects?
Has anyone successfully integrated mbedTLS + STSAFE-A120 for a full TLS stack on STM32U375?
Are there any ST reference projects, application notes, or best practices for connecting mbedTLS with:
STM32 Cryptographic middleware
STSAFE-A120 (key storage, crypto offload, etc.)?
Am I missing a CubeMX option or expansion package that would enable mbedTLS automatically?
Any guidance from someone who has already gone through this would be greatly appreciated.
Thanks in advance!
If you want, I can: