Hi Brian,

 

Yes, the function pointer is declared with the incorrect type. I have made a fix here: https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/28595

 

Let me know if that works for you.

 

Kind regards,

Jamie

 

From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Friday, April 26, 2024 6:58 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] build warning with PSA_FRAMEWORK_HAS_MM_IOVEC

 

Hi,

 

I noticed this build warning with PSA_FRAMEWORK_HAS_MM_IOVEC enabled.  runtime_defs.h need to be updated to add the `const` qualifier I think.

 

tfm/secure_fw/spm/core/psa_interface_thread_fn_call.c:287:33: warning: initialization of 'void * (*)(psa_handle_t,  uint32_t)' {aka 'void * (*)(long int,  long unsigned int)'} from incompatible pointer type 'const void * (*)(psa_handle_t,  uint32_t)' {aka 'const void * (*)(long int,  long unsigned int)'} [-Wincompatible-pointer-types]

  287 |                                 psa_map_invec_thread_fn_call,

      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

/tfm/secure_fw/spm/core/psa_interface_thread_fn_call.c:287:33: note: (near initialization for 'psa_api_thread_fn_call.psa_map_invec')

 

Regards,

 

Brian Quach

SimpleLink MCU

Texas Instruments Inc.