<?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>nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97135/nrf5340-how-to-set-mtu</link><description>I am developing a BLE peripheral using the nRF5340. I want to set MTU to change notificatio packet size. 
 I tried as below 
 &amp;lt;prj.conf&amp;gt; 
 &amp;lt;\child_image\hci_rpmsg.conf&amp;gt; 
 
 When building, the following warning message is displayed. warning: BT_CTLR_DATA_LENGTH_MAX</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Mar 2023 13:04:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97135/nrf5340-how-to-set-mtu" /><item><title>RE: nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/thread/414918?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 13:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b306474-d052-4d82-ace6-5614fc37e043</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;I understand your&amp;nbsp;starting point as basically as empty as the Hello World sample, so I tried starting from that.&lt;/p&gt;
&lt;p&gt;There I was able to reproduce your issue. It seems that with your configuration,&amp;nbsp;the RAM usage is just too high.&lt;/p&gt;
&lt;p&gt;How many connections do your project need? The default maximum number of connection is 16. I reduced it to 10 and my build now works.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// hci_rpmsg.conf
CONFIG_BT_MAX_CONN=10
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/pre&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_L2CAP_TX_MTU is not the culprit for your netcore build failure. &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/zephyr/connectivity/bluetooth/bluetooth-arch.html#host"&gt;L2CAP is a part of the Host layer&lt;/a&gt;, so the config doesn&amp;#39;t even have any effect on the netcore build. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;nbsp;needs to be on the application core. Please move it to the app core .conf file. I should have caught this earlier. Sorry about that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Update: I reread your replies and see that you already figured out that&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU should be on the application core even though I gave you the incorrect direction with my first reply. Sorry about that.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/thread/414789?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 00:12:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8dfe9da-50ad-4052-a8fe-27f23dd4d337</guid><dc:creator>John Lee</dc:creator><description>&lt;p&gt;I had a project before using the nRF5340. (nRF52832, nRF5 SDK 17.1.0)&lt;br /&gt;So I started the project in an empty local workspace.&lt;br /&gt;Source files and header files have been moved, and CMakeLists.txt and prj.conf files have been created.&lt;br /&gt;&lt;br /&gt;&amp;lt;CMakeLists.txt&amp;gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(EOPatch_nRF5340)

