<?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>UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97314/uf2-image-and-bootloader</link><description>I am using Windows 11, NCS v2, VSCode extension, under WSL2. 
 What I want to do is build a UF2 image of my zephyr application and be able to drag/drop it onto a bootloader which supports UF2. 
 I have looked and I see there are a number of Kconfig parameters</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Feb 2026 00:47:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97314/uf2-image-and-bootloader" /><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/560384?ContentTypeID=1</link><pubDate>Thu, 05 Feb 2026 00:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da1d1f04-d942-4e1c-9e23-984c875e9c16</guid><dc:creator>Apofis</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did the settings above solved your problems? If so, could you precise which type of build configuration do you use (board/variant/sys_build)? Did you updated the Bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/549937?ContentTypeID=1</link><pubDate>Sat, 27 Sep 2025 11:03:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c0d5019-a8a4-4734-9a72-59b511889a51</guid><dc:creator>Garag</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thank you for your detailed description. I had problems with a Pro Micro nrf52840 board. For my board i have to use the following settings in the prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_FLASH_LOAD_OFFSET=0x1000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Maybe you can try&amp;nbsp; CONFIG_FLASH_LOAD_OFFSET instead of&amp;nbsp;CONFIG_ROM_START_OFFSET.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/413630?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 18:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a720d64-0a24-4ff8-8f5f-9f9e005b11be</guid><dc:creator>douglas.malnati</dc:creator><description>&lt;p&gt;Ok I have worked out how to do it, and will update this thread with more detailed answers for the sake of the community.&lt;/p&gt;
&lt;p&gt;If you want to be able to upload zephyr firmware as a UF2 file to a USB drive, using the Adafruit bootloader, do this.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using WSL2 (linux) and a jlink programmer so those are the instructions I&amp;#39;ll provide.&amp;nbsp; I&amp;#39;m using the feather nrf52840 so I&amp;#39;ll use that also, but the bootloader supports lots of boards.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Get the Adafruit bootloader&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ git clone https://github.com/adafruit/Adafruit_nRF52_Bootloader
$ cd Adafruit_nRF52_Bootloader&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. Build and flash the bootloader&lt;pre class="ui-code" data-mode="text"&gt;$ make BOARD=feather_nrf52840_express flash
Flashing: feather_nrf52840_express_bootloader-0.6.4-dirty_nosd.hex
nrfjprog --program _build/build-feather_nrf52840_express/feather_nrf52840_express_bootloader-0.6.4-dirty_nosd.hex --sectoranduicrerase -f nrf52 --reset
Parsing image file.
WARNING: A programming operation has been performed without --verify.
WARNING: Programming can fail without error.
Applying system reset.
Run.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You should see a new USB flash drive appear in explorer&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1678125306029v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3. Change your prj.conf to include UF2 output and a rom start offset of 0x1000, corresponding to the Adafruit bootloader expectations.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_ROM_START_OFFSET=0x1000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;4. Build pristine.&amp;nbsp; Notice a UF2 file is output.&amp;nbsp; The flash output file size is also 4k smaller than before (accounting for the lost space due to the offset).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[276/276] Linking CXX executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      493704 B         1 MB     47.08%
            SRAM:      123736 B       256 KB     47.20%
        IDT_LIST:          0 GB         2 KB      0.00%
