<?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>about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121592/about-mcuboot-flash-dfu-image-invaild</link><description>Hello Sir, 
 I am currently working with the boards:52840dk and ncs:2.9.1 
 Regarding the issue of failed mcuboot upgrade after writing the upgrade firmware using flash APIs, where the “zephyr.signed.bin” file is the one written to flash. 
 (The code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 May 2025 08:13:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121592/about-mcuboot-flash-dfu-image-invaild" /><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536345?ContentTypeID=1</link><pubDate>Wed, 21 May 2025 08:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b904be3-2967-4a09-b487-f1866f23665a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have not tested updating via serial as I need exact insructions no how to do that, but fundamentally your approach works. I modified your&amp;nbsp;main.c like this to call &amp;quot;&lt;code&gt;boot_request_upgrade(BOOT_UPGRADE_PERMANENT)&lt;/code&gt;&amp;quot; when pressing button 1:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/drivers/uart.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/devicetree.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;zephyr/dfu/flash_img.h&amp;gt;
#include &amp;lt;zephyr/dfu/mcuboot.h&amp;gt;
#include &amp;lt;zephyr/sys/util.h&amp;gt;
#include &amp;lt;zephyr/storage/flash_map.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;

#define SLOT0_PARTITION slot0_partition
#define SLOT1_PARTITION slot1_partition

#define SLOT0_PARTITION_ID FIXED_PARTITION_ID(SLOT0_PARTITION)

#define SLOT1_PARTITION_ID FIXED_PARTITION_ID(SLOT1_PARTITION)

#define BUF_SIZE 100000
#define UART_RX_TIMEOUT_MS 20000

#define UART_RX_MTU	34464

const struct device *uart1 = DEVICE_DT_GET(DT_NODELABEL(uart1));
int global = 65;
uint8_t uart_tx_buf[128] = {0};
uint8_t uart_rx_buf[100000] = {0};
uint8_t uart_rx_buf2[128];
// uint8_t new_buf[40000] = {0};
// uint8_t firmware[40000]
int flag = 0;
int length = 0;
#define TARGET_FLASH_AREA_ID 1
struct flash_img_context flash_ctx;

/*
 * Get button configuration from the devicetree sw0 alias. This is mandatory.
 */
#define SW0_NODE	DT_ALIAS(sw0)
#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE)
#error &amp;quot;Unsupported board: sw0 devicetree alias is not defined&amp;quot;
#endif
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios,
							      {0});
static struct gpio_callback button_cb_data;


void button_pressed(const struct device *dev, struct gpio_callback *cb,
		    uint32_t pins)
{
	int ret;

	printk(&amp;quot;Button pressed. Requesting upgrade... (new image must allready be copied into slot 1)\n&amp;quot;);
	ret = boot_request_upgrade(BOOT_UPGRADE_PERMANENT); //If fully written, it will enter the DFU mode and start the update process
	if (ret != 0)
	{
		printk(&amp;quot;Failed to request upgrade: %d\n&amp;quot;, ret);
		return;
	}
}

static void uart_cb(const struct device *dev, struct uart_event *evt, void *user_data)
{
	ARG_UNUSED(dev);
	switch (evt-&amp;gt;type)
	{
	case UART_TX_DONE:
		printk(&amp;quot;UART_TX_DONE\n&amp;quot;);
		break;

	case UART_RX_RDY:
		printk(&amp;quot;received %d bytes\n&amp;quot;, evt-&amp;gt;data.rx.len);
		printk(&amp;quot;offset %d \n&amp;quot;, evt-&amp;gt;data.rx.offset);
		length = evt-&amp;gt;data.rx.len;
		// printk(&amp;quot;rx_buf = %d %d %d %d %d\n&amp;quot;, uart_rx_buf[32330], uart_rx_buf[32331], uart_rx_buf[32332], uart_rx_buf[32333], uart_rx_buf[32334]);
		flag = 1;
		//printk(&amp;quot;offset %d \n&amp;quot;, evt-&amp;gt;data.rx.offset);
		break;

	case UART_RX_DISABLED:
		break;

	case UART_RX_BUF_REQUEST:
		printk(&amp;quot;REQUEST\n&amp;quot;);
		uart_rx_buf_rsp(uart1, uart_rx_buf, BUF_SIZE);
		break;

	case UART_RX_BUF_RELEASED:
		break;

	case UART_TX_ABORTED:
		printk(&amp;quot;UART_TX_ABORTED\n&amp;quot;);
		break;

	default:
		break;
	}
}

