Can't pass float variables between A5 and M4 core using MCC

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Can't pass float variables between A5 and M4 core using MCC

跳至解决方案
1,178 次查看
swapnilv
Contributor III

Hi,

I have MQX 4.0.1 installed on my pc.

I tried to flash the sample pingpong example given for MCC demo for twrvf65gs10 tower board on Vybrid evaluation kit.

I am able to see the desired output on terminal.

But when I try to pass float variable value  between A5 and M4 core; those values are not getting passed.

Even simple printf is not showing the float variable value.

I tried to declare simple float variable in main_task in file mcc.c and print the variable value on terminal as explained below:

float myTemp = 50.00;

printf("Test flt Variable: %f \n",myTemp);

But the float variable values are not shown on terminal window.

Output of print command is as shown below on terminal window:

Test flt Variable: f

Expected output is:

Test flt Variable: 50.000000;

Kindly look into it and let me know the solution.

Thanks & Regards,

Swapnil

0 项奖励
回复
1 解答
1,015 次查看
swapnilv
Contributor III

Hi,

Below flag was set to 0 in twrvf65gs10_a5 project "user_config.h" file.

#define MQX_INCLUDE_FLOATING_POINT_IO   0

I changed it to 1 and now I can see the float values correctly.

Swapnil

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,015 次查看
swapnilv
Contributor III


Hi,

Any updates/inputs regarding above mentioned issue ?

Because a simple printf() is also not working for float variables.

Regards,

Swapnil

0 项奖励
回复
1,016 次查看
swapnilv
Contributor III

Hi,

Below flag was set to 0 in twrvf65gs10_a5 project "user_config.h" file.

#define MQX_INCLUDE_FLOATING_POINT_IO   0

I changed it to 1 and now I can see the float values correctly.

Swapnil

0 项奖励
回复