<?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>MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101497/mcuboot-manual-compile-usage</link><description>We&amp;#39;re using NCS embedded into our Makefile-based build system to compile nRF5340 applications out-of-tree, but still having unresolved problems . The target board is a custom nRF5340 design. I&amp;#39;m continuously looking for alternative ways to achieve my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Dec 2023 04:53:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101497/mcuboot-manual-compile-usage" /><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461358?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 04:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07bd546d-88ea-4d55-bc57-8335589eb466</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;I&amp;#39;ve given up struggling with mystic B0n compilation issues. Instead, I&amp;#39;ve compiled MCUboot to NET core with a single (primary) partition, configured MCUboot to single slot mode. Then I&amp;#39;ve manually added PCD NET support to MCUboot, so now APP core MCUboot and NET core MCUboot communicate through PCD library and the new NET core FW image is successfully programmed ;) Several NET core FW upgrade procedures have succeeded, but the rest of the testing is still remaining.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461198?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 05:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14ef30c6-ca00-4025-a2f8-3933759596c2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;This is expected as the build failed. Can you please build the SMP SRV sample as I suggested and compare the generated .config files?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461197?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 05:18:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26aa4918-7ad5-401b-98fb-05cf8d6c80f1</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;At this point there&amp;#39;s no .elf, .bin in the build directory...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461196?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 05:15:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d2a106a-1c3b-433a-8d4f-a452f05030cd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It looks like the build script is failing to sign the network core image.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461106?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 14:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b8ab72f-183e-4650-924b-953ea46432a1</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;Please have a look at the source code structure in our project:&lt;/p&gt;
&lt;pre&gt;src&lt;br /&gt;    test&lt;br /&gt;        app&lt;br /&gt;             sources, CMakeList.txt etc for the &lt;br /&gt;             program on APP core&lt;/pre&gt;
&lt;pre&gt;        net&lt;br /&gt;             sources, CMakeList.txt etc for the &lt;br /&gt;             program on NET core&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To build the project, two west builds are commited, one for &amp;#39;&lt;code&gt;app&amp;#39; (cd src/test/app, west build...)&amp;nbsp;&lt;/code&gt;, another one for &amp;#39;&lt;code&gt;net&amp;#39; (cd src/test/net, west build...)&amp;nbsp;&lt;/code&gt;, resp. &amp;#39;app&amp;#39; has a child image (MCUboot), &amp;#39;net&amp;#39; also has a child image (B0n). &amp;#39;app&amp;#39; compiles without a problem, while &amp;#39;net&amp;#39; fails with this error:&lt;pre class="ui-code" data-mode="text"&gt;-- west build: building application
ninja: error: &amp;#39;modules/nrf/subsys/app_hex&amp;#39;, needed by &amp;#39;zephyr/nrf/subsys/bootloader/generated/app_firmware.signature&amp;#39;, missing and no known rule to make it
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;CONFIG_SECURE_BOOT&lt;/code&gt; is enabled. I was unable to find the reason by investigating the build system.&lt;/p&gt;
&lt;p&gt;(NOTE: if MCUboot is enabled instead of B0n on NET core, it compiles without a problem)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/461060?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 12:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14ce38a4-2282-46ea-aa73-0db8afe6f8db</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If possible, I&amp;#39;d recommend&amp;nbsp;that&amp;nbsp;you build the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP Server Sample&lt;/a&gt;&amp;nbsp;with the bt-overlay and compare your configuration against that build. This will build an application for the main core, along with MCUBOOT, and B0n + hcirpmsg for the netcore. You can run &amp;quot;west build -t partition_manager_report&amp;quot; to see the resulting memory layout, or inspect the generated partition manager file.&amp;nbsp;&lt;/p&gt;
[quote user="Tamas Selmeci"]I don&amp;#39;t understand why both PCD_APP and PCD_NET need to be enabled in APP MCUboot;[/quote]
&lt;p&gt;PCD_APP and PCD_NET should be enabled for the app core and the net core respectively. PCD_NET should not be enabled for the app core.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460979?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 08:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56eb9812-f8db-40e6-afec-9f47124afa57</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m constantly having a tons of troubles with the build system and bootloaders. I&amp;#39;m summarizing the current situation, perhaps it makes it easier to solve the issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;we&amp;#39;re developing to both nRF5340 APP and NET cores;&lt;/li&gt;
&lt;li&gt;APP and NET core applications are independent from each other in terms of build, so there&amp;#39;s no child image or other magic involved. The applications are simply built and the resulting &lt;code&gt;merged.hex&lt;/code&gt; files are burnt to flash by nrfjprog in two steps;
&lt;ul&gt;
&lt;li&gt;I&amp;#39;ve spent several hours to find the proper child image / multi image solution, but it all failed, and this was the only working solution to me;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;APP core features MCUboot with static PM partitioning, two slots. I&amp;#39;m now able to upgrade APP core&amp;#39;s FW;&lt;/li&gt;
&lt;li&gt;NET core features also an MCUboot with static PM partitioning, but yesterday is realized this is the wrong approach;&lt;/li&gt;
&lt;li&gt;according to my current knowledge, NET core is suggested to use the NSIB/B0N bootloader;&lt;/li&gt;
&lt;li&gt;I&amp;#39;ve disabled MCUboot on NET core, enabled B0N (&lt;code&gt;CONFIG_SECURE_BOOT&lt;/code&gt;);&lt;/li&gt;
&lt;li&gt;at the moment I really don&amp;#39;t care if devel keys are used to sign the bootloader/images, I&amp;#39;ll treat them later;&lt;/li&gt;
&lt;li&gt;if I&amp;#39;m not wrong, the NET core FW upgrade is accomplished somehow like this:
&lt;ul&gt;
&lt;li&gt;the new NET core image is downloaded to the APP core, where it&amp;#39;s stored on the secondary slot;&lt;/li&gt;
&lt;li&gt;when APP MCUboot is running, it detects that the image on the secondary slot is for the NET core;&lt;/li&gt;
&lt;li&gt;NET core is reset by MCUboot;&lt;/li&gt;
&lt;li&gt;B0N is running on the net core;&lt;/li&gt;
&lt;li&gt;MCUboot controls B0N via SRAM (RPC? libmetal? openamp?), this way the new NET core FW image is passed to B0N, which programs into NET flash;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I don&amp;#39;t understand why both PCD_APP and PCD_NET need to be enabled in APP MCUboot;&lt;/li&gt;
&lt;li&gt;haven&amp;#39;t ever seen a valid static partitioning for B0N, so I don&amp;#39;t know whether my config is alright;&lt;/li&gt;
&lt;li&gt;I can&amp;#39;t find B0N configuration file, and don&amp;#39;t know whether it has to be configured by me either. It&amp;#39;s also unknown if it features a menuconfig like MCUboot does;&lt;/li&gt;
&lt;li&gt;tried to understand samples/nrf5340/netboot entirely, but may have misunderstood:
&lt;ul&gt;
&lt;li&gt;on APP side, MCUboot calls pcd_network_core_update to reset NET core and to announce FW upgrade is available, and waits for NET core to take the image;&lt;/li&gt;
&lt;li&gt;on NET side, to be able to utilize PCD, the B0N must be extended with custom code to call pcd_fw_copy(...) and friends. This function pulls the FW upgrade image from APP core, if available;
&lt;ul&gt;
&lt;li&gt;do I really have to take care of this? Doesn&amp;#39;t B0N already have a factory code to do this?&lt;/li&gt;
&lt;li&gt;if I have to take care of this, CONFIG_IS_SECURE_BOOTLOADER must be enabled, but in this case how will my general code compile to NET core?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;finally, why my application for NET core with B0N won&amp;#39;t compile;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Config of NET core app:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_GPIO=y
CONFIG_WATCHDOG=y
CONFIG_HEAP_MEM_POOL_SIZE=38912
CONFIG_PINCTRL=y
CONFIG_SERIAL=y
CONFIG_MAIN_STACK_SIZE=1536
# CONFIG_NEWLIB_LIBC_NANO is not set
CONFIG_ENTROPY_GENERATOR=y
CONFIG_SECURE_BOOT=y
# CONFIG_SB_MONOTONIC_COUNTER is not set
# CONFIG_NRF_RPC_CBOR is not set
CONFIG_NRFX_GPIOTE_NUM_OF_EVT_HANDLERS=1
CONFIG_LIBBSP_CONSOLE_OTHER_CORE=y
CONFIG_LIBBSP_CONSOLE_OTHER_CORE_PREFIX=&amp;quot;APP:&amp;quot;
CONFIG_NRF_RPC=y
CONFIG_NRF_RPC_GROUP_INIT_WAIT_TIME=300
CONFIG_SOC_SERIES_NRF53X=y
CONFIG_SOC_NRF5340_CPUNET_QKAA=y
CONFIG_BUILD_OUTPUT_INFO_HEADER=y
CONFIG_SOC_LOG_LEVEL_ERR=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_MPU_LOG_LEVEL_ERR=y
CONFIG_KERNEL_LOG_LEVEL_ERR=y
CONFIG_THREAD_NAME=y
CONFIG_THREAD_MAX_NAME_LEN=16
CONFIG_CLOCK_CONTROL_LOG_LEVEL_ERR=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_CONSOLE_LOG_LEVEL_OFF=y
CONFIG_ENTROPY_LOG_LEVEL_OFF=y
CONFIG_ENTROPY_NRF5_THR_THRESHOLD=4
CONFIG_ENTROPY_NRF5_ISR_THRESHOLD=12
CONFIG_FLASH=y
CONFIG_GPIO_LOG_LEVEL_OFF=y
CONFIG_FXL6408_LOG_LEVEL_OFF=y
CONFIG_MBOX_LOG_LEVEL_ERR=y
CONFIG_PINCTRL_LOG_LEVEL_OFF=y
CONFIG_UART_LOG_LEVEL_ERR=y
CONFIG_WDT_LOG_LEVEL_OFF=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048
CONFIG_CBPRINTF_NANO=y
CONFIG_CBPRINTF_PACKAGE_LOG_LEVEL_OFF=y
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
CONFIG_CONSOLE_PUTCHAR_BUFSIZE=1024
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_USE_PRINTK=y
# CONFIG_ASSERT_VERBOSE is not set
CONFIG_ASSERT_NO_COND_INFO=y
CONFIG_ASSERT_NO_MSG_INFO=y
CONFIG_IPC_SERVICE_LOG_LEVEL_ERR=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_LOG_OUTPUT=y
CONFIG_STREAM_FLASH=y
CONFIG_STREAM_FLASH_ERASE=y
CONFIG_COMPILER_FREESTANDING=y
CONFIG_FORTIFY_SOURCE_NONE=y
# CONFIG_OUTPUT_DISASSEMBLY is not set&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Current static PM config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;# NOTE
# &amp;#39;b0n&amp;#39; and &amp;#39;provision&amp;#39; partitions must not be defined, because they&amp;#39;re automatically
# done so by build system/PM.

