<?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>New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109636/new-firmware-with-zephyr-and-old-bootloader</link><description>HI, 
 two years ago I started my adventure with the nRF52840 microcontroller. I started using SEGGER Embedded Studio for ARM as my development IDE. I created a peripheral BLE device and am able to update the firmware via bluetooth following the pca10056_s140_ble_debug</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 May 2024 13:24:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109636/new-firmware-with-zephyr-and-old-bootloader" /><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/485649?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 13:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69fadb94-4ce6-4c4a-ad20-97bbb1cf43c3</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Stefano1984"]1) with the old bootloader (nRF5 bootloader) I had to define a private key in the dfu_public_key.c file. I guess it&amp;#39;s to encrypt the DFU packet. Regarding the MCUboot, is there a private key to set?[/quote]
&lt;p&gt;Yes, see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders/bootloader_adding.html#ug-bootloader-adding-immutable-mcuboot-keys"&gt;Adding MCUboot as an immutable bootloader -&amp;gt; Adding a custom signature key file&lt;/a&gt;&lt;/p&gt;
[quote user="Stefano1984"]I run the west command in my workspace.&amp;nbsp;How do I solve the problem?[/quote]
&lt;p&gt;Using VS Code is more or less the same as using west, so no need to use both.&lt;/p&gt;
&lt;p&gt;However, you can use west if you open this terminal:&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/5466.pastedimage1716470687717v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/485465?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 14:36:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ad33114-ca0c-4a74-8809-58421da44e51</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m following your instructions starting from step 1: Use the MCUboot and NCS application&lt;/p&gt;
&lt;p&gt;I read the bootloader guide &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/"&gt;here&lt;/a&gt; and was able to put the MCUboot on my NCS application.&lt;/p&gt;
&lt;p&gt;Following the example &amp;quot;Exercise 3 &amp;ndash; FOTA over Bluetooth Low Energy&amp;quot; is very simple, just add the following lines to the prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Everything works perfectly.&amp;nbsp;The only difference is that I don&amp;#39;t use the merged.hex file, instead I use the app_update.bin file as indicated in the guide.&lt;br /&gt;At this point, before going any further, I have some questions:&lt;br /&gt;1) with the old bootloader (nRF5 bootloader) I had to define a private key in the dfu_public_key.c file. I guess it&amp;#39;s to encrypt the DFU packet. Regarding the MCUboot, is there a private key to set?&lt;/p&gt;
&lt;p&gt;2) I can&amp;#39;t use the west command. I use VSCode to compile the code and in fact VSCode uses the west command. For example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build --build-dir c:/GitHub_Repository/spi_flash/build c:/GitHub_Repository/spi_flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I installed west with package manager (pip3) but when I use the same command I get the following error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west: unknown command &amp;quot;build&amp;quot;; do you need to run this inside a workspace?&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I run the west command in my workspace.&amp;nbsp;How do I solve the problem?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/482091?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 14:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3879f26-4647-4cef-9765-48edea4d1752</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ll do as you said and let you know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/480182?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 11:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2e5ee49-790b-4f53-9579-ed6a15a75daa</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Stefano1984"]1) Why when I enter CONFIG_FLASH_LOAD_OFFSET=0x27000 my application (without bootloader) doesn&amp;#39;t work at all? Shouldn&amp;#39;t it still work without a bootloader?[/quote]
&lt;p&gt;MCU starts executing from 0x000.&lt;br /&gt;If nothing is at 0x0000, it will fail.&lt;br /&gt;So either bootloader or app must start on 0x000.&lt;/p&gt;
[quote user="Stefano1984"]2) in the documentation you indicated to me at the link there is no reference to the use of CONFIG_FLASH_LOAD_OFFSET and how to use it. Did I miss something?[/quote]
&lt;p&gt;I suggest that you read the entire page instead of Ctrl+F through for what you need. It gives some good background knowledge which can help you understand the root of your issue.&lt;br /&gt;The part I specifically referred to was this sentence:&lt;br /&gt;&amp;quot; When an nRF chip powers on, it will start executing code from address 0x00000000. Because of this, applications without a bootloader are stored from address 0x00000000 and onward. &amp;quot;&lt;/p&gt;
[quote user="Stefano1984"]3) in the documentation you gave me at the link, MCUboot is used. This however is not my case. I want to use the bootloader provided by nRF5_SDK_17.1.0 (pca10056_s140_ble_debug). Is there an example that fits my situation?[/quote]
&lt;p&gt;Yes, but the concept of a bootloader is the same for the nRF Connect SDK and the nRF5 SDK.&lt;/p&gt;
&lt;p&gt;Basically: The bootloader and the application does not really know about each other.&lt;br /&gt;The only thing is that the bootloader knows which address the application starts at, and then it hands over execution to that addr.&lt;/p&gt;
&lt;p&gt;The nRF5 SDK is a bit special, as it has the MBR that is at 0x000 which then hands over to the bootloader before the nRF5 bootloader starts the application.&lt;/p&gt;
&lt;p&gt;I think it will be beneficial if you do your project here in steps.&lt;br /&gt;Here are the steps I suggest. After each step, see that everything works as planned.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use MCUboot and NCS application. Flash merged.hex to the device, as this has both app and bootloader.&lt;/li&gt;
&lt;li&gt;Use MCUboot and NCS application. Flash hex files for MCUboot and application separately.&amp;nbsp; Use &amp;quot;west -vvv build ...&amp;quot; to see which files are used to make merged.hex.&lt;/li&gt;
&lt;li&gt;Use MCUboot and NCS application. Change start addr for application. Flash hex files for each.&lt;/li&gt;
&lt;li&gt;Use nRF5 application and nRF5 bootloader. Flash entire nRF5 project to device&lt;/li&gt;
&lt;li&gt;Use nRF5 application and nRF5 bootloader. Flash application and bootloader hex files each on their own.&lt;/li&gt;
&lt;li&gt;Use nRF5 bootloader and NCS application. Flash each hex file on their own.&lt;/li&gt;
&lt;li&gt;Then start looking into DFU.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/480160?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 10:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c53ff256-2d2e-4f37-945e-cf24c1190d74</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;bear with me but I still don&amp;#39;t understand where I&amp;#39;m wrong.&lt;/p&gt;
&lt;p&gt;I understand that CONFIG_FLASH_LOAD_OFFSET=0x27000 moves my application to address 0x27000.&lt;br /&gt;I read the documentation you gave me at the link but I couldn&amp;#39;t find a solution to my problem. So I&amp;#39;ll ask you some questions.&lt;/p&gt;
&lt;p&gt;1) Why when I enter CONFIG_FLASH_LOAD_OFFSET=0x27000 my application (without bootloader) doesn&amp;#39;t work at all? Shouldn&amp;#39;t it still work without a bootloader?&lt;/p&gt;
&lt;p&gt;2) in the documentation you indicated to me at the link there is no reference to the use of CONFIG_FLASH_LOAD_OFFSET and how to use it. Did I miss something?&lt;/p&gt;
&lt;p&gt;3) in the documentation you gave me at the link, MCUboot is used. This however is not my case. I want to use the bootloader provided by nRF5_SDK_17.1.0 (pca10056_s140_ble_debug). Is there an example that fits my situation?&lt;/p&gt;
&lt;p&gt;I hope you can help me.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/480098?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 06:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4b1cc34-6e35-405f-b82c-d4fe95ad7333</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Stefano1984"]&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;doesn&amp;#39;t work.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt; However with the instruction CONFIG_FLASH_LOAD_OFFSET=0x27000 with bootloader IT WORKS.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;What could my problem be?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This expected.&lt;/p&gt;
&lt;p&gt;I already kinda explained this over &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/bootloader-basics/"&gt;here&lt;/a&gt;. CONFIG_FLASH_LOAD_OFFSET is the red arrow in this picture:&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/pastedimage1713854727618v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Read the link I provided and let me know if what you see makes sense then&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/480030?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 14:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf50c775-ccbd-49a1-a415-2959c9243eaa</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the suggestion.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have some news.&lt;br /&gt;I found that if I enter the statement CONFIG_FLASH_LOAD_OFFSET=0x27000 without bootloader it doesn&amp;#39;t work. No reply. Not even if I start debugging.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only thing I can tell you is that on the debug terminal I read the following lines:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;JLinkGDBServerCL: SEGGER J-Link GDB Server V7.94e Command Line Version
JLinkGDBServerCL: 
JLinkGDBServerCL: JLinkARM.dll V7.94e (DLL compiled Jan 15 2024 15:18:46)
JLinkGDBServerCL: 
JLinkGDBServerCL: -----GDB Server start settings-----
JLinkGDBServerCL: GDBInit file:                  none
JLinkGDBServerCL: GDB Server Listening port:     55862
JLinkGDBServerCL: SWO raw output listening port: 2332
JLinkGDBServerCL: Terminal I/O port:             2333
JLinkGDBServerCL: Accept remote connection:      localhost only
JLinkGDBServerCL: Generate logfile:              off
JLinkGDBServerCL: Verify download:               off
JLinkGDBServerCL: Init regs on start:            off
JLinkGDBServerCL: Silent mode:                   on
JLinkGDBServerCL: Single run mode:               on
JLinkGDBServerCL: Target connection timeout:     0 ms
JLinkGDBServerCL: ------J-Link related settings------
JLinkGDBServerCL: J-Link Host interface:         USB
JLinkGDBServerCL: J-Link script:                 none
JLinkGDBServerCL: J-Link settings file:          none
JLinkGDBServerCL: ------Target related settings------
JLinkGDBServerCL: Target device:                 nrf52840_xxaa
JLinkGDBServerCL: Target device parameters:      none
JLinkGDBServerCL: Target interface:              SWD
JLinkGDBServerCL: Target interface speed:        12000kHz
JLinkGDBServerCL: Target endian:                 little
JLinkGDBServerCL: 
=thread-group-added,id=&amp;quot;i1&amp;quot;
=cmd-param-changed,param=&amp;quot;pagination&amp;quot;,value=&amp;quot;off&amp;quot;
0xfffffffe in ?? ()
[New Remote target]
[New Thread 536886128]
[New Thread 536885944]
[New Thread 536885728]
[New Thread 536886312]
[New Thread 536881984]
[New Thread 536881440]
[New Thread 536882200]
[New Thread 536882384]
[New Thread 536885544]

