<?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>[nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96536/nrf-connect-sdk-memory-requirement-for-nrf52810-ota</link><description>Target nRF52810(nrf52dk_nrf52810) SDK NCS v2.0.0 source: \NCS200\v2.0.0\nrf\samples\bluetooth\peripheral_lbs&amp;gt; 
 Hello I&amp;#39;m preparing new project with nrf52810. I build peripheral_lbs sample and found 97.25% of SRAM is being used. 1. Original source Memory</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Feb 2023 03:15:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96536/nrf-connect-sdk-memory-requirement-for-nrf52810-ota" /><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/410773?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 03:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf3aa002-cc6a-470b-8969-d7c565115a83</guid><dc:creator>Tim Hwang</dc:creator><description>&lt;p&gt;I understand 52810 need more external memory or can use nRF5 SDK.&lt;br /&gt;Thank you for your reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/409949?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 19:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f51932f-12f1-4a84-9403-81ef637a6753</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;Sorry, it seems I made you misunderstood. CONFIG_BOOTLOADER_MCUBOOT is essential and cannot be removed, whether on the nRF52810 or the nRF52832.&lt;/p&gt;
&lt;p&gt;First, regarding the build error with prj_minimal.conf that you will encounter even with the nRF52832:&lt;br /&gt;-&amp;nbsp;You need to add all the config mentioned in &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;my colleague Simon&amp;#39;s guide&lt;/a&gt; into the project.&lt;br /&gt;- You also need to enable&amp;nbsp;CONFIG_BT_GATT_SERVICE_CHANGED, which was turned off in prj_minimal.conf&lt;br /&gt;Below is&amp;nbsp;the Kconfig fragment I used:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable mcumgr.
CONFIG_MCUMGR=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256

# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
CONFIG_BT_GATT_SERVICE_CHANGED=y # This was turned off in prj_minimal.conf
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
&lt;/pre&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Next, regarding adding DFU to the nRF52810, I have asked&amp;nbsp;consult with my team about DFU in this case. It looks like our only options in NCS are&amp;nbsp;to use&amp;nbsp;Serial Recovery for DFU, or using External Flash.&lt;/p&gt;
&lt;p&gt;Are any of those option possible for you?&lt;/p&gt;
&lt;p&gt;Alternatively, we can consider using the nRF5 SDK instead of NCS. We do not recommend it for new designs and projects, but if&amp;nbsp;your project must have the nRF52810 and OTA DFU over BLE, then that is the only option.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/409725?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 02:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63e694a3-6faf-4d0c-96e6-71bd70a1af98</guid><dc:creator>Tim Hwang</dc:creator><description>&lt;p&gt;Thanks for updating.&lt;br /&gt;Here is my sample source.&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_ota.7z"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_ota.7z&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;1. nrf52832&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;*prj_minimal.conf&lt;/strong&gt;&lt;br /&gt;build error like as nrf52810&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;*prj.conf&lt;br /&gt;&lt;/strong&gt;works well.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;2. nrf52810&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;*prj_minimal.conf&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;As you mentioned, I can remove &amp;quot;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT&amp;quot;, then I could build it.&lt;br /&gt;&lt;br /&gt;I add following functions in main.c and build.&lt;br /&gt; os_mgmt_register_group();&lt;br /&gt; img_mgmt_register_group();&lt;br /&gt; smp_bt_register();&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;c:/ncs200/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: app/libapp.a(main.c.obj): in function `main&amp;#39;:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;C:\NCS200\v2.0.0\nrf\samples\bluetooth\peripheral_lbs\build/../src/main.c:309: undefined reference to `smp_bt_register&amp;#39;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;collect2.exe: error: ld returned 1 exit status&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;To avoid link error, I add following config.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;CONFIG_MCUMGR_SMP_BT=y&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;warning: HW_STACK_PROTECTION (defined at arch/Kconfig:249) was assigned the value &amp;#39;y&amp;#39; but got the&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: ARCH_HAS_STACK_PROTECTION (=n). See&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;a href="http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_HW_STACK_PROTECTION"&gt;docs.zephyrproject.org/.../kconfig.html&lt;/a&gt; and/or look up&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;HW_STACK_PROTECTION in the menuconfig/guiconfig interface. The Application Development Primer,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;helpful too.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;warning: BT_GATT_DYNAMIC_DB (defined at C:/NCS200/v2.0.0/zephyr/subsys/bluetooth/host\Kconfig.gatt:91, subsys/bluetooth\host\Kconfig.gatt:91) has direct dependencies (BT_GATT_SERVICE_CHANGED &amp;amp;&amp;amp; BT_CONN &amp;amp;&amp;amp; BT_HCI_HOST &amp;amp;&amp;amp; BT_RPC_STACK) || (BT_GATT_SERVICE_CHANGED &amp;amp;&amp;amp; BT_CONN &amp;amp;&amp;amp; BT_HCI_HOST &amp;amp;&amp;amp; BT_HCI &amp;amp;&amp;amp; BT) with value n, but is currently being y-selected by the following symbols:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt; - MCUMGR_SMP_BT (defined at subsys/mgmt/mcumgr/Kconfig:140), with value y, direct dependencies MCUMGR (value: y), and select condition MCUMGR (value: y)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;error: Aborting due to Kconfig warnings&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;*prj.conf&lt;br /&gt;&lt;/strong&gt;I could manage to build and flash it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: ***** MPU FAULT *****&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: Stacking error (context area might be not valid)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: Data Access Violation&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: MMFAR Address: 0x20005010&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: r0/a1: 0x090317bb r1/a2: 0xc1f7ce6f r2/a3: 0xe4fcbcac&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: r3/a4: 0xffd0fc09 r12/ip: 0xd3b6e9c3 r14/lr: 0xb1c7ded7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: xpsr: 0xdf7fdc00&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: Faulting instruction address (r15/pc): 0x8fe9928b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: Current thread: 0x20001ca0 (unknown)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;E: Resetting system&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;PS&lt;br /&gt;I&amp;#39;m not available by the end of this week. I can reply next Monday.&lt;br /&gt;&lt;/span&gt;&lt;span&gt; Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/409618?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 13:53:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1583e7bf-50f3-466d-a881-fc9f58819fd0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;My success was without CONFIG_BOOTLOADER_MCUBOOT, like your initial opening post. With CONFIG_BOOTLOADER_MCUBOOT, it also fails.&lt;/p&gt;
&lt;p&gt;I also thought that you would want to add MCUboot, so I have been looking into&amp;nbsp;single application slot update. However, it seems&amp;nbsp;there are no OTA solution for that.&lt;/p&gt;
&lt;p&gt;Is&amp;nbsp;DFU over serial an option for you? Or does it have to be OTA?&lt;/p&gt;
&lt;p&gt;I am consulting some seniors in the team for other possibilities, but the hope doesn&amp;#39;t look good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/409464?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 01:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9b3cf5e-d217-4f55-b283-b3ae819d2beb</guid><dc:creator>Tim Hwang</dc:creator><description>&lt;p&gt;Thanks for reply.&lt;br /&gt;&lt;br /&gt;I changed build command and found used SRAM decreased.&amp;nbsp;&lt;br /&gt;west build -b nrf52dk_nrf52810 -- -DCONF_FILE=&amp;#39;prj_minimal.conf&lt;br /&gt;However I added CONFIG into prj_minimal.conf and failed due to memory leak.&lt;br /&gt;Can you correct me?&amp;nbsp;&lt;br /&gt;In addition, I have experience OTA SW experience with nrf52832 and know how I use it.&lt;/p&gt;
&lt;p&gt;1. In case prj_minimal.conf :&amp;nbsp;&lt;span&gt;97.95% -&amp;gt; 68.30%&lt;br /&gt;&lt;/span&gt;Memory region Used Size Region Size %age Used&lt;br /&gt; FLASH: 132808 B 192 KB 67.55%&lt;br /&gt; SRAM: 16786 B 24 KB 68.30%&lt;br /&gt; IDT_LIST: 0 GB 2 KB 0.00%&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;2. Add following four lines into prj_minimal.conf&lt;br /&gt;# Enable mcumgr.&lt;br /&gt;CONFIG_MCUMGR=y&lt;/p&gt;
&lt;p&gt;# Enable most core commands.&lt;br /&gt;CONFIG_MCUMGR_CMD_IMG_MGMT=y&lt;br /&gt;CONFIG_MCUMGR_CMD_OS_MGMT=y&lt;/p&gt;
&lt;p&gt;# Ensure an MCUboot-compatible binary is generated.&lt;br /&gt;CONFIG_BOOTLOADER_MCUBOOT=y&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Build result&lt;/strong&gt;&lt;br /&gt;c:/ncs200/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `text&amp;#39; will not fit in region `FLASH&amp;#39;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;c:/ncs200/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH&amp;#39; overflowed by 63812 bytes&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;br /&gt;FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf&lt;br /&gt;cmd.exe /C &amp;quot;cd /D C:\NCS200\v2.0.0\nrf\samples\bluetooth\peripheral_lbs\build\mcuboot &amp;amp;&amp;amp; C:\NCS200\toolchains\v2.0.0\opt\bin\cmake.exe --build . --&amp;quot;&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;C:\NCS200\toolchains\v2.0.0\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;C:\NCS200\v2.0.0\nrf\samples\bluetooth\peripheral_lbs\build&amp;#39;&lt;/p&gt;
&lt;p&gt;C:\NCS200\v2.0.0\nrf\samples\bluetooth\peripheral_lbs&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF Connect SDK] memory requirement for nrf52810 OTA</title><link>https://devzone.nordicsemi.com/thread/409426?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 21:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:135e2abf-f63f-41cc-9702-bca76490ccf9</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;As you have noted, the nRF52810 has less flash. There are a few changes we some time need to make to fit applications on it.&lt;/p&gt;
&lt;p&gt;I was able to build with the configuration you listed using prj_minimal.conf instead of prj.conf. Could you try that?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[234/234] Linking C executable zephyr\zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      137064 B       192 KB     69.71%
             RAM:       21596 B        24 KB     87.87%
        IDT_LIST:          0 GB         2 KB      0.00%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I understand that your goal is to add OTA DFU. Towards that, a few more configs are necessary, and prj_minimal.conf alone might not fix it. Are you following my colleague Simon&amp;#39;s guide &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;here&lt;/a&gt; by any chance?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>