Hi Brian,

The ${COMPILER_CP_FLAG} flag is already imported to crypto_service_mbedcrypto target by link with platform_s (the flags are added in platform_s target).
When I enabled FPU cmake build option, the fpu flags were in my local crypto_service_mbedcrypto.dir flags.make file:
-mfpu=fpv5-d16 -mfloat-abi=hard
Did you face any issues when trying p256m? I noticed p256m does not inherit FP flag but it won't affect the build and running on my side.


Best Regards,
Summer

From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Saturday, December 2, 2023 12:26 AM
To: tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.org>
Subject: [TF-M] FPU flags for mbedTLS targets
 

Hi,

 

/secure_fw/partitions/crypto/CMakeLists.txt is missing passing compiler flags to mbedTLS targets which would be needed for correct FPU flags.  I believe the highlighted code would be the fix:

 

target_compile_options(${MBEDTLS_TARGET_PREFIX}mbedcrypto

    PRIVATE

        ${COMPILER_CP_FLAG}

        $<$<C_COMPILER_ID:GNU>:-Wno-unused-const-variable>

        $<$<C_COMPILER_ID:GNU>:-Wno-unused-parameter>

        $<$<C_COMPILER_ID:ARMClang>:-Wno-unused-const-variable>

        $<$<C_COMPILER_ID:ARMClang>:-Wno-unused-parameter>

)

 

 

target_compile_options(${MBEDTLS_TARGET_PREFIX}p256m

    PRIVATE

        ${COMPILER_CP_FLAG}

)

 

 

Regards,

 

Brian Quach

SimpleLink MCU

Texas Instruments Inc.

12500 TI Blvd, MS F-4000

Dallas, TX 75243

214-479-4076