jenswi-linaro / lcu14_optee_hello_world

22 stars 16 forks source link

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

Open Tigerly opened 7 years ago

Tigerly commented 7 years ago

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?

  1. Why does it returns "f" for my "printf" code?

Thanks in advance!

jenswi-linaro commented 7 years ago

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

Tigerly commented 7 years ago

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

jenswi-linaro commented 7 years ago

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).