Hello all,
I am using custom board based on i.MX8MP EVK. I am using the SDK created from NXP MCUXpresso SDK builder for i.MX8MPEVK. I am not using the MCUXpresso IDE as it is not supported for i.MX8MP platform so building the examples on Ubuntu 20.04 using gcc-arm toolchain. Looking at the examples for M7 co-processor (ecspi polling), I'm unable to print floating point values. The floating point values are stored correctly and in the flags.cmake I see that the below flags are defined.
-mfloat-abi=hard
-mfpu=fpv5-sp-d16
The statement - PRINTF("Execution timer: %s\n\rTime: %u ticks %2.5f milliseconds\n\rDONE\n\r", "1 day", 86400, 86.4); doesn't print 86.4, just a blank space. If I check the hex value at the address of a float variable, the value is correct which means only PRINTF has issue printing the float value.
float test = 86.6;
uint32_t *ptr = (int32_t *)&test;
PRINTF("float in hex - %x\r\n", *ptr);
outputs - 0x42ad3333 which is correct for 86.6
Does any one know how to get the custom PRINTF function of the SDK to print floating point values? Is it the problem with the C library being used for M7 co-processor examples build?
Thanks.