<?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>Unable to print long long</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106764/unable-to-print-long-long</link><description>I am unable to print a long long. As a simple test I tried to print this: 
 
 All three will print 0. 
 I am using version 2.5.0 and added this to my prj.conf, also tried it with only CONFIG_NEWLIB_LIBC =y to start with, don&amp;#39;t know what I am doing wrong</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Dec 2023 16:49:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106764/unable-to-print-long-long" /><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/461143?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 16:49:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94708b2-8adc-421f-8b77-4bdbe7ab91bb</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;I now have the kind of aws_iot project and added this in prj.conf to make it work with long longs and floats.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NEWLIB_LIBC=y 
CONFIG_MINIMAL_LIBC_LL_PRINTF=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_FPU=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/461029?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 11:51:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f996451-6ce6-409a-ac90-6f8014d2695f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Sigurd Hellesvik"]Try to also add &amp;quot;CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y&amp;quot; to Asset Tracker v2 and see if that works.[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/461015?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 10:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cae185d-788a-4630-9fff-7d5d03377a23</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;When I add&amp;nbsp;CONFIG_NEWLIB_LIBC=y to the Asset Tracker v2 it does not compile anymore, it gives me this warning, I think the kind of warning you meant previously.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;warning: CJSON_LIB (defined at C:/ncs/v2.5.99-dev1/nrf/modules/cjson/Kconfig:7) has direct dependencies (NEWLIB_LIBC &amp;amp;&amp;amp; NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC || PICOLIBC with value n, but is currently being y-selected by the following symbols:
 - NRF_CLOUD_MQTT_CHOICE (defined at C:/ncs/v2.5.99-dev1/nrf\subsys\net\lib\nrf_cloud\Kconfig.nrf_cloud_mqtt:10), with value y, direct dependencies y (value: y)
 - NRF_CLOUD_FOTA (defined at C:/ncs/v2.5.99-dev1/nrf\subsys\net\lib\nrf_cloud\Kconfig.nrf_cloud_fota:6), with value y, direct dependencies y (value: y)
 - NRF_CLOUD_AGNSS (defined at C:/nordic/asset_tracker_v2\src/modules/Kconfig.cloud_module:18, C:/ncs/v2.5.99-dev1/nrf\subsys\net\lib\nrf_cloud\Kconfig.nrf_cloud_agnss:6), with value y, direct dependencies (LOCATION_MODULE &amp;amp;&amp;amp; CLOUD_MODULE) || (MODEM_INFO &amp;amp;&amp;amp; MODEM_INFO_ADD_NETWORK) (value: y), and select condition MODEM_INFO &amp;amp;&amp;amp; MODEM_INFO_ADD_NETWORK (value: y)
 - NRF_CLOUD_LOCATION (defined at C:/nordic/asset_tracker_v2\src/modules/Kconfig.cloud_module:44, C:/ncs/v2.5.99-dev1/nrf\subsys\net\lib\nrf_cloud\Kconfig.nrf_cloud_location:6), with value y, direct dependencies (NRF_CLOUD_MQTT &amp;amp;&amp;amp; CLOUD_MODULE) || NRF_CLOUD_MQTT (value: y), and select condition NRF_CLOUD_MQTT (value: y)