Thread 2 received signal SIGTRAP, Trace/breakpoint trap.
0xfffffffe in ?? ()
Execute debugger commands using &amp;quot;-exec &amp;lt;command&amp;gt;&amp;quot; or &amp;quot;`&amp;lt;command&amp;gt;&amp;quot;, for example &amp;quot;-exec info registers&amp;quot; or &amp;quot;`info registers&amp;quot; will list registers in use (when GDB is the debugger)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;At this point I created another project that only prints Hello Word.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;With the instruction CONFIG_FLASH_LOAD_OFFSET=0x27000 without bootloader it doesn&amp;#39;t work.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt; However with the instruction CONFIG_FLASH_LOAD_OFFSET=0x27000 with bootloader IT WORKS.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;What could my problem be?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/479337?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 06:46:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4adb44d3-0c92-490b-8d24-68bef4e4774c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Stefano1984"]The error is as follows:[/quote]
&lt;p&gt;It is very good to know that we get logs! It does mean that we are indeed able to run the new app.&lt;br /&gt;So, that means we know that load offset is correct.&lt;/p&gt;
&lt;p&gt;In that case, we need to debug the application itself.&lt;/p&gt;
&lt;p&gt;Just to sanity-check: The application works with only zephyr (No bootloader), correct?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The bus fault happens in the idle thread (Current thread: 0x20003ab8 (idle)).&lt;br /&gt;Try increasing &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_IDLE_STACK_SIZE"&gt;CONFIG_IDLE_STACK_SIZE&lt;/a&gt;.&lt;/p&gt;
[quote user="Stefano1984"]err = bt_enable(NULL);[/quote]
&lt;p&gt;Then try to DFU to an application without BLE first. For example hello_world. Seeing if such an app works would give valuable information.&lt;/p&gt;
&lt;p&gt;If such an app works, try to update into one of our BLE examples, unchanged aside from flash load offset. Then see if those work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/479291?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 16:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e780be93-a495-4b30-b275-31e6371584a8</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Thanks for the suggestion.&lt;br /&gt;Actually if I start the firmware in debug I get an error when I execute the following line of code (&lt;span&gt;I think)&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;err = bt_enable(NULL);&lt;/p&gt;
&lt;p&gt;The error is as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.474,182] &amp;lt;inf&amp;gt; fs_nvs: No GC Done marker found: restarting gc
[00:00:00.474,945] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****
[00:00:00.475,280] &amp;lt;err&amp;gt; os:   Imprecise data bus error
[00:00:00.475,646] &amp;lt;err&amp;gt; os: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000040
[00:00:00.476,135] &amp;lt;err&amp;gt; os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0006e9cf
[00:00:00.476,623] &amp;lt;err&amp;gt; os:  xpsr:  0x41000000
[00:00:00.476,959] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0004b760
[00:00:00.477,416] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 26: Unknown error on CPU 0
[00:00:00.477,874] &amp;lt;err&amp;gt; os: Current thread: 0x20003ab8 (idle)
[00:00:00.483,184] &amp;lt;err&amp;gt; fatal_error: Resetting system&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This below is the image of the flash with only the bootloader:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1713370567204v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Below is the image of the flash with the bootloader and the nRF5 application:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1713370819057v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally, below is the image of the flash with the bootloader and the Zephyr application:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1713370883114v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/479263?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:334d13dc-06ed-4740-81e9-ed1c86ca2be0</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I want to see if this image looks the same for NCS and nRF5 apps.&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/pastedimage1713362471886v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user="Sigurd Hellesvik"]Do you get any logs at all?[/quote]
&lt;p&gt;Specifically UART logs from the application&lt;/p&gt;
[quote user="Stefano1984"]Can you explain it better? I&amp;#39;m new to Zephyr.[/quote]
&lt;p&gt;In case you have not seen it yet, I highly recommend &lt;a href="https://academy.nordicsemi.com/"&gt;https://academy.nordicsemi.com/&lt;/a&gt; to learn.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/479232?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:256456f7-6185-4b4d-8712-2b050eedcebe</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Sigurd Hellesvik,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand what I need to check.&lt;/p&gt;
&lt;p&gt;Can you explain it better? I&amp;#39;m new to Zephyr.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/478960?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 11:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a6fbb88-7669-48c1-b0d1-a4d868130070</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Stefano1984"]&lt;p&gt; How come? Can you help me? Am I forgetting some settings?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;How does the same addr map look for a nRF5 application?&lt;/p&gt;
&lt;p&gt;Do you get any logs at all?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/478891?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 08:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89bfb0d2-ce42-496f-ac98-677495890af6</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Sigurd Hellesvik,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;br /&gt;I actually entered the CONFIG_FLASH_LOAD_OFFSET command.&lt;br /&gt;Below I report the contents of my prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=4096

