<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116043/cant-print-floating-values-f-in-my-project</link><description>Hi All, 
 I am trying to print out floating values for my NRF5340 v2.4.1 SDK project. But, I am not able to print out the floating values. I tried the setting the following configuration but still failure: 
 CONFIG_PWM=y CONFIG_LED=y CONFIG_LED_PWM=y</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2024 19:26:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116043/cant-print-floating-values-f-in-my-project" /><item><title>RE: Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/thread/515589?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 19:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ddb7cb0-3d57-427e-a6f9-20838d13b8c8</guid><dc:creator>Jacky Ortega</dc:creator><description>&lt;p&gt;I think this ticket can be closed now. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/thread/510420?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 08:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49af36e3-764c-4a06-a74a-f6103cf9419b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks for coming back to us. Yes it mostly looks like a configuration overwritten issue somewhere. I hope you find it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/thread/509785?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 00:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88cc0604-d1e8-46f4-8ea1-5ceee47e570b</guid><dc:creator>Jacky Ortega</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/maria-gilje"&gt;Maria Gilje&lt;/a&gt;&amp;nbsp;&amp;nbsp;and &lt;a href="https://devzone.nordicsemi.com/members/willdean"&gt;willdean&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried with simple hello-world and blinky sample project and the floating point with logging module is working fine as expected. I think the issue is with my actual project[larger one] maybe something is being overwritten somewhere. I will have a look.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you and to the community members for&amp;nbsp;giving their time. Have a great day!.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/thread/509082?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 10:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdfa0829-3646-47c8-af11-829c41262fdd</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Jacky,&lt;/p&gt;
&lt;p&gt;The information that willdean gives is correct. A change was made in a logging overhaul in this &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/31535"&gt;pull request&lt;/a&gt; and was included in nRF Connect SDK v1.6.0 so it is included in v2.4.1 as well as the later version that willdean is using.&lt;/p&gt;
&lt;p&gt;I attempted to reproduce the wrong printout on an nRF5340 DK by adding&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to prj.conf for zephyr/samples/hello_world and replacing the contents of main.c with&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2012-2014 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;

LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
float num = 4.2;

void print_log(float num)
{
	LOG_INF(&amp;quot;My float: %f&amp;quot;,(float)num);
}


int main(void)
{
	printk(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD);
	print_log(num);
	return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I built with nrf5340dk_nrf5340_cpuapp as the target and the float was printed as expected:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1730802441523v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I assume that you are building the code for the application core, have you set the Kconfig symbols in the configuration file for the application core? You can find out if&amp;nbsp; CONFIG_CBPRINTF_FP_SUPPORT is set by searching for the symbol in build/zephyr/.config for your project.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cant print floating values %f in my project</title><link>https://devzone.nordicsemi.com/thread/508884?ContentTypeID=1</link><pubDate>Sun, 03 Nov 2024 12:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:769f1f9c-d0c6-400c-a93c-9d21e9d15d03</guid><dc:creator>willdean</dc:creator><description>&lt;p&gt;I&amp;#39;m using a later SDK, but &amp;quot;&lt;span&gt;CONFIG_CBPRINTF_FP_SUPPORT&lt;/span&gt;&lt;span&gt;=y&amp;quot; was all I had to add.&amp;nbsp; &amp;nbsp;I think there is inconsistent advice around about this, which is probably a sign that it&amp;#39;s changed from one SDK version to another.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>