Skip to main content
Associate
March 10, 2026
Question

STM32TrustedPackageCreator problem with HSM, HSM_P11_Lib.dll cannot be loaded.

  • March 10, 2026
  • 4 replies
  • 327 views

STM32CubeProgrammer_CLI STM32TrustedPackageCreator problem with HSM, HSM_P11_Lib.dll cannot be loaded. GUI STM32CubeProgrammer works fine. Where that dll should be located? I Am using win11 pro.

 

4 replies

ST Employee
March 10, 2026

Hello @Kipe and welcome to the community! 
HSM_P11_Lib.dll should be in /bin and in /api/lib folders.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
KipeAuthor
Associate
March 12, 2026

HSM_P11_Lib.dll should be in /bin and in /api/lib folders. They are in there.

In Trusted side it can't find HSM? always error about missing .dll? Cube programmer works, why?

ST Employee
March 13, 2026

Hello @Kipe,
I wasn't able to reproduce this behavior on my side.
Could you please try the following and let me know the result:

  • Confirm that you installed the latest version of STM32CubeProgrammer v2.22 64-bit (since you're using Windows 11)
  • Run TrustedPackageCreator as administrator.

Also to investigate further, can you provide me the exact windows version and the full path of both TrustedPackageCreator that you're running and the HSM_P11_Lib.dll.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
KipeAuthor
Associate
March 25, 2026

hi again.

I'm using 64-bit windows 11 Pro (24H2).

so I was thinking to use 64-bit installation for cubeprogrammer.

Installation path C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\  .

Now I installed 32-bit cubeprogrammer to path

C:\Program Files (x32)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin

and from there it works now fine.

So, is there some dependency on trusted side HSM for 32-bit or what? I'm very confused now.

 

ST Employee
April 7, 2026

Hello @Kipe ,
I was able to recreate the issue on my side, and the team is working on a fix. (Internal ticket ID: 0061138)

I'll let you know ASAP whenever the fix is delivered.

PS: Ticket ID: 0061138 is an internal tracking number and is not accessible or usable by customers.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.