FILE(GLOB app_sources src/*.c)
# NORDIC SDK APP START
target_sources(app PRIVATE ${app_sources})

# NORDIC SDK APP END

zephyr_library_include_directories(include)
zephyr_library_include_directories(.)&lt;/pre&gt;&lt;br /&gt;&amp;lt;prj.conf&amp;gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_GPIO=y

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_SMP_SC_ONLY=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_DEVICE_NAME=&amp;quot;EOPatch_nRF5340&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=3396
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y
CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_LOG_BUFFER_SIZE=8192
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

# math.h
CONFIG_NEWLIB_LIBC=y

CONFIG_ASSERT=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The build completes without errors.&lt;br /&gt;The build configuration and memory usage are shown below.&lt;br /&gt;&lt;br /&gt;-&amp;nbsp;b&lt;span&gt;uild configuration&lt;/span&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/build.JPG" /&gt;&lt;br /&gt;- network core&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/network.jpeg" /&gt;&lt;br /&gt;- application core&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/application.jpeg" /&gt;&lt;br /&gt;&lt;br /&gt;Adding a configuration to change the MTU causes a build error.&lt;br /&gt;(\child_image\hci_rpmsg.conf, prj.conf - CONFIG_BT_L2CAP_TX_MTU=247)&lt;br /&gt;&lt;br /&gt;did i do something wrong?&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2260.network.png" /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2260.network.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/thread/414415?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 14:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6ce0681-cca1-4180-b2ba-d3e1de639414</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;This is the key part of that log:&lt;/p&gt;
[quote user="John Lee"]-Map=C:/Local/L_Work/NRF5340/EOPatch_nRF5340/build/hci_rpmsg/zephyr/zephyr_pre0.map[/quote]
&lt;p&gt;These and other parameters in the command with the full path to the build location reveals that the problem happened during the network core child image build, because the network core child image is built int &amp;lt;build folder&amp;gt;/hci_rpmsg.&lt;/p&gt;
[quote user="John Lee"]c:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `noinit&amp;#39; will not fit in region `RAM&amp;#39;&lt;br /&gt;c:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `RAM&amp;#39; overflowed by 5548 bytes&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;br /&gt;ninja: build stopped: subcommand failed.[/quote]
&lt;p&gt;This tells us that the problem is the image is using more RAM than available.&lt;/p&gt;
&lt;p&gt;What sample are you building? Besides the Kconfig discussed, what changes have you made to it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/thread/414292?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 08:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d624ddc1-c4e0-410a-a9e4-9063e6e11ef1</guid><dc:creator>John Lee</dc:creator><description>&lt;p&gt;A warning occurred in the network core build&lt;br /&gt;I set it as below, and now the build warning doesn&amp;#39;t occur&lt;br /&gt;&lt;span&gt;&amp;lt;prj.conf&amp;gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_L2CAP_TX_MTU=247&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;lt;\child_image\hci_rpmsg.conf&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but the build fails with error 1&lt;br /&gt;The error is below.&lt;br /&gt;&lt;br /&gt;[216/228] Linking C executable zephyr\zephyr_pre0.elf&lt;br /&gt;FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map &lt;br /&gt;cmd.exe /C &amp;quot;cd . &amp;amp;&amp;amp; C:\ncs\toolchains\v2.2.99-dev3\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf -Wl,-T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=C:/Local/L_Work/NRF5340/EOPatch_nRF5340/build/hci_rpmsg/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/random/libsubsys__random.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/timer/libdrivers__timer.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/mbox/libdrivers__mbox.a modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/subsys/bluetooth/controller/lib..__nrf__subsys__bluetooth__controller.a modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a modules/nrf/subsys/mpsl/fem/lib..__nrf__subsys__mpsl__fem.a modules/nrf/drivers/mpsl/clock_control/lib..__nrf__drivers__mpsl__clock_control.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/libmetal/libmetal/lib/libmetal.a modules/open-amp/open-amp/lib/libopen_amp.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -L&amp;quot;c:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/thumb/v8-m.main/nofp&amp;quot; -LC:/Local/L_Work/NRF5340/EOPatch_nRF5340/build/hci_rpmsg/zephyr -lgcc zephyr/arch/common/libisr_tables.a C:/ncs/v2.2.99-dev3/nrfxlib/crypto/nrf_oberon/lib/cortex-m33+nodsp/soft-float/liboberon_3.0.12.a -no-pie -mcpu=cortex-m33+nodsp -mthumb -mabi=aapcs -mfp16-format=ieee -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn C:/ncs/v2.2.99-dev3/nrfxlib/mpsl/lib/cortex-m33+nodsp/soft-float/libmpsl.a C:/ncs/v2.2.99-dev3/nrfxlib/softdevice_controller/lib/cortex-m33+nodsp/soft-float/libsoftdevice_controller_multirole.a &amp;amp;&amp;amp; cmd.exe /C &amp;quot;cd /D C:\Local\L_Work\NRF5340\EOPatch_nRF5340\build\hci_rpmsg\zephyr &amp;amp;&amp;amp; C:\ncs\toolchains\v2.2.99-dev3\opt\bin\cmake.exe -E echo &amp;quot;&amp;quot;&lt;br /&gt;c:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `noinit&amp;#39; will not fit in region `RAM&amp;#39;&lt;br /&gt;c:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `RAM&amp;#39; overflowed by 5548 bytes&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;[59/351] Generating ../../tfm/CMakeCache.txt&lt;br /&gt;-- The C compiler identification is GNU 12.1.0&lt;br /&gt;-- The ASM compiler identification is GNU&lt;br /&gt;-- Found assembler: C:/ncs/toolchains/v2.2.99-dev3/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe&lt;br /&gt;-- Found Python3: C:/ncs/toolchains/v2.2.99-dev3/opt/bin/python.exe (found version &amp;quot;3.8.2&amp;quot;) found components: Interpreter &lt;br /&gt;-- Found Python3: C:/ncs/toolchains/v2.2.99-dev3/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter &lt;br /&gt;-- Cache files will be written to: C:/ncs/v2.2.99-dev3/zephyr/.cache&lt;br /&gt;-- Configuring done&lt;br /&gt;-- Generating done&lt;br /&gt;-- Build files have been written to: C:/Local/L_Work/NRF5340/EOPatch_nRF5340/build/tfm&lt;br /&gt;[66/351] No configure step for &amp;#39;tfm&amp;#39;&lt;br /&gt;FAILED: modules/nrf/samples/hci_rpmsg_subimage-prefix/src/hci_rpmsg_subimage-stamp/hci_rpmsg_subimage-build hci_rpmsg/zephyr/zephyr.hex hci_rpmsg/zephyr/zephyr.elf hci_rpmsg/zephyr/merged_CPUNET.hex &lt;br /&gt;cmd.exe /C &amp;quot;cd /D C:\Local\L_Work\NRF5340\EOPatch_nRF5340\build\hci_rpmsg &amp;amp;&amp;amp; C:\ncs\toolchains\v2.2.99-dev3\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:\ncs\toolchains\v2.2.99-dev3\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\Local\L_Work\NRF5340\EOPatch_nRF5340\build&amp;#39;&lt;/p&gt;
&lt;p&gt;How can I fix the problem?&lt;br /&gt;My understanding of NCS is low, so please explain in detail&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340, how to set MTU</title><link>https://devzone.nordicsemi.com/thread/412616?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 23:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:562ac71f-cb82-49fd-a1ff-93e902ac31eb</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
[quote user=""]I checked in another ticket that I need to set the CONFIG of network core&lt;br /&gt;But I can&amp;#39;t find how to set it up[/quote]
&lt;p&gt;A way to set it up is to put the necessary configurations into&amp;nbsp;&lt;span&gt;&amp;lt;\child_image\hci_rpmsg.conf&amp;gt;, which is exactly what you did.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That also means that the configurations shouldn&amp;#39;t also be in prj.conf, which is the file for the application core. In the build&amp;nbsp;log, you should see some warnings about those configurations during the application core Kconfig build.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At which stage of the build did this warning happen? Application core or network core build?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it happens during application core build, please just remove the configs from prj.conf.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it happens during network core build,&amp;nbsp;could you please look into &amp;lt;build directory&amp;gt;/hci_rpmsg/zephyr/.config and check&amp;nbsp;all the dependencies mentioned in the warning, see if anything is not satisfied inadvertently?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hieu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>