app:
  address: 0x1008800
  size: 0x32000
  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Build output (no &lt;code&gt;provision.hex&lt;/code&gt; is generated during build):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net
-- CMake version: 3.25.2
-- Found Python3: /usr/bin/python3.10 (found suitable exact version &amp;quot;3.10.10&amp;quot;) found components: Interpreter 
-- Cache files will be written to: /home/tselmeci/.cache/zephyr
-- Zephyr version: 3.3.99 (/home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-wlt-v5r1-ncs/zephyr)
-- Found west (found suitable version &amp;quot;1.1.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: wlt_v5r1_net
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.1 (/home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1)
-- Found toolchain: zephyr 0.16.1 (/home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1)
-- Found Dtc: /bin/dtc (found suitable version &amp;quot;1.6.1&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) 
-- Found BOARD.dts: /home/tselmeci/projects/base-env1.git/src/libbsp/nrfconnect/boards/arm/wlt-v5r1/wlt_v5r1_net.dts
-- Generated zephyr.dts: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/zephyr/dts.cmake
Parsing /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/Kconfig
Loaded configuration &amp;#39;/home/tselmeci/projects/base-env1.git/src/libbsp/nrfconnect/boards/arm/wlt-v5r1/wlt_v5r1_net_defconfig&amp;#39;
Merged configuration &amp;#39;/home/tselmeci/projects/base-env1.git/src/configs/app/wlt-v5r1-ncs/defconfig.net&amp;#39;
Configuration saved to &amp;#39;/home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/zephyr/include/generated/autoconf.h&amp;#39;
-- Found GnuLd: /home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version &amp;quot;2.38&amp;quot;) 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc

