<?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>Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113443/error-on-tfm_builtin_key_loader-after-flash-and-nrf5340-custom-board-flashing</link><description>Hello, I am developing on a custom board with the nrf5340 and programming through SWD using the nrf5340dk. A few days ago everything was running fine and I was able to continuously test and debug my application code for my board. However, yesterday during</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jul 2024 07:35:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113443/error-on-tfm_builtin_key_loader-after-flash-and-nrf5340-custom-board-flashing" /><item><title>RE: Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/thread/496137?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 07:35:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d540863-7dfd-41bd-a5e0-f40cb94d47d6</guid><dc:creator>Nyameaama</dc:creator><description>&lt;p&gt;Hi Amanda, I fixed the problem by examining the flash sectors and what I was actually flashing. The problem has to do with my sysbuild implementation. Something in this config file is causing the problem:&lt;br /&gt;&lt;br /&gt;sysbuild.cmake:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Add net_core project
ExternalZephyrProject_Add(
    APPLICATION net_core
    SOURCE_DIR ${APP_DIR}/net_core
    BOARD atreides_nrf5340_cpunet
  )
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES net_core)
set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET net_core)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION net_core CACHE INTERNAL &amp;quot;&amp;quot;)

# Add a dependency so that the net_core sample will be built and flashed first
add_dependencies(base-firmware-V2 net_core)
# Add dependency so that the net_core image is flashed first.
sysbuild_add_dependencies(FLASH net_core)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I just put this file in a different folder and essentially removed it from the build so now I am not independently programming the network core anymore. This issue set me back andI &amp;nbsp;had to continue working on the actual product code &amp;nbsp;so I stopped trying to figure out what in this file makes programming go nuclear. If you have any thoughts I&amp;#39;d be glad to know but in essence the issue is &amp;quot;fixed&amp;quot;. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/thread/496087?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 19:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1019a61f-1b70-45d2-80cc-87e7a90b1ca8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you check&amp;nbsp;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_NRF_APPROTECT_USE_UICR"&gt;&lt;code&gt;&lt;span&gt;CONFIG_NRF_APPROTECT_USE_UICR&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&amp;nbsp;got enabled in the&amp;nbsp;&lt;span&gt;.config under build/zephyr and build/hci_ipc/zephyr?&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think you could compare the board files of&amp;nbsp;&lt;span&gt;nrf5340dk with your&amp;nbsp;custom board. maybe zephyr.dts and .config under build/zephyr and build/hci_ipc/zephyr might have clues.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/thread/495878?ContentTypeID=1</link><pubDate>Sat, 27 Jul 2024 16:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45553bf4-a35c-4b52-8811-2569245ee6d9</guid><dc:creator>Nyameaama</dc:creator><description>&lt;p&gt;I also recently tried programming an unopened and untouched backup unit of my custom PCB thinking maybe I did something to the board I was currently using. The same ap protect error persists and when I use the method to program with (nrf5340_cpuapp_ns), I get the Trusted-Firmware-M problem. This was leading me to believe maybe there is something wrong with my build and the firmware I&amp;rsquo;m flashing right? &lt;/p&gt;
&lt;p&gt;However when I disconnect the SWD and program the nrf5340dk with the same firmware as my custom board it programs with zero issues and I am able to debug like normal. No ap protect issues. The firmware I am flashing to the dk is not using the dk board files by the way. It&amp;rsquo;s using my custom board files so that looks like it&amp;rsquo;s eliminating the possibility of board file problems.&lt;/p&gt;
&lt;p&gt;So I am quite lost. Please also note I was programming the custom board just fine a few days ago. It did not come out of manufacturing with this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/thread/495868?ContentTypeID=1</link><pubDate>Sat, 27 Jul 2024 04:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeeca180-fd7f-49c6-9b50-f8ce75bb6213</guid><dc:creator>Nyameaama</dc:creator><description>&lt;p&gt;Hi Amanda, when I program only the application core without the network core with the&amp;nbsp;&lt;span&gt;(nrf5340_cpuapp) build configuration, it flashes just fine. However, the cores become protected once again so I am unable to debug. My application code also does not work (I am able to tell because the board is connected to stepper motor and has a stepper motor driver on the PCB&amp;nbsp;so&amp;nbsp;when the program is functioning properly the stepper is energized with a hum and does not rotate&amp;nbsp;&lt;/span&gt;freely. This does not happen in this case)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error on tfm_builtin_key_loader after flash and nrf5340 custom board flashing</title><link>https://devzone.nordicsemi.com/thread/495858?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 19:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6493fcfe-777d-46f5-aae9-56c0d61579da</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]When trying using regular (nrf5340_cpuapp) this does not work at all and it fails when programming the network core no matter what with the same ap protect error.[/quote]
&lt;p&gt;&lt;span&gt;If you don&amp;#39;t change the netcore, you can safely just flash only the GENERATED_CP_APPLICATION_merged_domains.hex (only application). Does it help?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>