I'm using MQX 4.0 to develop touch driver, i wanna print float out but i can't do it.
i have already define XY to float.
But when i write the function printf("XY=%f\n",XY);
it do not print float out!
it print XY=f instead.
Please help me on this question why it won't print float out for me?
best regard
victor
Hi Victor:
I think you need to check your MCU supports floating point.
If it supports, the following steps need to be done to support float point
1 the task, which will use floating point, should be use attribute; MQX_FLOATING_POINT_TASK attribute, please refer to the below code snippet:
2 in user_config.h of bsp project, MQX_INCLUDE_FLOATING_POINT_IO should be defined as 1, and rebuild the bsp and psp project
3 set the vfpv4 in IDE , if you use IAR, please see the below picture
I did a quick test with the tchres_demo, it can work, I added the following code for test
The output is :
Hope it helps
Have a great day,
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Sorry, i can't find vfpv4 on my develop environment ! Please see the
attachment.
I'm using Keil u Vision5 to develope!
best regard
Victor
2016-10-09 14:54 GMT+08:00 danielchen@fsl <admin@community.freescale.com>:
NXP Community
<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>
Re: MQX 4.0 touch panel
reply from Daniel Chen
<https://community.nxp.com/people/danielchen@fsl?et=watches.email.thread>
in MQX Software Solutions - View the full discussion
<https://community.nxp.com/message/839063?commentID=839063&et=watches.email.thread#comment-839063>