=== child image b0n -  begin ===
loading initial cache file /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/samples/nrf5340/netboot
-- CMake version: 3.25.2
-- Found Python3: /usr/bin/python3.10 (found suitable exact version &amp;quot;3.10.10&amp;quot;) found components: Interpreter 
-- Cache files will be written to: /home/tselmeci/.cache/zephyr
-- Zephyr version: 3.3.99 (/home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-wlt-v5r1-ncs/zephyr)
-- Found west (found suitable version &amp;quot;1.1.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: wlt_v5r1_net
-- Found host-tools: zephyr 0.16.1 (/home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1)
-- Found toolchain: zephyr 0.16.1 (/home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1)
-- Found Dtc: /bin/dtc (found suitable version &amp;quot;1.6.1&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) 
-- Found BOARD.dts: /home/tselmeci/projects/base-env1.git/src/libbsp/nrfconnect/boards/arm/wlt-v5r1/wlt_v5r1_net.dts
-- Generated zephyr.dts: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/zephyr/dts.cmake
Parsing /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/samples/nrf5340/netboot/Kconfig
Loaded configuration &amp;#39;/home/tselmeci/projects/base-env1.git/src/libbsp/nrfconnect/boards/arm/wlt-v5r1/wlt_v5r1_net_defconfig&amp;#39;
Merged configuration &amp;#39;/home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/samples/nrf5340/netboot/prj.conf&amp;#39;
Merged configuration &amp;#39;/home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf&amp;#39;
Configuration saved to &amp;#39;/home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;/home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n/zephyr/include/generated/autoconf.h&amp;#39;
-- Found GnuLd: /home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version &amp;quot;2.38&amp;quot;) 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tselmeci/projects/GNSS-cellular-tracker.git/toolchain/g4t-v1r1-gct/zephyr-sdk-0.16.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Loading Zephyr default modules (Zephyr base (cached)).
CMake Warning at /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-wlt-v5r1-ncs/zephyr/CMakeLists.txt:839 (message):
  No SOURCES given to Zephyr library: lib__libc__common

  Excluding target from build.


