examples: TF-M: Enable full libc
The TF-M example was previously built with small libc, because the Arm Compiler's full libc's printf uses floating point in its string formatting algorithm but TF-M did not permit non-secure access to the FPU. Now with the new config option `CONFIG_TFM_ENABLE_FPU` available, enable it to permit non-secure usage of the FPU. Hence enable full libc in the TF-M examples. Also fix an unrelated side effect of using the Arm Compiler's full libc in conjunction with CMSIS RTX: Switch RTX mutex allocation to be from the heap. Previously, the pool of four static mutex objects was sufficient for the TF-M NS interface but now RTX's integration[1] with Arm libc's thread safety mechanism[2] requires five additional mutex objects. Allocating mutex objects from the heap removes the need to hardcode the number of objects. The thread in the TF-M example is already heap-allocated anyway, so this change does not introduce any inconsistency. [1] https://github.com/ARM-software/CMSIS_5/blob/5.9.0/CMSIS/RTOS2/RTX/Source/rtx_lib.c#L756-L799 [2] https://developer.arm.com/documentation/100073/0618/The-Arm-C-and-C---Libraries/Multithreaded-support-in-Arm-C-libraries/Management-of-locks-in-multithreaded-applications?lang=en Signed-off-by:Lingkai Dong <lingkai.dong@arm.com>
Loading
Please register or sign in to comment