<?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>Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text&amp;#39; will not fit in region `FLASH&amp;#39;, while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46467/getting-error-mesh_bootloader_serial_gccarmemb_nrf52840_xxaa-elf-section-text-will-not-fit-in-region-flash-while-building-mesh-bootloader-with-debug-option-enabled</link><description>Development environment : 
 ARM-GCC version - &amp;quot;gcc-arm-none-eabi-6-2017-q2-update&amp;quot; 
 nRF SDK version - nRF5_SDK_15.2.0_9412b96 
 nRF Mesh SDK version - nrf5SDKforMeshv310src 
 Platform - nrf52840_xxAA 
 
 Problem : 
 cmake command used : cmake -DBUILD_BOOTLOADER</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Nov 2022 02:44:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46467/getting-error-mesh_bootloader_serial_gccarmemb_nrf52840_xxaa-elf-section-text-will-not-fit-in-region-flash-while-building-mesh-bootloader-with-debug-option-enabled" /><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/396785?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 02:44:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f80ce1f5-920d-499f-b418-6c22cd0b9ded</guid><dc:creator>Tomlee</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;May I know which file I can change ORGIN and LENGTH in ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Quote&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;I think you should be able to fix this by&amp;nbsp;making making a change in the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Change the following,&amp;nbsp;&amp;nbsp;&lt;br /&gt;From:&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;FLASH (rx) :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORIGIN = 0xf8000, LENGTH = 0x6000&lt;/p&gt;