void thread2_entry(void *p1, void *p2, void *p3)
{

	memset(uart_rx_buf, 0, BUF_SIZE);
	int err = uart_callback_set(uart1, uart_cb, NULL);
	if (err &amp;lt; 0)
	{
		printk(&amp;quot;callback configuration failed\n&amp;quot;);
		return;
	}

	err = uart_rx_enable(uart1, uart_rx_buf, BUF_SIZE, UART_RX_TIMEOUT_MS);
	if (err &amp;lt; 0)
	{
		printk(&amp;quot;rxenable configuration failed\n&amp;quot;);
		return;
	}

	while (1)
	{
		k_msleep(3000);
	}
}

K_THREAD_DEFINE(thread2, 1024, thread2_entry,
				NULL, NULL, NULL,
				K_HIGHEST_APPLICATION_THREAD_PRIO, 0, 0);


int main(void)
{
	printf(&amp;quot;second_version\n&amp;quot;);

	int ret;
	size_t offset = 0;
	size_t bytes_written;

	if (!gpio_is_ready_dt(&amp;amp;button)) {
		printk(&amp;quot;Error: button device %s is not ready\n&amp;quot;,
		       button.port-&amp;gt;name);
		return 0;
	}

	ret = gpio_pin_configure_dt(&amp;amp;button, GPIO_INPUT);
	if (ret != 0) {
		printk(&amp;quot;Error %d: failed to configure %s pin %d\n&amp;quot;,
		       ret, button.port-&amp;gt;name, button.pin);
		return 0;
	}

	ret = gpio_pin_interrupt_configure_dt(&amp;amp;button,
					      GPIO_INT_EDGE_TO_ACTIVE);
	if (ret != 0) {
		printk(&amp;quot;Error %d: failed to configure interrupt on %s pin %d\n&amp;quot;,
			ret, button.port-&amp;gt;name, button.pin);
		return 0;
	}

	gpio_init_callback(&amp;amp;button_cb_data, button_pressed, BIT(button.pin));
	gpio_add_callback(button.port, &amp;amp;button_cb_data);
	printk(&amp;quot;Set up button at %s pin %d\n&amp;quot;, button.port-&amp;gt;name, button.pin);


	/*ret = flash_img_init(&amp;amp;flash_ctx);
	if (ret != 0)
	{
		printk(&amp;quot;Flash init failed: %d\n&amp;quot;, ret);
		return ret;
	}*/

	ret = flash_img_init_id(&amp;amp;flash_ctx, SLOT1_PARTITION_ID);
	if (ret != 0)
	{
		printk(&amp;quot;Flash init failed: %d\n&amp;quot;, ret);
		return ret;
	}

	printk(&amp;quot;Flash init success\n&amp;quot;);
	while (1)
	{
		k_msleep(5);
		if (flag == 1)
		{
			while (offset &amp;lt; length)
			{
				size_t write_len = MIN(length - offset, CONFIG_IMG_BLOCK_BUF_SIZE);  //Each time, write in blocks of size blocksize.
				if (write_len &amp;lt; CONFIG_IMG_BLOCK_BUF_SIZE)
					break;

				ret = flash_img_buffered_write(&amp;amp;flash_ctx, &amp;amp;uart_rx_buf[offset],
											   write_len, false);  //During the write process, the data in the last write buffer is less than the block size
				if (ret != 0)
				{
					printk(&amp;quot;Flash write failed at offset %zu: %d\n&amp;quot;, offset, ret);
					return ret;
				}

				offset += write_len;
			}

			ret = flash_img_buffered_write(&amp;amp;flash_ctx, NULL, 0, true);	//flush The last written buffer
			/*ret = flash_img_buffered_write(&amp;amp;flash_ctx, &amp;amp;uart_rx_buf[offset],
										   (length % 512), true);*/  
			if (ret != 0)
			{
				printk(&amp;quot;Final flush failed: %d\n&amp;quot;, ret);
				return ret;
			}

			bytes_written = flash_img_bytes_written(&amp;amp;flash_ctx); //Buffer for the total number of bytes read and written
			printk(&amp;quot;Total bytes written: %zu\n&amp;quot;, bytes_written);
			if (bytes_written % UART_RX_MTU != 0)  //Check if it has been fully written in
			{
				ret = boot_request_upgrade(BOOT_UPGRADE_PERMANENT); //If fully written, it will enter the DFU mode and start the update process
				if (ret != 0)
				{
					printk(&amp;quot;Failed to request upgrade: %d\n&amp;quot;, ret);
					return ret;
				}
				printk(&amp;quot;Firmware update completed successfully!\n&amp;quot;);
			}
			offset = 0;
			flag = 0;
		}
	}
	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then I built&amp;nbsp;first version (with the printf saying &amp;quot;first_version&amp;quot;) and flashed that. Then modified the printf, rebuilt the firmware and generated a hex file of the signed bin file that has the offset for slot 1 like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ bin2hex.py --offset=0x83000 build/serial_for_mcuboot/zephyr/zephyr.signed.bin build/serial_for_mcuboot/zephyr/zephyr.signed.offset.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then I programmed that file using nrfjprog, to write it to slot 1:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --program build/serial_for_mcuboot/zephyr/zephyr.signed.offset.hex --verify&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The I pressed button 1 to call&amp;nbsp;boot_request_upgrade(), and observed in the log that the new image was activated as it should:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0xc000
*** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
REQUEST
first_version
Set up button at gpio@50000000 pin 11
Flash init success
Button pressed. Requesting upgrade... (new image must allready be copied into slot 1)
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=good, swap_type=0x3, copy_done=0x3, image_ok=0x1
I: Boot source: none
I: Image index: 0, Swap type: perm
I: Starting swap using move algorithm.
I: Bootloader chainload address offset: 0xc000
*** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
REQUEST
second_version
Set up button at gpio@50000000 pin 11
Flash init success&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This tests your whole approach, except the part where you copy the data via UART, so unless you used the wrong image file to test with (?), this is where the problem must be and that should be looked at more closely.&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536248?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 14:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16b8f95b-f7e9-4d17-a4e8-6ee400d52ada</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. I will start by looking at the build folder and flash dump, then. For readability, can you try to dump the flash like I suggested, with&amp;nbsp;&amp;quot;&lt;code&gt;nrfjprog --memrd 0 --n 0x100000 &amp;gt; memory_dump.txt&amp;quot;&lt;/code&gt;? This is simpler to analyze (If you do not have nrfjprog, that is part of &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download"&gt;nrf command line tools&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536238?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 13:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea75f307-2ed8-4436-bf03-20cef6628334</guid><dc:creator>Djangyond</dc:creator><description>&lt;p&gt;ok，i will sent to you now，thaks for your help,about transfer the image via uart, You can directly use the serial port to send data after powering on or restarting the device and you can use any GUI serial assistant tools only if it can transmit file to Nordic52840dk from Windows/Linux/mac desktop，i use some opensource Windows desktop software form china，and it usually use chinese,you can use some english software&amp;nbsp;Once again, I would like to express my heartfelt gratitude.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dump_5F00_flash.zip"&gt;devzone.nordicsemi.com/.../dump_5F00_flash.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536228?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 13:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2990615-0441-4ae3-9b84-707af0b189e7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you, I will look into this. A few additional things:&lt;/p&gt;
&lt;p&gt;1. How do you transfer the image via UART? Exactly which tools and with which command (step by step) in case I need to test this on my end?&lt;/p&gt;
&lt;p&gt;2. I did not see the&amp;nbsp;&lt;span&gt;memory_dump.txt in the attached zip files. Can you make the dump after you have transfered the new image and upload it here?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536216?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 12:53:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27f96503-f2a1-4548-bd51-c8f47864d388</guid><dc:creator>Djangyond</dc:creator><description>&lt;p&gt;ok ofcourse，really thanks，this is my project, you can west flash directly, and then use serial assistant transmit another files which named &amp;quot;Serial_port_transmission_files&amp;quot; to sram and program will auto use flash api, flashed it into flash,and&amp;nbsp;supplementary instruction i already have used Programmer tools of nRF Connect For Desktop and generated memory_dump.txt，and in the last reply mentioned two image trailer was used it,Once again, thank you for your assistance.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/serial_5F00_for_5F00_mcuboot.zip"&gt;devzone.nordicsemi.com/.../serial_5F00_for_5F00_mcuboot.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Serial_5F00_port_5F00_transmission_5F00_files.zip"&gt;devzone.nordicsemi.com/.../Serial_5F00_port_5F00_transmission_5F00_files.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536163?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 10:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56456fde-eda8-4c59-ad1e-393504589911</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need to know more about the actual images and locations (as described in my previous post). Perhaps you can share your project including the build folder so I can take a look myself?&lt;/p&gt;
&lt;p&gt;Edit: Also a full memory dump of the device after you have transfered the secondary image could be usefull. You can do that with &amp;quot;nrfjprog --memrd 0 --n 0x100000 &amp;gt; memory_dump.txt&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536159?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 10:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd3d7529-b685-49ca-a27a-b764766ba93b</guid><dc:creator>Djangyond</dc:creator><description>&lt;p&gt;Dear Engineer Sir&lt;/p&gt;
&lt;p&gt;hello&lt;/p&gt;
&lt;p&gt;I have posted two trailer images: one is the actual data I dumped from the flash, and the other is the compiled zephyr.signed.bin firmware binary. This should confirm that the real data in the flash matches exactly what I wrote, proving that my program works correctly. However, when I dumped a functional (successfully upgradable) example project, I discovered that the real data in the flash differs from the trailer section at the end of the compiled zephyr.signed.bin file. I have been unable to resolve this issue, and through debugging, I found that the program fails specifically in the trailer verification function。&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;Additionally, the device tree partitions in my setup align perfectly with the actual hardware partitions. Please review this memory layout diagram I&amp;rsquo;ve provided&amp;mdash;it should serve as conclusive evidence.&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/pastedimage1747735604512v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks for your reply&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/536011?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 13:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:405d8d08-eabc-4ecb-a941-c795f7b0854b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the partition manager is used (which is the default for nRF Connect SDK), the partition in the devicetree is not used. So it would be good to check the partition manager report. Can you generate the partition report as described &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html#partition_manager_report"&gt;here&lt;/a&gt;&amp;nbsp;and share it?&lt;/p&gt;
&lt;p&gt;What is the difference between the two image trailers you list? Are they from the exact same image, or is there a difference (could be just a different build time, if the time is included in the imsage as is the case with the SMP server sample, or any other change that would cause it to difer).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/535988?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 12:33:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0bd278f-1b40-48e5-828e-5873cc53d5a5</guid><dc:creator>Djangyond</dc:creator><description>&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/pastedimage1747657501029v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;thanks for your reply，&lt;span&gt;I&amp;#39;ve double-checked the address offset I set for Slot 1, and it exactly matches the flash addresses I dumped earlier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;after my verification, in my code, both the size and offset in the flash are correct. On the contrary, in the successfully upgradeable routine, the TLV fields at the end of the image cannot match those of the zephyr.signed.bin. I am very curious about this issue，and it maybe the key of the question？&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about mcuboot flash dfu image invaild</title><link>https://devzone.nordicsemi.com/thread/535973?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 12:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26fc5c2-2bc3-42bd-a123-18d914254396</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;west flash does not modify the signature, or do anythign like that. The image is written as is.&lt;/p&gt;
&lt;p&gt;There are two potential problems that come to mind: 1: did you&amp;nbsp;wrtite the image at an incorrect addres or with an offset, so that validation failes because of that? In wchich address does slot 1 start, and can you doubel check that this is exactly where you copy the newimage (without any offset)? Also, make sure you sign with a valid key?&lt;/p&gt;
&lt;p&gt;Also, testing with &lt;code&gt;CONFIG_MCUBOOT_LOG_LEVEL_DBG=y&lt;/code&gt;&amp;nbsp;in the MCUboot configuration may give some more information about that is happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>