cancel
Showing results for 
Search instead for 
Did you mean: 

Errors building TFM example for U545

Kazimierz Król
Associate III

Hi, I'm trying to build TFM example applications from the B-U585I-IOT02A directory to work on Nucleo-U545RE board. THe documentation says it's possible. I have updated the project settings, but I'm getting errors from the STSAFE library:

 

C:/Work/OldCourse/SecureBootTesting_ST/Projects/B-U585I-IOT02A/Applications/TFM/TFM_Appli/Secure/Src/stsafea_service_interface.c:92:51: warning: implicit declaration of function '__HAL_RCC_GPIOF_CLK_ENABLE' [-Wimplicit-function-declaration]
   92 | #define STSAFEA_VREG_GPIO_PORT_CLK_ENABLE         __HAL_RCC_GPIOF_CLK_ENABLE
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Work/OldCourse/SecureBootTesting_ST/Projects/B-U585I-IOT02A/Applications/TFM/TFM_Appli/Secure/Src/stsafea_service_interface.c:301:3: note: in expansion of macro 'STSAFEA_VREG_GPIO_PORT_CLK_ENABLE'
  301 |   STSAFEA_VREG_GPIO_PORT_CLK_ENABLE();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Work/OldCourse/SecureBootTesting_ST/Projects/B-U585I-IOT02A/Applications/TFM/TFM_Appli/Secure/Src/stsafea_service_interface.c:91:51: error: 'GPIOF' undeclared (first use in this function); did you mean 'GPIOG'?
   91 | #define STSAFEA_VREG_GPIO_PORT                    GPIOF
      |                                                   ^~~~~

 

The problem seems to be coming from the fact that this MCU does not have GPIOF port. Instead of editing the file I would prefer to disable the STSAFE altogether, because I have no intention of using it.

I tried to remove the STSAFE_A110 definition, but then I got more compilation errors.

Also tried to set TFM_PSA_API to zero, but it didn't change anything.

Is there an official way to disable STSAFE?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jocelyn RICARD
ST Employee

Hello @Kazimierz Król ,

According to readme, STSafe usage is disabled by default. It should be enabled using PSA_USE_SE_ST flag.

So, I guess this configuration was not properly tested.

You should be able to remove any file related to STSafe from compilation, starting from this stsafea_service_interface.c

Now I didn't check if this was enough on my side

Best regards

Jocelyn

View solution in original post

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello @Kazimierz Król ,

According to readme, STSafe usage is disabled by default. It should be enabled using PSA_USE_SE_ST flag.

So, I guess this configuration was not properly tested.

You should be able to remove any file related to STSafe from compilation, starting from this stsafea_service_interface.c

Now I didn't check if this was enough on my side

Best regards

Jocelyn

Kazimierz Król
Associate III

Thanks. I managed to build the example without errors by disabling compilation for:

  • stsafea_crypto_interface.c
  • stsafea_service_interface.c
  • Middlewares/stsafe_a directory