CMake Warning at /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-wlt-v5r1-ncs/zephyr/CMakeLists.txt:1865 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring done
-- Generating done
-- Build files have been written to: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj/b0n
=== child image b0n -  end ===

CMake Warning at /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/subsys/bootloader/cmake/debug_keys.cmake:36 (message):
  

      --------------------------------------------------------------
      --- WARNING: Using generated NSIB public/private key-pair. ---
      --- It should not be used for production.                  ---
      --- See CONFIG_SB_SIGNING_KEY_FILE                         ---
      --------------------------------------------------------------
      

Call Stack (most recent call first):
  /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/subsys/bootloader/cmake/provision_hex.cmake:37 (include)
  /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/nrf/subsys/CMakeLists.txt:17 (include)


-- libmetal version: 1.3.0 (/home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net)
-- Build type:  
-- Host:    Linux/x86_64
-- Target:  Generic/arm
-- Machine: arm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- open-amp version: 1.3.0 (/home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-v2.4.1-wlt-v5r1-ncs/modules/lib/open-amp/open-amp)
-- Host:    Linux/x86_64
-- Target:  Generic/arm
-- Machine: arm
-- C_FLAGS :  -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
Loading Zephyr default modules (Zephyr base (cached)).
CMake Warning at /home/tselmeci/projects/base-env1.git/packages/nrfconnect/nrfconnect-wlt-v5r1-ncs/zephyr/CMakeLists.txt:839 (message):
  No SOURCES given to Zephyr library: lib__libc__common

  Excluding target from build.