&lt;p&gt;To:&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;FLASH (rx) :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORIGIN = 0xf7000, LENGTH = 0x7000&lt;/p&gt;
&lt;p&gt;Please let me know if you&amp;#39;re still having issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/185921?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 11:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c56891f-7057-4353-a675-754af96e5f4f</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear that it works.&lt;/p&gt;
&lt;p&gt;Feel free to create a new support ticket if you have any more questions for us.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim Jakobsen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/185884?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 09:24:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f57d7177-a214-4451-a20c-62b1dd56d653</guid><dc:creator>nksharma</dc:creator><description>&lt;p&gt;Thanks Joakim, it works now. Appreciate your support on this issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Nishant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/185204?ContentTypeID=1</link><pubDate>Fri, 03 May 2019 13:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdcc32b7-67c8-4751-bd57-b6546d99fa73</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Talked to our Mesh team today, and this is actually a known problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is caused by; when you add the application you&amp;#39;ll get two sets of RTT-Logs. It&amp;#39;s only the first set of logs that is detected, which in this case will be the application logs.&lt;br /&gt;Also, the bootloader RTT memory is located in the same spot as something for the application. So when you have enabled logs of the bootloader, the logs isn&amp;#39;t just &lt;em&gt;not&lt;/em&gt; being detected by SEGGER, it&amp;#39;s also messing with the applications memory.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A way to avoid this, is by forcing the RTT-blocks for both the bootloader and the application to the same address using attributes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;_acUpBuffer, _acDownBuffer and _SEGGER_RTT in segger_rtt.c must all to specific addresses in RAM.&amp;nbsp;&lt;br /&gt;With armcc you can use the at()-attribute.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim Jakobsen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/184859?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 11:43:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c78c149-04b6-4b0c-9507-8d9216a9e760</guid><dc:creator>nksharma</dc:creator><description>&lt;p&gt;Hi Joakim,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I made the changes in the linker script of the bootloader. Then I compiled, it successfully got linked this time. Then I used the compiled mesh bootloader in two cases below -&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A] Flashed softdevice, bootloader and the device page. That is no application :-&lt;/strong&gt; In this case I was able to see the bootloader logs. I did DFU of blinky binary and it got DFUed and saw all logs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;B] Flashed softdevice, bootloader, DFU example given in mesh SDK and the device page :-&lt;/strong&gt; In this case I see below logs of the application&lt;/p&gt;
&lt;p&gt;&amp;lt;t: 1&amp;gt;, main.c, 206, ----- Bluetooth Mesh DFU Example -----&lt;br /&gt;&amp;lt;t: 8739&amp;gt;, app_error_weak.c, 99, Application memory access: 1032690:0&lt;/p&gt;
&lt;p&gt;So, something went wrong in this case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, the link given after below paragraph says -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The bootloader is limited to 22 kilobytes flash and 768 bytes RAM. In addition to the 22 kilobytes flash, the bootloader reserves the two last pages of the flash. This means that the total size of the bootloader is 32 kilobytes for the nRF52-series and 24 kilobytes for the nRF51-series. The actual size of the bootloader depends on whether it is compiled with the serial (UART) transport in addition to toolchain and optimization settings.&lt;/p&gt;
&lt;p&gt;Link : //infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v3.1.0%2Fmd_mesh_bootloader_README.html&amp;amp;cp=5_1_2_4_1&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here, we have increased the size of the mesh bootloader to get success in the linking process. It appears that by doing it, something has gone wrong and we get the fatal error in the dfu application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now the question is -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Is there any way we can enable the logs of the mesh bootloader when it is with application(i.e Case B above) in the system?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If yes,&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Then, &lt;strong&gt;what will be the side effects or the complications in the system?&lt;/strong&gt; As the link above clearly states about the limitation of the mesh bootloader size.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nishant.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/184546?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 11:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0a5fdff-419a-48c3-9749-bba22a140312</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My bad. I think i misunderstood the question.&amp;nbsp;&lt;/p&gt;
[quote user=""]/usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH&amp;#39; overflowed by 2096 bytes[/quote]
&lt;p&gt;I think you should be able to fix this by&amp;nbsp;making making a change in the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Change the following,&amp;nbsp;&amp;nbsp;&lt;br /&gt;From:&amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp;FLASH (rx) :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORIGIN = 0xf8000, LENGTH = 0x6000&lt;/p&gt;
&lt;p&gt;To:&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;FLASH (rx) :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORIGIN = 0xf7000, LENGTH = 0x7000&lt;/p&gt;
&lt;p&gt;Please let me know if you&amp;#39;re still having issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Joakim.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/183938?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 06:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cada3eab-bc3f-46e2-95e8-35238248c210</guid><dc:creator>nksharma</dc:creator><description>&lt;p&gt;Thanks for your reply Joakim,&lt;/p&gt;
&lt;p&gt;But here, I meant to say, DEBUG option&amp;nbsp;&lt;strong&gt;BOOTLOADER_DEBUG_ENABLE&amp;nbsp;&lt;/strong&gt;which is for RTT logging.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the confusion here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now I used cmake command - cmake -DBUILD_BOOTLOADER=1 -DCMAKE_BUILD_TYPE=Debug ..&lt;/p&gt;
&lt;p&gt;- This builds, but I can&amp;#39;t see the RTT logs. I think this cmake command is for debugging using arm-gdb or something.&lt;/p&gt;
&lt;p&gt;Also I used cmake command -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;cmake -DBUILD_BOOTLOADER=1 -DCMAKE_BUILD_TYPE=Debug -DBOOTLOADER_DEBUG_ENABLE=1 ..&lt;/p&gt;
&lt;p&gt;- Still not linking. Giving me same error that I posted earlier.&lt;/p&gt;
&lt;p&gt;My goal is to build mesh bootloader having already existing RTT logs statement in the bootloader enabled.&lt;/p&gt;
&lt;p&gt;Am I missing anything which is needed to enable existing RTT logs of the mesh bootloader and link it successfully?&lt;/p&gt;
&lt;p&gt;How do I build mesh bootloader with RTT logs enabled?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Nishant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting error : mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.elf section `.text' will not fit in region `FLASH', while building mesh bootloader with debug option  enabled.</title><link>https://devzone.nordicsemi.com/thread/183804?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:22:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b2664cc-12d2-4b94-9011-d010d79d5384</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi Nishant.&amp;nbsp;&lt;/p&gt;
[quote user=""]cmake command used :&amp;nbsp; cmake -DBUILD_BOOTLOADER=1 -DCMAKE_BUILD_TYPE=MinSizeRel -DBOOTLOADER_DEBUG_ENABLE=1 -DPLATFORM=nrf52840_xxAA[/quote]
&lt;p&gt;&amp;nbsp;The command -DCMAKE_BUILD_TYPE=MinSizeRel genererates build files optimized for size.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you take a look at Building the mesh stack and examples, under &amp;quot;Useful CMake command line options&amp;quot;:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CMake allows you to generate project files in release or debug configurations. To do so, use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;-DCMAKE_BUILD_TYPE&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;option:&lt;/p&gt;
&lt;pre&gt;build $ cmake -DCMAKE_BUILD_TYPE=Release ..      # Generates build files in release mode
build $ cmake -DCMAKE_BUILD_TYPE=Debug ..        # Generates build files in debug mode
build $ cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..   # Generates build files optimized for size
&lt;/pre&gt;
&lt;p&gt;The default build type is&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;Debug&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;if the CMake project is a Git repository (contains a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;.git&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;directory). Otherwise, it is set to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;RelWithDebInfo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>