<?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>Setting NRF_LOG_ENABLED to 1 results in too big image when UART log is enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18319/setting-nrf_log_enabled-to-1-results-in-too-big-image-when-uart-log-is-enabled</link><description>My setup: 
 NRF52DK;
Keil 5.22.0.0;
nRF5_SDK_12.2.0;
S132 3.1.0 
 While trying to use ble_peripheral\ble_app_template\pca10040\s132\arm5_no_packs I decided to modify sdk_config.h by setting:
NRF_LOG_ENABLED 1 
 I also have
NRF_LOG_BACKEND_SERIAL_USES_UART</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Dec 2016 07:31:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18319/setting-nrf_log_enabled-to-1-results-in-too-big-image-when-uart-log-is-enabled" /><item><title>RE: Setting NRF_LOG_ENABLED to 1 results in too big image when UART log is enabled</title><link>https://devzone.nordicsemi.com/thread/70741?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2016 07:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afacb58b-30af-4168-b2b7-1600c985529f</guid><dc:creator>SergeyP</dc:creator><description>&lt;p&gt;Thanks, commenting out those 2 lines allowed me to not only use UART logging but also to change the Optimization Level to Level-0 and I am still under 27kB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting NRF_LOG_ENABLED to 1 results in too big image when UART log is enabled</title><link>https://devzone.nordicsemi.com/thread/70740?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2016 10:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f728782-7381-45e7-851c-9c7dd7a6a401</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The evaluation version of Keil does not support program size of more than 32 kB. For reducing the code size in the ble_app_template example, a trick could be to temporarily disable the peer manager. This will reduce the code size with about 12kB.
Comment out line 791 &lt;code&gt;peer_manager_init(erase_bonds);&lt;/code&gt; and line 555 &lt;code&gt;pm_on_ble_evt(p_ble_evt);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note that you cannot do pairing and bonding when not using the peer manager.&lt;/p&gt;
&lt;p&gt;You can also switch to build tools that are not size limited, such as GCC. You can find a good tutorial on setting up GCC with Eclipse &lt;a href="https://devzone.nordicsemi.com/tutorials/7/"&gt;here&lt;/a&gt;, and a guide for setting up Segger Embedded Studio &lt;a href="https://devzone.nordicsemi.com/blogs/1032/segger-embedded-studio-a-cross-platform-ide-w-no-c/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>