<?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>Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128493/failing-to-run-on-nrf52805</link><description>I compiled some legacy code (once written for the nRF52832), trying to adapt it for the nRF52805. 
 
 I have already done the following: 
 
 defining -DNRF52805_XXAA 
 defining -mfloat-abi=soft 
 defining -DFLOAT_ABI_SOFT 
 adapted the linker script to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2026 21:08:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128493/failing-to-run-on-nrf52805" /><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/569131?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2026 21:08:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a1dedfd-6d70-4a65-be78-e84d5230eba2</guid><dc:creator>Daniel Dakhno</dc:creator><description>&lt;p&gt;Heyo,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found the issue.&lt;/p&gt;
&lt;p&gt;I attached a debugger in the midst of the Hardfault Handler.&lt;/p&gt;
&lt;p&gt;Then, using the stacktrace, I figured out that I was attempting to read out of bounds of the flash.&lt;/p&gt;
&lt;p&gt;This happened in a piece of code I completely forgot about:&amp;nbsp;&lt;a href="https://github.com/dakhnod/BLEnky/blob/main/src/storage/storage.nrf52.c#L19-L20"&gt;github.com/.../storage.nrf52.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My bad, thanks for standing by my side through this!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/569059?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2026 00:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e14c34f1-8718-435f-b44d-c04da7955448</guid><dc:creator>Daniel Dakhno</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here are the CFLAGS I am using. These produce a binary that works on the 32, but not on the 05.&lt;/p&gt;
&lt;p&gt;Any Idea what is missing / wrong?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-DS113
-DNRF52
-DNRF52805_XXAA
-DHARDWARE_PIN_COUNT=32
-DNRF_CRYPTO_ALLOCATOR=3
-DNRF_CRYPTO_BACKEND_OBERON_ENABLED=1
-DNRF_CRYPTO_BACKEND_NRF_HW_RNG_ENABLED=1
-DDEVELOP_IN_NRF52832
-DNRF_SD_BLE_API_VERSION=7
-DAPP_TIMER_TICKS_COMPAT\(time,prescaler\)=APP_TIMER_TICKS\(time\)
-DNRF_DFU_SETTINGS_COMPATIBILITY_MODE=1
-DCONFIG_NFCT_PINS_AS_GPIOS=1
-DMBEDTLS_MEMORY_BUFFER_ALLOC_C
-DMBEDTLS_PLATFORM_MEMORY
-DFAMILY=52
-mcpu=cortex-m4
-mfloat-abi=soft
-DFLOAT_ABI_SOFT
-DSOFTDEVICE_PRESENT
-DBLE_STACK_SUPPORT_REQD
-DSWI_DISABLE0
-mthumb
-mabi=aapcs
-Wall
-Werror
-O2
-g3
-ffunction-sections
-fdata-sections
-fno-strict-aliasing
-fno-builtin
--short-enums
-DNRF_DFU_SETTINGS_VERSION=1
-DUSE_DFU
-DBUTTON_PIN=BUTTON_0
-DFIRMWARE_VERSION=&amp;quot;0.9.0&amp;quot;
-DCLOCK_CONFIG_LF_SRC=0
-DNRF_SDH_CLOCK_LF_SRC=0
-DNRF_SDH_CLOCK_LF_RC_CTIV=16
-DNRF_SDH_CLOCK_LF_RC_TEMP_CTIV=2
-DNRF_SDH_CLOCK_LF_ACCURACY=1
-DDEBUG=1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am not using a bootloader, but the DFU flags shouldn&amp;#39;t do any harm, right?&lt;/p&gt;
&lt;p&gt;Thanks for your help so far!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568202?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2026 14:40:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de58b7b5-e05b-48c0-a61b-8eae57177745</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Right. What boards have you been using, and does it run in emulated mode on e.g. nRF52 DK with nRF52833, then with the DEVELOP_IN_NRF52832 flags? Those flags should be present when emulating on the nRF52832, but not when running natively on the nRF52805.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568201?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2026 14:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b841174-4ab0-478a-9c06-3177639c46b5</guid><dc:creator>Daniel Dakhno</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have performed all the steps listed in the article.&lt;/p&gt;
&lt;p&gt;I have set all flags to soft float.&lt;/p&gt;
&lt;p&gt;The exact same&amp;nbsp;firmware file with the following linker script ran on the 32, but not the 05, without recompiling.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH (rx) : ORIGIN = 0x1C000, LENGTH = 0x30000 - 0x1C000
RAM (rwx) :  ORIGIN = 0x20002730, LENGTH = 0x6000 - 0x2730&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your time on this!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568200?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2026 14:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cc6fecf-a02b-471d-af65-9a06b9df53ec</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are correct.&lt;/p&gt;
&lt;p&gt;Then I see what you mean. With the same RAM settings the difference should not be large, no. There may be smaller differences e.g. due to floating point or other SoC differences, though.&lt;/p&gt;
&lt;p&gt;I assume you have gone through&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/developing-for-the-nrf52805-with-nrf5-sdk"&gt;Developing for the nRF52805 with nRF5 SDK&lt;/a&gt;&amp;nbsp;in case there are any configurations still missed, and also that the RAM requirement of&amp;nbsp;0x2730 is the same for both devices?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568189?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2026 12:37:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39f03123-670f-4100-83ed-6c6533c79561</guid><dc:creator>Daniel Dakhno</dc:creator><description>[quote userid="8164" url="~/f/nordic-q-a/128493/failing-to-run-on-nrf52805/568186"]The nRF52805 has 24 kB of RAM while the nRF52832 has 32 kB or 64 kB depending on variant. With less RAM on the nRF52805 overall, there is less RAM left for the stack. So no, the fact it runs on the nRF52832 does not mean it will run on the smaller nRF52805.[/quote]
&lt;p&gt;Please correct me if I&amp;#39;m wrong:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The stack grows downwards from the top of RAM. Since the top of RAM is set to 0x6000 on both the nRF52832 and nRF52805, the stack (growing down from 0x6000) should overflow exactly the same on both chips, right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Setting the RAM top to 0x6000 should just ignore the remaining RAM on the nRF52832, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568186?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2026 12:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7be1fd6-569c-41a2-83dc-8ba760282fd7</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Daniel D"] Is&amp;nbsp;&lt;span&gt;0x2730 realistic? I see that the SD may require more than&amp;nbsp;0x1198, but&amp;nbsp;0x2730 seems extremely large. Is there some formula available for the calculation?&lt;/span&gt;[/quote]
&lt;p&gt;RAM requirements correspond directly to the configuration. There is no calculator, but if you set aside too little RAM for the SoftDevice then you should get a build error returning the required minimum size for the current configuration.&lt;/p&gt;
&lt;p&gt;0x2730 is high.&lt;/p&gt;
&lt;p&gt;In your case, I do see you do have a large GATT table (&lt;code&gt;#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1408&lt;/code&gt;) accounting for 0x580 bytes, significantly higher than the minimum 216 bytes. Depending on the application, you might need that much, though. Since you use max MTU size of 247, I assume that you do have at least one large characteristic value which would need a lot of GATT table space. Therefore you might experience that you do in fact need that size. Still I would check the configurations you set (&lt;code&gt;sd_ble_cfg_set()&lt;/code&gt;) for if anything could be lowered. There might be some settings there which can be reduced, depending on the needs of the application.&lt;/p&gt;
[quote user="Daniel D"]2. I am using nRF5 SDK 17.1. Should I include&amp;nbsp;gcc_startup_nrf52805.S or gcc_startup_nrf52.S?[/quote]
&lt;p&gt;gcc_startup_nrf52805.s as per&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/developing-for-the-nrf52805-with-nrf5-sdk"&gt;Developing for the nRF52805 with nRF5 SDK&lt;/a&gt;.&lt;br /&gt;You should also have &lt;code&gt;ASMFLAGS += -DNRF52805_XXAA&lt;/code&gt;, do you already have that?&lt;/p&gt;
[quote user="Daniel D"]The firmware should fail at compilation time if it needed to much RAM, right? Or can it really fail at runtime aswell?[/quote]
&lt;p&gt;It may fail runtime if you overrun the stack (stack overflow).&lt;/p&gt;
[quote user="Daniel D"]since the exact same binary runs on the nRF52832, should the stack not be sufficient?[/quote]
&lt;p&gt;The nRF52805 has 24 kB of RAM while the nRF52832 has 32 kB or 64 kB depending on variant. With less RAM on the nRF52805 overall, there is less RAM left for the stack. So no, the fact it runs on the nRF52832 does not mean it will run on the smaller nRF52805.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568146?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2026 13:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd2776f5-87d4-4e80-afc0-704ad27a355f</guid><dc:creator>Daniel Dakhno</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for the reply!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Is&amp;nbsp;&lt;span&gt;0x2730 realistic? I see that the SD may require more than&amp;nbsp;0x1198, but&amp;nbsp;0x2730 seems extremely large. Is there some formula available for the calculation?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. I am using nRF5 SDK 17.1. Should I include&amp;nbsp;gcc_startup_nrf52805.S or gcc_startup_nrf52.S?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. My linker script is written to top out at the physical limit of the chip (0x6000). The firmware should fail at compilation time if it needed to much RAM, right? Or can it really fail at runtime aswell?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks again!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P.S.: Thinking about it again: Is the stack not filled up from the end of RAM backwards? And since the exact same binary runs on the nRF52832, should the stack not be sufficient?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failing to run on nRF52805</title><link>https://devzone.nordicsemi.com/thread/568145?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2026 13:34:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:753a75b9-1116-43bb-b000-aeb9c52189cc</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Why does the SD113 require so much RAM (0x2730 compared to&amp;nbsp;&lt;span&gt;0x1198 as in the docs)? I am using 3 VS UUIDs, but does that really hog so much memory?&lt;/span&gt;[/quote]
&lt;p&gt;Minimum RAM requirement is 0x1198 bytes. Call stack usage comes on top, with maximum 0x700 bytes. In addition, depending on configuration, additional RAM requirements apply. Ref. S113 Release notes &amp;quot;SoftDevice properties&amp;quot; section for the given release (in this caes s113_nrf52_7.3.0.)&lt;/p&gt;
[quote user=""]&lt;span&gt;&lt;span&gt;Do I need to compile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;gcc_startup_nrf52805.S or gcc_startup_nrf52.S? Same for system_nrf52805.c? When do I use which?[/quote]
&lt;p&gt;Setup, includes, etc. depend on toolchain (nRF5 SDK support multiple). However, switch between different SoCs typically involve changing RAM and Flash settings and a simple define change; the rest (which SoC specific files are involved in builds) is then typically handled by the MDK. For instance, for Keil, there should be a selection in project settings. You may have to also switch between hardware and software floating point.&lt;/p&gt;
[quote user=""]The code will simply not boot on my nRF52805. Is there any setting I am missing?[/quote]
&lt;p&gt;If it still fails, please consult &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/developing-for-the-nrf52805-with-nrf5-sdk"&gt;Developing for the nRF52805 with nRF5 SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Worst case, it might be that the total memory requirements of your application is simply too large for what is available on the nRF52805.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>