when I printf a float variable by calling PRINTF function in the freescale library,the ucos ii kernel stop scheduling,I don't kown why,the attachment is the source code ,please help me find the problem,thank you all!
IDE:Keil MDK V5.16
MCU:MK24FN1M0VDC12
Debug_console:UART3
Result :as below
Original Attachment has been moved to: ucos_t1.rar
Hello,
When building the demo with GCC, ensure that the demo and platform library are built with this option:
<code>
Otherwise, the project does not use the Kinetis device’s hardware floating point when using the CMSIS-- DSP library.
<br>CHOOSE_FLOAT=HARD_FP <br>
</code>
In addition please check the below threads.
GENERAL: PRECISION OF PRINTF %F FORMAT STRING
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------