<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How to print floating values on KDS3.0 and KSDK1.2</title><link>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/945/how-to-print-floating-values-on-kds3-0-and-ksdk1-2</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>How to print floating values on KDS3.0 and KSDK1.2</title><link>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/945/how-to-print-floating-values-on-kds3-0-and-ksdk1-2</link><pubDate>Wed, 06 Oct 2021 20:41:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a8d9508a-bec5-45d7-a8d8-d3d79ab81b8a</guid><dc:creator>bheemarao</dc:creator><comments>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/945/how-to-print-floating-values-on-kds3-0-and-ksdk1-2#comments</comments><description>Current Revision posted to Documents by bheemarao on 10/6/2021 8:41:19 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;Below is the tips for printing the floating values using KDS3.0 and KSDK1.2.0&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;While I was using FRDM-KL46Z freedom board to interface STBC-AGM01 sensor board i was suppose to print the sensor data (floating values) on UART terminal i tried to add below includes in the linker options&lt;/p&gt;&lt;p style="margin:0;"&gt;Cross ARM C++ Linker &amp;gt; Miscellaneous&amp;quot; &amp;gt; other linker flag&amp;gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;quot;-nanolibc -u _printf_float&amp;quot; which did not worked as expected &lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/1373x728/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_60478.png"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_60478.png-1373x728.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=LctSzYFfCeV317spTRCg7loO9XQyBeYkxyW61liJA78%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=rcKJ/MNPqgVqk8b/a9oRcQ==" style="max-height: 728px;max-width: 1373px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;so the solution to print floating values in KSDK is in&amp;nbsp; &amp;quot;print_scan.h&amp;quot; file &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;navigate to &lt;span style="text-decoration:underline;"&gt;project folder &amp;gt; SDK &amp;gt; Utilities &amp;gt; src &amp;gt; print_scan.h&lt;/span&gt; as shown below&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/984x682/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_60479.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_60479.png-984x682.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=qn6SmLsRGiZCgY%2B3zXYgO2q1q320dh0UtBJfoBAgiGg%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=+M42TAPvlUXdJ9ArovJ2CQ==" style="max-height: 682px;max-width: 984px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;uncomment the line: &lt;/p&gt;&lt;p style="margin:0;"&gt;//#define PRINTF_FLOAT_ENABLE&amp;nbsp;&amp;nbsp; 1&lt;/p&gt;&lt;p style="margin:0;"&gt;to enable the printing of floating point variables.&lt;/p&gt;&lt;p style="margin:0;"&gt;just to test whether it prints floating value i had added fsl_debug_console component and assigned the TX/RX port pin and added below lines in main.c&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/1150x714/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_60480.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_60480.png-1150x714.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=y74SM%2BTU8K34g%2FcmrTsSL46DgFKTAV1qplXw41VP%2BxE%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=SKHl7dQVba0Pd0zzE5sOrQ==" style="max-height: 714px;max-width: 1150px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;then build your project and execute it ypu can see the floating point value printed on hyperterminal as shown below:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/679x429/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_60481.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_60481.png-679x429.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=mKWctHhBaQ%2BefABGvx00d%2BuSACIr2bojQMv28q%2FmlMQ%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=6vDWiT01nUTwXhzw5ntpLw==" style="max-height: 429px;max-width: 679px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Happy Printing float values &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_1.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_1.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=F0ietmsoFTa2vLDKQnltce044xdgQSiI%2BFfWm%2FPxpgM%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=zGEM7pHL10Vt71gae75OdA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt; &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_1.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_1.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=F0ietmsoFTa2vLDKQnltce044xdgQSiI%2BFfWm%2FPxpgM%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=zGEM7pHL10Vt71gae75OdA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt; &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-wikis-components-files/00-00-00-01-49/contentimage_5F00_1.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/49/contentimage_1.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=F0ietmsoFTa2vLDKQnltce044xdgQSiI%2BFfWm%2FPxpgM%3D&amp;amp;se=2026-08-18T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=zGEM7pHL10Vt71gae75OdA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: print_float_values, kds3.0&lt;/div&gt;
</description></item></channel></rss>