<?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>Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13906/region-ram-overflowed-with-stack-when-upgrading-segger-rtt</link><description>Hi, 
 I just upgraded the SEGGER RTT source files from V4.98e to the new V5.41b for a nRF51DK project using gcc/Makefile. When linking the (now quite large) program, I got the error messages: 
 c:/program files (x86)/gnu tools arm embedded/4.9 2015q1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 May 2016 12:43:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13906/region-ram-overflowed-with-stack-when-upgrading-segger-rtt" /><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53152?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 12:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7be0865f-15eb-48ea-b684-53ddbf2f4550</guid><dc:creator>Elm</dc:creator><description>&lt;p&gt;I found the problem. A typo. An uninitialized buffer (.bss) of size 2048 had become 20148. This explains why  &amp;quot;&lt;em&gt;section .bss will not fit in region RAM&lt;/em&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Sorry for taking your time.&lt;/p&gt;
&lt;p&gt;Elm&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53147?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 12:02:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10be13e9-94a1-4500-960a-dc64d5b8a3b7</guid><dc:creator>Elm</dc:creator><description>&lt;p&gt;Strange enough, when I add &lt;code&gt;-D__HEAP_SIZE=512 -D__STACK_SIZE=8192&lt;/code&gt; to CFLAGS, ASMFLAGS and LDFLAGS, there is &lt;strong&gt;no change&lt;/strong&gt; in the error printout. I am unable to explain this, mainly due to my limited competence in linkers and ARM memory usage. Any help would be appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53154?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 12:00:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a218dbb-621e-487f-b332-407526f2027b</guid><dc:creator>Elm</dc:creator><description>&lt;p&gt;I am aware of these variables. I have increased some of them, as the debug output is quite elaborate, and smaller buffers do not work; some printouts become truncated. Thanks anyway!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53153?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 20:39:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aa22017-8be8-47d0-b642-1b54c1b102c3</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;RTT can be configured, especially the amount of RAM you want to allocated for RTT. Please have a look at these constants in your code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SEGGER_RTT_MAX_NUM_UP_BUFFERS
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS
#define BUFFER_SIZE_UP
#define BUFFER_SIZE_DOWN
#define SEGGER_RTT_PRINTF_BUFFER_SIZE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Try to reduce the number of buffers and the size of them. I do not know what the default values are in your RTT version, maybe it was tuned for a 32k RAM IC version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53151?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 14:14:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02a2a2cc-5492-4db7-898b-5f9a98f2ef2c</guid><dc:creator>Elm</dc:creator><description>&lt;p&gt;I guess debug strings occupy both RAM and flash memory. Flash because they need to survive power cycling, RAM because you can modify them. Is there a possibility to make the compiler (gcc) save strings only in flash (for strings that need not be modified?) Can the &lt;em&gt;static&lt;/em&gt; keyword accomplish that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53150?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 14:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb08237-51a8-4c31-90a2-e440b62984e3</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Is it possible that previously you had debugging turned off? Or did you use it by uart?
Maybe before these strings were not allocated. But they probably should go to ROM memory, not RAM, so that is probably not the case. although i don&amp;#39;t know your memory settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53149?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 14:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25701c7e-fba0-42ae-aa52-dddbfd1dacba</guid><dc:creator>Elm</dc:creator><description>&lt;p&gt;The program is riddled with debugging strings. But &lt;strong&gt;why&lt;/strong&gt; would just replacing the RTT source files make the RAM size almost 7kB larger?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Region RAM overflowed with stack, when upgrading SEGGER RTT</title><link>https://devzone.nordicsemi.com/thread/53148?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 13:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33eb1d59-f65a-4116-a6d0-85b35de1bcad</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Is it possible that debugging strings could take that memory? you can check .map file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>