CONFIG_BT=y
CONFIG_LOG=y

CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_ATT_PREPARE_COUNT=5
CONFIG_BT_PRIVACY=y

CONFIG_BT_DEVICE_NAME=&amp;quot;My app&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=65
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
CONFIG_BT_SETTINGS=y

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK=n

CONFIG_GPIO=y
CONFIG_PWM=y
CONFIG_LED=y
CONFIG_I2C=y
CONFIG_ADC=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_LOG_MODE_IMMEDIATE=y

CONFIG_FLASH_LOAD_OFFSET=0x27000 &amp;lt;-------&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Below are the images of the flash after the firmware update:&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/Screenshot-2024_2D00_04_2D00_16-100622.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the firmware is loaded correctly starting from address 0x27000. However, the application doesn&amp;#39;t work. How come? Can you help me? Am I forgetting some settings?&lt;/p&gt;
&lt;p&gt;Thank you&lt;br /&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/478738?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 11:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79ed8837-3e60-4471-82c6-eea3869b8f73</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I bet you forgot &lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/span&gt;, and your zephyr image will overwrite the MBR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/478683?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 09:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2d60f24-6c32-49c0-b6f2-98f84cf49be7</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;HI,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;I didn&amp;#39;t quite understand.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;My situation is this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;1) I program nRF52840 microcontroller using nRF5_SDK_17.1.0 and SEGGER Embedded Studio for ARM.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;2) as bootloader I used the example pca10056_s140_ble_debug available in the SDK&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;3) I create the DFU package using nrfutil tool and the following command&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;pre class="ui-code" data-mode="text"&gt;python nordicsemi/__main__.py pkg generate --application myApplication.hex myApplication.zip --hw-version 1 --sd-req 0x100 --application-version 1 --key-file priv.pem&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;4) finally I switch my device to DFU mode and, via the &amp;quot;nRF Connect&amp;quot; app on my smartphone, I connect and send the DFU package.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;Everything works fine.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;Now I want to switch to using the Zephyr.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;I wrote the code for my application using the Zephyr and it works.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;Now I want to create a DFU package to install my application on my device without changing the bootloader. It can be done?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;I tried to create the DFU package using the .hex file generated by the Zephyr:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;python nordicsemi/__main__.py pkg generate --application myZephyrApplication.hex myZephyrApplication.zip --hw-version 1 --sd-req 0x100 --application-version 1 --key-file priv.pem&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The DFU package is created but when I install it on my device nothing works.&lt;/p&gt;
&lt;p&gt;How can I do?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New firmware with Zephyr and old bootloader</title><link>https://devzone.nordicsemi.com/thread/475875?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 11:38:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f9a152c-b340-4978-bbfd-3d56019e4323</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is possible to use the nRF5 Bootloader for nRF Connect SDK application. See &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95859/one-bootloader-to-rule-them-all"&gt;One bootloader to rule them all&lt;/a&gt; &lt;br /&gt;While more complicated, it is also possible to upgrade your application and the bootloader from nRF5 SDK to nRF Connect SDK over OTA. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application"&gt;Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;However, I would start by asking yourself: Do you need to upgrade the firmware on the devices in the field to the nRF Connect SDK? Or could you get by with keeping devices in the field to nRF5 SDK and then use nRF Connect SDK for new devices?&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>