error: Aborting due to Kconfig warnings&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/461008?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 10:15:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc95e025-09a3-4fe2-8de6-94dae3a248e1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="ralphvn"]The Asset Tracker v2 with the floats works, I tried this before at the LTE course exercise.[/quote]
&lt;p&gt;Nice!&lt;/p&gt;
[quote user="ralphvn"]When I try to use &amp;quot;west build (&lt;span&gt;-t menuconfig&lt;/span&gt;)&amp;quot; I get the message &amp;quot;FATAL ERROR: CMake is not installed or cannot be found; cannot build.&amp;quot;[/quote]
&lt;p&gt;Not important to make this work. If you want to give it a second try, you can choose menuconfig from the three dots next to the&amp;quot;nRF Kconfig GUI&amp;quot; action in VS Code.&lt;/p&gt;
[quote user="ralphvn"]This would be a glitch in Visual Studio code according to this.[/quote]
&lt;p&gt;I also saw this when I tried to reproduce your issue on my end, so I have reported this to our VS Code developers.&lt;/p&gt;
&lt;p&gt;Thanks for mentioning the potential bug!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/461005?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 10:07:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce86e66b-62ed-4078-9938-dee314cb3441</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;I have this warning in Visual Studio code when I hover the setting but this warning is also in the hello world example that does work.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NEWLIB_LIBC was assigned the value y, but got the value n. Missing dependencies:
NEWLIB_LIBC_SUPPORTED&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This would be a glitch in Visual Studio code according to this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105572/updating-from-2-3-to-v2-5-errors"&gt;(+) Updating from 2.3 to v2.5 errors - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Asset Tracker v2 with the floats works, I tried this before at the LTE course exercise.&lt;/p&gt;
&lt;p&gt;When I try to use &amp;quot;west build (&lt;span&gt;-t menuconfig&lt;/span&gt;)&amp;quot; I get the message &amp;quot;FATAL ERROR: CMake is not installed or cannot be found; cannot build.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460968?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 08:00:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6897b3be-e4ff-4612-ae21-9bbdb356ddf4</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;If you set CONFIG_NEWLIB_LIBC in prj.conf, and it is ignored, you should get a warning in the build log.&lt;/p&gt;
&lt;p&gt;I like to debug this using &amp;quot;west build -t menuconfig&amp;quot;, then you can see how dependencies are set if you search for an option(&amp;quot;/&amp;quot;) and then press &amp;quot;?&amp;quot; for more info on the option.&lt;/p&gt;
&lt;p&gt;Try to also add &amp;quot;CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y&amp;quot; to Asset Tracker v2 and see if that works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460895?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 16:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e02f18c7-0d55-4c79-a54e-e01ef8899691</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;My next question is why does this work in this hello world example but not when I add the same code in the aws_iot example, it looks like I am in the aws_iot example not allowed to enable&amp;nbsp;CONFIG_NEWLIB_LIBC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460890?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cabd632-a92a-4f8b-8280-02390ed57a75</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;Where it is not working there is this line in .config&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# CONFIG_NEWLIB_LIBC is not set&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Where it is working the line is&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NEWLIB_LIBC=y&lt;/pre&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So this is the problem I think but why is it not set after I added the line in the prj.conf?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460880?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:26:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd0d48d7-460e-4efb-971d-6a06b315aa3c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;It is likely some configurations which differ between the projects.&lt;/p&gt;
&lt;p&gt;In these situations, I like to compare build/zephyr/.config between the projects and look for differences which might be related to the issue at hand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460877?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:150ac1a4-dc43-4084-a441-448a6a0bc9d6</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;Yes this works, but still don&amp;#39;t understand why it does not work when I add this to the aws_iot example project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460876?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c87d78c-0eb1-4204-8339-b551fb66aa58</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I tried to add the settings and code you uploaded to the hello world example and flashed it to a nRF9160DK, SDK: v2.5.0.&lt;br /&gt;It prints as expected, right?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.5.0 ***
1099511627776
1099511627776
1099511627776
Hello World! nrf9160dk_nrf9160
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is a zip of the project:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6866.long_5F00_long_5F00_hello_5F00_world.zip"&gt;devzone.nordicsemi.com/.../6866.long_5F00_long_5F00_hello_5F00_world.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you test this and see if it works for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460872?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:08:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:751c6ddf-a4c3-42d0-a144-e5081bcca884</guid><dc:creator>ralphvn</dc:creator><description>&lt;p&gt;&lt;span&gt;Also three times zero with printf.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to print long long</title><link>https://devzone.nordicsemi.com/thread/460870?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 15:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9976263e-bd1e-47c4-971d-2ce366f08251</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try to use printf instead of printk.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>