Converting to uf2, output size: 987648, start address: 0x0
Wrote 987648 bytes to zephyr.uf2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;5. Open explorer to the build output files of your application, which is &amp;lt;appname&amp;gt;/build/zephyr, and look for the zephyr.uf2 file.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:280px;max-width:533px;" height="280" src="https://devzone.nordicsemi.com/resized-image/__size/1066x560/__key/communityserver-discussions-components-files/4/pastedimage1678125452184v3.png" width="533" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;6. Drag/drop the zephyr.uf2 file onto the flash drive that appeared before.&amp;nbsp; It may take a moment of copying, but then the flash drive will vanish and your code will begin to run as normal.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1678125546847v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;7. Double-click the reset button to get back into the USB drive for drag/drop upgrade.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note - I&amp;#39;ve found that with the CONFIG_ROM_START_OFFSET parameter set, I can no longer &amp;quot;flash&amp;quot; directly from VSCode.&amp;nbsp; It kind of just bricks the device.&amp;nbsp; Commenting out that parameter during rapid code/flash/test iterations is probably the way to go.&amp;nbsp; I&amp;#39;ll put the bootloader on there when I&amp;#39;m done.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/413615?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 16:34:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecaa9a69-a8c5-4f25-ac27-351b5283ca4f</guid><dc:creator>douglas.malnati</dc:creator><description>&lt;p&gt;Specifically, it looks like these params were introduced in 2021&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/31066"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/31066&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s Zephr parameters, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/413612?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 16:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9695bf1-0896-423e-afa3-1315dc89fba5</guid><dc:creator>douglas.malnati</dc:creator><description>&lt;p&gt;Hi, I don&amp;#39;t really understand, Adafruit didn&amp;#39;t introduce those prj.conf parameters, those are part of Zephyr.&amp;nbsp; Why don&amp;#39;t you know what they do?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t ask Adafruit, they have told me already they don&amp;#39;t provide support.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But again, these are Zephyr (and therefore Nordic) parameters.&amp;nbsp; How am I supposed to understand how they work if you don&amp;#39;t know?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UF2 Image and Bootloader</title><link>https://devzone.nordicsemi.com/thread/413489?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 11:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d00cbce-6351-43c4-9652-2a611bcd0726</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The bootloaders we officially support for nRF Connect SDK is listed at &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/bootloaders_and_dfu/index.html#app-bootloaders"&gt;Bootloaders and Device Firmware Updates&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;UF2 is not one of those, so the support I can give for this will be limited. For better support, I suggest that you contact &lt;a href="https://www.adafruit.com/support"&gt;Adafruit support&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From my general bootloader knowledge:&lt;/p&gt;
&lt;p&gt;An application does not need to know about the bootloader. The bootloader will begin at address 0x0 and then point to where the application starts from.&lt;br /&gt;For other similar cases, it has been enough to build the application with &lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/span&gt;. The bootloader should be configured to point to an address for an application. Make sure the flash offset is the same as this one.&lt;/p&gt;
&lt;p&gt;Using &lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/span&gt; is only relevant if you build the bootloader separately from the application.&lt;br /&gt;So I guess that if you use &lt;span&gt;CONFIG_BUILD_OUTPUT_UF2&lt;/span&gt;, the offset might be handled automatically.&lt;/p&gt;
[quote user=""]CONFIG_BOOTLOADER_MCUBOOT[/quote]
&lt;p&gt;It should be &amp;quot;no&amp;quot;. If you do not need MCUboot, do not use MCUboot.&lt;/p&gt;
[quote user=""]CONFIG_ROM_START_OFFSET[/quote]
&lt;p&gt;I have not heard about this before. So I would guess that you do not need it.&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span&gt;CONFIG_BUILD_OUTPUT_UF2 - allows automatic building of a zephyr.uf2 file in the build directory.&amp;nbsp; &lt;strong&gt;I enabled this, should I?&amp;nbsp; I do see zephyr.uf2 produced as part of the build.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BOOTLOADER_BOSSA -&amp;nbsp;Select the Adafruit UF2 variant of the BOSSA bootloader - not sure what this does.&amp;nbsp; &lt;strong&gt;Should I set this?&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2 - &amp;quot;Select the Adafruit UF2 variant of the BOSSA bootloader&amp;quot;&amp;nbsp; &lt;strong&gt;Not really sure what this does.&amp;nbsp; Should I set this?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID - &amp;quot;UF2 bootloaders only accept UF2 files with a matching family ID&amp;quot;&amp;nbsp; &lt;strong&gt;For the nRF52840, I believe the right value is &amp;quot;0xADA52840&amp;quot;.&amp;nbsp; I think I should set this.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I do not know about UF2-specific configurations. Ask Adafruit about those.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>