MQX 4.0 touch panel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX 4.0 touch panel

708 Views
wangtsungli
Contributor IV

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!

123.bmp

it print XY=f instead. 

1234.bmp

Please help me on this question why it won't print float out for me?

best regard

victor

Tags (2)
0 Kudos
4 Replies

521 Views
danielchen
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

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

pastedImage_2.png

I did a quick test with the tchres_demo, it can work,  I added the following code for test

pastedImage_6.png

The output is :

pastedImage_7.png

Hope it helps


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

521 Views
wangtsungli
Contributor IV

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>

0 Kudos

520 Views
danielchen
NXP TechSupport
NXP TechSupport

For Keil, please check the floating point hardware at Target tab

pastedImage_1.png

Regards

Daniel

0 Kudos

520 Views
wangtsungli
Contributor IV

Thank you! I have solved my problem!

0 Kudos