-- Found partition manager static configuration: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/pm_static.yml
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj
-- west build: building application
ninja: error: &amp;#39;modules/nrf/subsys/app_hex&amp;#39;, needed by &amp;#39;zephyr/nrf/subsys/bootloader/generated/app_firmware.signature&amp;#39;, missing and no known rule to make it
FATAL ERROR: command exited with status 1: /bin/cmake --build /home/tselmeci/projects/base-env1.git/src/sample-wlt-v5r1-ncs/net/build/wlt-v5r1-ncs-obj
make: *** [Makefile:48: compile] Error 1
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any help is appreciated. Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460965?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2023 07:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f9a58e2-1be8-4a69-a452-a775654a3279</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;d suggest you attempt a&amp;nbsp;DFU using the &amp;#39;net_core_app_update.bin&amp;#39; file from your project to confirm that you can perform DFU with your current configuration. The &amp;#39;PM_CPUNET_B0N_ADDRESS&amp;#39; is always located at the start of the network core&amp;#39;s FLASH and will not change. In the bootloader build, this symbol is used to determine the presence of the b0n bootloader (i.e., if netcore supports DFU or not).&lt;/p&gt;
&lt;p&gt;The memory partition layout is controlled by the partition manager when you do multi-image builds, as in your case. You can make the layout static using the dynamically generated partition file(s) when you are ready to lock it down.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460840?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 13:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fb4dc7f-dd58-4e6e-8a0c-1b06eb5424ed</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The MCUBoot bootloader on the appcore will check the reset vector address of the image your application uploaded to the secondary slot, and if it finds that the address belongs to the network core, it will update the net core.&amp;nbsp;This requires PCD_APP and PDC_NET to be enabled, but they should be by default.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/adab597a0eb0eb9c030a7b797748a49ca89988c2/boot/bootutil/src/loader.c#L1052"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/adab597a0eb0eb9c030a7b797748a49ca89988c2/boot/bootutil/src/loader.c#L1052&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460799?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 11:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e339b5-607c-451b-9803-7dea6ea14325</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;Not needed to update simultaneously. Do I need to use MCUboot in this case on NET core? Shall I use PCD?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460790?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 11:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29fe7e69-281b-4d59-9037-c33d8f7670a7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Do you need to update the network and app core simultaneously? If not, you can update the netcore separately using the same secondary slot and let the bootloader take care of transferring the image to the netcore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460778?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 10:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da4b5793-c13f-4d14-8537-583e76b30a97</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;As I can see, a BusFault is generated when APP core tries to access NET core&amp;#39;s flash area, but it&amp;#39;s working in the opposite direction, at least NET core is capable of reading APP&amp;#39;s flash area.&lt;/p&gt;
&lt;p&gt;The best would be if NET MCUboot could take FW image chunks from APP core through e.g. shared memory, so it could write directly onto flash, and there was no need for a secondary flash partition...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/460755?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 09:38:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c04c099-be2a-41cd-b1dd-e1df8f5fc3c7</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;There is some progress regarding FW upgrade.&lt;/p&gt;
&lt;p&gt;We have given up the concept of manually compiling MCUboot, instead the build system does the job. It was a good decision ;)&lt;/p&gt;
&lt;p&gt;The new image to be burnt to APP and NET cores are available on the APP core (by TCP/IP or other magic of ours).&lt;/p&gt;
&lt;p&gt;Our custom board doesn&amp;#39;t feature any external flash.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve enabled MCUboot on both APP and NET cores and created static partition layouts for both cores. This resulted in two large prog partitions (primary and secondary) on both cores (and other small partitions).&lt;/p&gt;
&lt;p&gt;We can successfully upgrade APP core&amp;#39;s FW by using MCUboot&amp;#39;s &amp;quot;move swap&amp;quot; feature. The FW upgrade is initiated somehow like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;struct flash_img_context fic;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;flash_img_init_id(&amp;amp;fic, PM_MCUBOOT_SECONDARY_ID);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;boot_erase_img_bank(PM_MCUBOOT_SECONDARY_ID);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;flash_img_buffered_write(&amp;amp;fic, fw_upg_img, sizeof(fw_upg_img), true);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;boot_request_upgrade(BOOT_UPGRADE_PERMANENT);&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On next reboot MCUboot copies the new image from secondary partition to primary, works well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now we need to make it work for NET core too. Unfortunately, if we follow the same scheme for NET core flash partitioning as for APP core partitioning, the resulting primary and secondary partitions will be very small, less than 128kB, so the new image can easily outrun this size. If we had only one prog partition that could be almost 256kB in size.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My idea is to programmatically shut down NET core and update NET core flash area from a program running on APP core. This way we don&amp;#39;t need to create primary and secondary partitions on the NET core, and the only prog partition can be large enough.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does the MCU support this kind of operation?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There are some other alternatives naturally. One that I can think of now: APP core resets NET core, the MCUboot on the NET core takes FW image parts from the APP-NET shared memory and upgrades the program partition. Does MCUboot support this or anything similar?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks, regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/435115?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 06:50:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bb2e676-2d7f-411d-b63d-33b90083988d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use the flash image API to store the image, see&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/dfu.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/dfu.html&lt;/a&gt;. We also have DFU libraries that builds on top of this API:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/index.html&lt;/a&gt;.&amp;nbsp;It may be useful to grep/search through the SDK to find examples of how the API is used.&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/435105?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 04:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee1bc2d8-dc4c-4662-a562-98b7e74a180e</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;Hello Vidar!&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;Your answer to 1) is clear, I&amp;#39;ll try it on the next week.&lt;/p&gt;
&lt;p&gt;To question 2): now I see bootutil can be used to initiate swapping, but how will my application write the new image itself into slot1? With flash/partition write API or is there any other recommended way to store new FW image into slot1 for proper MCUBoot/bootutil operation?&lt;/p&gt;
&lt;p&gt;(My assumption is that my app simply writes the new imgtool-prepared FW image to slot1 partition with Zephyr flash API, then calls bootutil to set it up for swapping)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot manual compile + usage</title><link>https://devzone.nordicsemi.com/thread/434954?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 11:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fcc1bd-ea8e-4e32-9ee7-b7a82ba08d09</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried to build MCUBoot as a separate application in a long time, to be honest. When building MCUBoot as a child-image, out-of-tree or not, the cmake build scripts will sign and prepare the update images for you automatically (for an overview of which files may be generated, see this&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/app_dev/multi_image/index.html#what-image-files-are"&gt;link&lt;/a&gt;).&amp;nbsp;I mention this because&amp;nbsp;it might be useful to have a look at how&amp;nbsp;the SDK handles this in multi-image builds.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For comparison, here&amp;#39;s the imgtool command used to create app_update.bin when I built the Zephyr smp_srv sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ imgtool.py sign --key /home/vidarbe/ncs/v2.4.0/bootloader/mcuboot/root-rsa-2048.pem --header-size 0x200 --align 4 --version 0.0.0+0 --pad-header --slot-size 0x78000 /sdk_project/smp_svr/build/zephyr/app_to_sign.bin /sdk_project/smp_svr/build/zephyr/app_update.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]how can I make MCUBoot swap my new FW image? I believe this must be something with the lack of FW image trailers. If so, how can I manually generate trailers, or how to init them?[/quote]
&lt;p&gt;The imgtool sign command will generate the image trailer as well. However, it will not include the magic word needed to mark the image as a pending update. You can include the magic word in the signed image by using the &amp;#39;--pad&amp;#39; option when signing the image with imgtool, or&amp;nbsp;use the bootutil APIs from the main app&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/bootutil/include/bootutil/bootutil_public.h#L202"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/bootutil/include/bootutil/bootutil_public.h#L202&lt;/a&gt;. Enable CONFIG_MCUBOOT_BOOTUTIL_LIB in your application to include these APIs.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;You are correct, MCUBoot will not run after it has loaded the application. This is why the application needs to write the update instructions to the image trailer using the bootutil APIs mentioned above.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>