<?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>sbrk.c: undefined reference to `end&amp;#39; in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102101/sbrk-c-undefined-reference-to-end-in-nrf-connect-sdk-v2-4-0</link><description>Hi Team, 
 Earlier, we developed a library using nordic sdk v2.3.0 on nRF5340 TF-M secure environment. Now we planned to switch from nordic sdk v2.3.0 to v2.4.0. 
 While trying to compile our source code using nordic sdk v2.4.0, we observed the linker</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Aug 2023 12:04:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102101/sbrk-c-undefined-reference-to-end-in-nrf-connect-sdk-v2-4-0" /><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/439247?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2023 12:04:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f164de4-7069-42ef-ad99-4856e00dcb75</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The new TF-M version included in SDK 2.4.0 does not allocate heap&amp;nbsp;by default when you are doing a non-debug build. As a result, any implementations trying to use the C library heap will encounter a linker error, as you have experienced.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/439169?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2023 07:19:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2a22aec-42e2-4dc9-a403-64d8506f5880</guid><dc:creator>Galaxo</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;&lt;br /&gt;1) We have 2 Apps(One is without UART and another is with UART).&amp;nbsp; we are using &lt;span&gt;CONFIG_TFM_LOG_LEVEL_SILENCE=y only in UART app.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;As per below ticket, if we remove CONFIG_TFM_LOG_LEVEL_SILENCE=y, we used to get undefined reference errors till v2.3.0 as we are using uart1(the same is used by TFM).Now with v2.4.0 UART app is compiling even without this config.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/98329/non-secure-app-with-uart-support"&gt;nonsecure app with uart support&lt;br /&gt;&lt;br /&gt;2&lt;/a&gt;) Regarding &amp;quot;&lt;span&gt;undefined reference to `end&amp;#39; &amp;quot;&amp;nbsp; -- We debugged each line. This error is caused by 3 functions in our code i.e localtime, snprintf, vsnprintf (printf working fine). so we replaced these 3 APIs with custom implementation. Now it got compiled.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Issue is fixed for us. May be could you plz check why these 3 apis giving this error even if we don&amp;#39;t use&amp;nbsp;&lt;span&gt;CONFIG_TFM_LOG_LEVEL_SILENCE=y&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/438536?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 13:23:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:124cffb4-cd52-42d6-802d-d3c8e78bc527</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Since you have CONFIG_TFM_LOG_LEVEL_SILENCE enabled, the printf implementation in TF-M will not be included. Instead, you will get the printf function from the C standard library, which requires heap. Do you get the same error if you remove&amp;nbsp;CONFIG_TFM_LOG_LEVEL_SILENCE=y?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/438289?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 13:04:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56a1b894-2f65-4d0c-a0fe-bd8ebd866431</guid><dc:creator>Galaxo</dc:creator><description>&lt;p&gt;Hello Vidar, Yes deleted. I thought to try more from my side, so. &lt;br /&gt;It&amp;#39;s on the v2.4.0 tag&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;user@WIN MINGW64 /c/ncs/v2.4.0/nrfxlib ((v2.4.0))
$ git status &amp;amp;&amp;amp; git describe --tags
HEAD detached at refs/heads/manifest-rev
nothing to commit, working tree clean
v2.4.0
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After digging into the problem we found that, this error is occuring in 2 cases.&lt;/p&gt;
&lt;p&gt;1) when we are using variable argument list functions like &lt;strong&gt;va_start, va_end&lt;/strong&gt; (we are using these for logging). When I disabled this log module, error got resolved.&lt;br /&gt;&lt;br /&gt;2) when we are using UART related code. We are using UART to communicate between nrf5340 device and windows PC.&lt;/p&gt;
&lt;p&gt;In prj.conf, we are using&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TFM_LOG_LEVEL_SILENCE=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In app code,&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;const struct device *uart1 = DEVICE_DT_GET(DT_NODELABEL(uart1));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you plz suggest some solution for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/438262?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 12:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33190875-c065-437a-b3f5-01cfa50a06ee</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Did you delete your reply?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sbrk.c: undefined reference to `end' in nrf connect SDK v2.4.0</title><link>https://devzone.nordicsemi.com/thread/437806?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2023 09:04:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69ea410a-e0ab-4d4b-896b-559ff7c4d0f8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The developer I talked to suspects this is related to the&amp;nbsp;cc3xx library. Please open the ncs/v2.4.0/ directory in a terminal and run &amp;quot;$ git status &amp;amp;&amp;amp;&amp;nbsp;git describe --tags&amp;quot; to verify that the &amp;#39;nrfxlib&amp;#39; repo which contains this libary is on the v2.4.0 tag.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>