lcu14_optee_hello_world icon indicating copy to clipboard operation
lcu14_optee_hello_world copied to clipboard

how to print "double" or "float" value in TA side?

Open Tigerly opened this issue 7 years ago • 3 comments

I have a naive question, when I try to print a double value using "printf", like printf("double a == %f", a); In the TA side, it returns "f" instead of the correct value.

My questions are: 1, How should I do to print double or float value in TA side? 2. Why does it returns "f" for my "printf" code?

Thanks in advance!

Tigerly avatar Sep 19 '17 02:09 Tigerly

The printf() implementation doesn't support printing floating point types. Patches are welcome! :-)

jenswi-linaro avatar Sep 19 '17 08:09 jenswi-linaro

Thanks for replying! Got it. So, how can I print a double or float value? Does op-tee provide some functions?

Tigerly avatar Sep 19 '17 14:09 Tigerly

No, there's no functions already available in OP-TEE for that (unless there's something under lib/libutils/isoc/arch/arm/softfloat, but that's not available for Aarch64).

jenswi-linaro avatar Sep 20 '17 08:09 jenswi-linaro