<?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>XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127241/xiao-nrf52840---can-flash-but-code-will-not-run-flash-location</link><description>Hi, I am able to flash my XIAO nrf52840 using my nrf52840dk however the code does not run once flashed. I checked and the code itself is starting at 0x00027000 presumably because of the default bootloader the board came with. However, I no longer have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Mar 2026 19:35:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127241/xiao-nrf52840---can-flash-but-code-will-not-run-flash-location" /><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562683?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2026 19:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e5ca62e-30f8-4af5-97e7-b9a4241e9cb2</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Good to hear that!&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562679?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2026 18:59:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9a02d55-2e17-4ce4-8225-d3b641241b37</guid><dc:creator>cgc17</dc:creator><description>&lt;p&gt;That gave me a good pointer. Since in my case I am going without a bootloader, I just set `&lt;span&gt;CONFIG_USE_DT_CODE_PARTITION&lt;/span&gt;&lt;span&gt;=n` and disabled sysbuild (this was the key) and then it worked! I didn&amp;#39;t end up needing the overlay or any other settings as that put it right at the start of flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;`SB_CONFIG_PARTITION_MANAGER=n` gave me an error for some reason so I did not use that; I&amp;#39;m not sure why it didn&amp;#39;t work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Going forward I now know about the pm_static.yml if I need any custom definitions or need sysbuild then I will take that route. Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562586?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2026 18:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39eaf847-bd03-48d8-8041-6267c81494fa</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;For the XIAO BLE board, the default partition layout is defined in the&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/seeed/xiao_ble/pm_static.yml"&gt; board’s pm_static.yml file&lt;/a&gt;. They are configured by Partition Manager, which is enabled by default when building with sysbuild.&lt;/p&gt;
&lt;p&gt;So you can either provide your &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/topic/exercise-2-adding-custom-image/"&gt;own pm_static.yml &lt;/a&gt;or disable the partition manager (&lt;span&gt;SB_CONFIG_PARTITION_MANAGER=n&lt;/span&gt;) to use a different partition layout.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562558?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2026 14:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10c320c1-3875-43ef-84c3-3170e32efc23</guid><dc:creator>cgc17</dc:creator><description>&lt;p&gt;Thanks - I added the below deletes before redefining the partitions and everything builds now without any errors/warnings, but for some reason when I flash it it still putting code starting at 0x00027000. Even with the new flash partitions and `&lt;span&gt;CONFIG_USE_DT_CODE_PARTITION&lt;/span&gt;&lt;span&gt;=n` (I also tried without this and got the same result).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/delete-node/ &amp;amp;boot_partition;
/delete-node/ &amp;amp;storage_partition;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe I am destined to require the unused bootloader? &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562550?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2026 13:24:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8146bd85-b8d7-44d5-b0dd-cbb1c34d5af0</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This is because the label &lt;code&gt;boot_partition&lt;/code&gt; appears in both the&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/vendor/nordic/nrf52840_partition_uf2_sdv7.dtsi?plain=1#L47"&gt; board DTS &lt;/a&gt;and the overlay you added, which creates a conflict. Try changing the label name of the boot_partition to something else and see if that resolves the issue.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562475?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2026 17:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e149b6ff-b8c4-4ba7-b9d7-df347003dbff</guid><dc:creator>cgc17</dc:creator><description>&lt;p&gt;Thanks for the reply! When flashing and selecting &amp;quot;erase all&amp;quot; via the nrf connect vs code extension it wipes out the bootloader and softdevice (as expected), but I am okay with that if I can get the code to run without it. I tried adding a xiao_ble_nrf52840.overlay file in my project and pasted in the content you provided from `&lt;span&gt;zephyr/dts/vendor/nordic/nrf52840_partition.dtsi`, but I received this error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;gt;&amp;nbsp;-- Found devicetree overlay: /home/blinky_3/xiao_ble_nrf52840.overlay&lt;br /&gt;devicetree error: Label &amp;#39;boot_partition&amp;#39; appears on /soc/flash-controller@4001e000/flash@0/partitions/partition@0 and on /soc/flash-controller@4001e000/flash@0/partitions/partition@f4000&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note: if I do reload the bootlader and softdevice with the arduino IDE and then flash with nRF Connect without selecting Erase All, it does work, but, if possible, I&amp;#39;d rather be able to erase as needed and keep things clean since I don&amp;#39;t need the bootloader.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562447?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2026 14:05:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a87ae62-c694-43b9-8591-e2b0510289af</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;Also note that, by default, the XIAO uses &amp;quot;#include &amp;lt;nordic/nrf52840_partition_uf2_sdv7.dtsi&amp;gt;&amp;quot; which expects a UF2 bootloader. Try using the partitions found in &amp;quot;zephyr/dts/vendor/nordic/nrf52840_partition.dtsi&amp;quot; if you are not using the UF2 bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2024 Jacob Winther
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/ {
	chosen {
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};
};

&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0x0000C000&amp;gt;;
		};

		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x00076000&amp;gt;;
		};

		slot1_partition: partition@82000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00082000 0x00076000&amp;gt;;
		};

		/*
		 * The flash starting at 0x000f8000 and ending at
		 * 0x000fffff is reserved for use by the application.
		 */

		/*
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@f8000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x000f8000 0x00008000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIAO nrf52840 - can flash, but code will not run (flash location)</title><link>https://devzone.nordicsemi.com/thread/562395?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2026 09:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff2fc159-8132-4f17-98c6-33a8ce2a823c</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you removed the default UF2 bootloader that comes preloaded on the XIAO nRF52840? If so, could you explain how you did that?&lt;/p&gt;
&lt;p&gt;From your explanation, I understand that you are trying to flash an application with &lt;code&gt;CONFIG_BUILD_OUTPUT_UF2=n&lt;/code&gt; so that it overrides the preloaded bootloader. If that is the case, I doubt that setting &lt;code&gt;CONFIG_BUILD_OUTPUT_UF2=n&lt;/code&gt; alone is sufficient to achieve this.&lt;/p&gt;
&lt;p&gt;Could you try adding &lt;code&gt;CONFIG_FLASH_LOAD_OFFSET=0&lt;/code&gt; in your &lt;code&gt;prj.conf&lt;/code&gt; and check whether that makes the application start at address &lt;code&gt;0x0&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&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></channel></rss>