S32DS ARM 2.2: How to Enable %f support in printf statements

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

S32DS ARM 2.2: How to Enable %f support in printf statements

91 次查看
poweric
Contributor I

Apparently there is a Linker switch for this in the MCUXpresso IDE. I can't find anything about it in the S32DS ARM 2.2 IDE. Can anyone point me in the right direction?

Thank you.

0 项奖励
回复
1 回复

9 次查看
poweric
Contributor I

Thank you for your reply Erich.

After reading your prior postings on this, I felt pretty confident that I had a solid solution to the problem I am seeing. Please let me show you what I did, and the results.

First, I started a new S32DS project, selecting the SKEAZ128 MCU and then under Library, NewLib Nano. After the project creation, I then launched the Project Settings dialog and selected the "Support print float format" checkbox.

pastedImage_1.png

The program was from the KEAZ128 SDK drivers "FRDM_KEA128_ADC_Polling.c", with the following two lines added just before the main while loop:

ADC_VOLTS = 3.3;
printf("\nPOTENTIOMETER: %f volts\n", ADC_VOLTS);

The result I get is:

POTENTIOMETER: f volts

So what's up I asked myself. Finally, I took a closer look at the printf.c driver in the SDK. The 'f' token is not even addressed in the parsing switch!

I am sorry but I have to vent on this one. How is anybody to know this, and how can NXP expect us to get some work done when you have to spend your time debugging the tools? 

Best Regards,

Bill

0 项奖励
回复