[NCS v2.2.0] - Device Firmware Update (DFU) via OTA using BLE

Hi 

In order to add DFU function to our custom board (integrating nRF52840) over OTA by using BLE, we refer to the guide named "Adding DFU support to your application" and use the same procedure (include the sample) from the "DFU over Bluetooth" section on nRF52840DK. The upload tool we use is nRF Connect Device Manager (Android-verison 1.5.2).

The result is that when we select the "Test and confirm" option on Device Manager to upgrade firmware (whatever app_update.bin or dfu_application.zip), the state will display "Invalid value (3)" after the procedure is completed. We are not sure if the firmware was successfully upgraded.

In view of this, we searched this issue on Nordic Q&A and found someone with the same problem. The case is here. We refered to the solution in this case to upgrade firmware using "Confirm Only" option. But the result was the same. We recorded two logs. One from nRF Logger app and the other from Minicom. They are as follows.

Device Manager, 2023-02-22
Nordic_LBS (Device Manager)
I	10:17:34.488	[e] Connected to FB:C7:5C:DB:A6:D2
I	10:17:34.925	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I	10:17:35.006	[e] PHY updated (TX: LE 2M, RX: LE 2M)
I	10:17:35.206	[e] Services discovered
I	10:17:35.284	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
I	10:17:35.311	[e] MTU changed to: 252
I	10:17:35.462	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
I	10:17:35.484	[e] Notifications enabled
I	10:17:35.513	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:17:35.596	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
I	10:17:35.620	[e] Wait for value changed complete
I	10:17:35.664	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
I	10:17:35.687	[e] PHY read (TX: LE 2M, RX: LE 2M)
I	10:17:35.710	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
I	10:17:35.733	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
I	10:17:35.756	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:17:35.788	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:17:35.913	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-86-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
I	10:17:35.942	[e] Received Header (Op: 1, Flags: 0, Len: 134, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
I	10:17:36.002	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
I	10:17:36.026	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
I	10:17:39.612	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)
V	10:18:33.530	[j] Starting DFU, mode: CONFIRM_ONLY
I	10:18:33.726	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 2, Command: 0) CBOR {}
I	10:18:33.757	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:18:33.828	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-86-00-01-02-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
I	10:18:33.860	[e] Received Header (Op: 1, Flags: 0, Len: 134, Group: 1, Seq: 2, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
V	10:18:33.908	[k] Validation response: {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
V	10:18:33.932	[j] Moving from state VALIDATE to state UPLOAD
I	10:18:33.954	Uploading firmware...
I	10:18:53.679	Image (207602 bytes) sent in 19535 ms (avg speed: 10.627182 kB/s)
I	10:18:53.757	[Uploader] Upload completed. 207602 bytes sent in 19717 ms with avg speed: 10.528553 kBytes/s
V	10:18:53.795	[j] Moving from state UPLOAD to state CONFIRM
I	10:18:53.847	[e] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 174, Command: 0) CBOR {"confirm":true,"hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg="}
I	10:18:53.878	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:18:53.911	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-06-00-01-AE-00-BF-62-72-63-03-FF
I	10:18:53.938	[e] Received Header (Op: 3, Flags: 0, Len: 6, Group: 1, Seq: 174, Command: 0) CBOR {"rc":3}
E	10:18:53.977	Upgrade failed
Mcu Mgr Error: IN_VALUE (3)
	at j2.e$b.c(Unknown Source:24)
	at k2.f.j(Unknown Source:10)
	at k2.f.c(Unknown Source:0)
	at k2.e.run(Unknown Source:4)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)

I	10:19:01.875	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 175, Command: 0) CBOR {}
I	10:19:01.909	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:01.941	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-AF-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-68-4D-91-02-80-6C-EF-2A-5C-A1-18-CB-18-21-86-07-A4-B5-B0-84-71-74-B8-92-E1-4F-DB-1C-16-E1-53-18-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
I	10:19:01.975	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
I	10:19:02.005	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 175, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	10:19:25.226	[j] Starting DFU, mode: TEST_AND_CONFIRM
I	10:19:25.377	[e] Connection parameters updated (interval: 15.0ms, latency: 0, timeout: 5000ms)
I	10:19:25.403	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 176, Command: 0) CBOR {}
I	10:19:25.440	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:25.478	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-B0-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-68-4D-91-02-80-6C-EF-2A-5C-A1-18-CB-18-21-86-07-A4-B5-B0-84-71-74-B8-92-E1-4F-DB-1C-16-E1-53-18-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
I	10:19:25.497	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
I	10:19:25.523	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 176, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	10:19:25.551	[k] Validation response: {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	10:19:25.578	[j] Moving from state VALIDATE to state TEST
I	10:19:25.611	[e] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 177, Command: 0) CBOR {"confirm":false,"hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg="}
I	10:19:25.632	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:25.673	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-F4-00-01-B1-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-68-4D-91-02-80-6C-EF-2A-5C-A1-18-CB-18-21-86-07-A4-B5-B0-84-71-74-B8-92-E1-4F-DB-1C-16-E1-53-18-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F5-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
I	10:19:25.701	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
I	10:19:25.723	[e] Received Header (Op: 3, Flags: 0, Len: 244, Group: 1, Seq: 177, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	10:19:25.747	[i] Test response: {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	10:19:25.770	[j] Moving from state TEST to state RESET
I	10:19:25.807	[e] Sending (10 bytes) Header (Op: 2, Flags: 0, Len: 2, Group: 0, Seq: 178, Command: 5) CBOR {}
I	10:19:25.847	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:25.876	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-02-00-00-B2-05-BF-FF
I	10:19:25.896	[e] Received Header (Op: 3, Flags: 0, Len: 2, Group: 0, Seq: 178, Command: 5) CBOR {}
V	10:19:25.917	[g] Reset request success. Waiting for disconnect...
W	10:19:33.614	[e] Error: (0x8): GATT CONN TIMEOUT
I	10:19:33.666	[e] Disconnected
I	10:19:33.701	[g] Device disconnected
V	10:19:33.727	[g] Waiting remaining 2192 ms for the swap operation to complete
V	10:19:35.957	[j] Moving from state RESET to state CONFIRM
I	10:19:47.473	[e] Connected to FB:C7:5C:DB:A6:D2
I	10:19:47.896	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I	10:19:47.974	[e] PHY updated (TX: LE 2M, RX: LE 2M)
I	10:19:48.210	[e] Services discovered
I	10:19:48.262	[e] MTU changed to: 252
I	10:19:48.300	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
I	10:19:48.529	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
I	10:19:48.572	[e] Notifications enabled
I	10:19:48.606	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:48.661	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
I	10:19:48.690	[e] Wait for value changed complete
I	10:19:48.717	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
I	10:19:48.744	[e] PHY read (TX: LE 2M, RX: LE 2M)
I	10:19:48.774	[e] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 0, Command: 0) CBOR {"confirm":true,"hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg="}
I	10:19:48.802	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
I	10:19:48.826	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:48.861	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:19:48.891	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-06-00-01-00-00-BF-62-72-63-03-FF
I	10:19:48.921	[e] Received Header (Op: 3, Flags: 0, Len: 6, Group: 1, Seq: 0, Command: 0) CBOR {"rc":3}
E	10:19:48.968	Upgrade failed
Mcu Mgr Error: IN_VALUE (3)
	at j2.e$b.c(Unknown Source:24)
	at k2.f.j(Unknown Source:10)
	at k2.f.c(Unknown Source:0)
	at k2.e.run(Unknown Source:4)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)

I	10:19:49.002	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
I	10:19:49.036	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
I	10:19:52.590	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)
I	10:20:01.416	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 2, Command: 0) CBOR {}
I	10:20:01.458	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:20:01.582	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-02-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-68-4D-91-02-80-6C-EF-2A-5C-A1-18-CB-18-21-86-07-A4-B5-B0-84-71-74-B8-92-E1-4F-DB-1C-16-E1-53-18-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
I	10:20:01.667	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
I	10:20:01.697	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 2, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":false,"confirmed":false,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":false,"permanent":false}],"splitStatus":0}
I	10:20:26.721	[e] Sending (10 bytes) Header (Op: 2, Flags: 0, Len: 2, Group: 0, Seq: 3, Command: 5) CBOR {}
I	10:20:26.809	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:20:26.865	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-02-00-00-03-05-BF-FF
I	10:20:26.894	[e] Received Header (Op: 3, Flags: 0, Len: 2, Group: 0, Seq: 3, Command: 5) CBOR {}
W	10:20:27.683	[e] Error: (0x8): GATT CONN TIMEOUT
I	10:20:27.725	[e] Disconnected
I	10:20:48.442	[e] Connected to FB:C7:5C:DB:A6:D2
I	10:20:48.872	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
I	10:20:48.956	[e] PHY updated (TX: LE 2M, RX: LE 2M)
I	10:20:49.167	[e] Services discovered
I	10:20:49.223	[e] MTU changed to: 252
I	10:20:49.278	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
I	10:20:49.322	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
I	10:20:49.353	[e] Notifications enabled
I	10:20:49.389	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:20:49.461	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
I	10:20:49.491	[e] Wait for value changed complete
I	10:20:49.528	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
I	10:20:49.563	[e] PHY read (TX: LE 2M, RX: LE 2M)
I	10:20:49.601	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
I	10:20:49.647	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
I	10:20:49.674	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:20:49.701	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	10:20:49.748	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-74-BE-73-50-F1-1B-50-18-09-1B-27-01-AA-83-E0-36-10-AC-C3-40-E8-19-90-C0-1C-D4-59-CF-6E-60-09-F3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-68-4D-91-02-80-6C-EF-2A-5C-A1-18-CB-18-21-86-07-A4-B5-B0-84-71-74-B8-92-E1-4F-DB-1C-16-E1-53-18-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
I	10:20:49.822	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
I	10:20:49.859	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"dL5zUPEbUBgJGycBqoPgNhCsw0DoGZDAHNRZz25gCfM=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"aE2RAoBs7ypcoRjLGCGGB6S1sIRxdLiS4U/bHBbhUxg=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
I	10:20:49.913	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
I	10:20:49.953	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
I	10:20:53.566	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)

In the minicom log, there is a test log "########## Test Log - Another Image ##########". It means that the current image is using the new image. In addition, you can also confirm the "build time" log to check if the active image is changed.

*** Booting Zephyr OS build v3.2.99-ncs1 ***
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: Swap type: none
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
Starting Bluetooth Peripheral LBS example
build time: Feb 21 2023 16:50:30
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fe8
I: data wra: 0, 0
I: SoftDevice Controller build revision: 
I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
I: 29 a5 03 38 39 27 d7 85 |)..89'..
I: 1f 85 d8 e1             |....    
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started
Connected
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: test
I: Swap type: test
*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
I: Starting swap using move algorithm.
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
Starting Bluetooth Peripheral LBS example
########## Test Log - Another Image ##########
build time: Feb 21 2023 16:49:34
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd0
I: data wra: 0, 1c
I: SoftDevice Controller build revision: 
I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
I: 29 a5 03 38 39 27 d7 85 |)..89'..
I: 1f 85 d8 e1             |....    
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started
Connected
I: Swap type: revert
I: Swap type: revert
*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: revert
I: Starting swap using move algorithm.
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
Starting Bluetooth Peripheral LBS example
build time: Feb 21 2023 16:50:30
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd0
I: data wra: 0, 1c
I: SoftDevice Controller build revision: 
I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
I: 29 a5 03 38 39 27 d7 85 |)..89'..
I: 1f 85 d8 e1             |....    
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started
Connected
I: Swap type: none
I: Swap type: none

The following steps show the process we did.

1. After connect to the nRF52840DK, click "Image" section and choose "ADVANED". Then "READ" the image. It will send the current image information.

2. Choose "BASIC" and select a image file (binary or zip file). After click "START", it will ask you to select mode. Here we choose "Confirm only" and click "START".

3. After the process is completed, the "State" will change. The message is "Invalid value (3)".

4. Check the image information as the same as the first step and you will see that there are two images in nRF52840DK. But the active image is not the new one but the original one.

5. Next, test the "Test and confirm" option as the same as the second step.

6. The result is also the same as the "Confirm only" method.

7. "READ" image again and you will see the active image is changed to the new one and their locations have also changed.

8. Send a "RESET" command to nRF52840DK to test if it will use the new image after reset.

9. "READ" image again and you will see the active is changed to the original one but not the new one, since the image was not successfully confirmed.

Can anyone help with this?

Please feel free to let me know if you need more information.

Thanks.

Best Regards,

Kevin

Parents
  • Hi,

    I will go with you through the code of mcumgr subsystem from where you're getting the error.

    First, have a look here: https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c#L585. This is where handlers for different commands are registered. The confirm or test commands are sent as Write to IMG_MGMT_ID_STATE command to Image group, that means we need to check img_mgmt_state_write method.:

    https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c#L274

    We are looking for places where an error called MGMT_ERR_EINVAL is returned as rc.

    I assume the decoding here: https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c#L290 works, as it is called both when you have confirm=false and confirm=true. The first case seems to be working properly. It sets the pending flag to true. After reset the device is swapping images and runs the new image, which is correct. This method fails when confirm is true, which means the error must come later.

    The hash sent is equal in both cases, so this also doesn't end here: https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c#L305

    Then, the next possible place is here: https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c#L315 where the manager is looking for the image to be confirmed. This method is defined here: https://github.com/nrfconnect/sdk-zephyr/blob/0cd59b0c43aa0c9d6682066aca74ac05be094169/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c#L233-L247 indicating that perhaps CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER isn't set properly.

    Check this out:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER.html#std-kconfig-CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER

    If that's not the case, try going further that path. But I suspect that may be it. The next method is just returning the state of images, which is again called for test and confirm, so should work the same way.

    Hope that helped!

  • Hi,

    Thank you for your prompt reply. 

    Do you mean that the problem is that the value of CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER in the configuration is set incorrectly?

    Is my understanding correct? If yes, its default value in .config was as follows:

    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=1

    Then I added its new value in prj.conf for testing, as follows:

    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=2

    I also list the prj.conf settings based on guidelines.

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    # CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    
    # DFU configuration
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=2
    

    But I was getting a failure when building the example:

     *  Executing task: nRF Connect: Build [pristine]: ble_dfu_peripheral_lbs/build (active) 
    
    Building ble_dfu_peripheral_lbs
    west build --build-dir /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs;/mnt/hdd/nordic/code/smp_svr;/mnt/hdd/nordic/code/vasco;/mnt/hdd/nordic/code_v2.0.0/smp_svr" -DCONF_FILE:STRING="/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/prj.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/kevin/.cache/zephyr
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    CMake Warning at /mnt/hdd/nordic/v2.2.0/zephyr/cmake/modules/boards.cmake:88 (message):
      BOARD_ROOT element without a 'boards' subdirectory:
    
      /mnt/hdd/nordic/code_v2.0.0/smp_svr
    
      Hints:
    
        - if your board directory is '/foo/bar/boards/<ARCH>/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
        - if in doubt, use absolute paths
    Call Stack (most recent call first):
      /mnt/hdd/nordic/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
      /mnt/hdd/nordic/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /mnt/hdd/nordic/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:8 (find_package)
    
    
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /mnt/hdd/nordic/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/dts.cmake
    Parsing /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/Kconfig
    Loaded configuration '/mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/prj.conf'
    Configuration saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/.config'
    Kconfig header saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/kevin/.cache/zephyr
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /mnt/hdd/nordic/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /mnt/hdd/nordic/v2.2.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/dts.cmake
    Parsing /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /mnt/hdd/nordic/v2.2.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    MCUBoot bootloader key file: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /mnt/hdd/nordic/v2.2.0/nrf/modules/mcuboot/CMakeLists.txt:286 (message):
      
    
              ---------------------------------------------------------
              --- WARNING: Using default MCUBoot key, it should not ---
              --- be used for production.                           ---
              ---------------------------------------------------------
              
    
    
    
    CMake Warning at /mnt/hdd/nordic/v2.2.0/zephyr/CMakeLists.txt:1833 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build
    -- west build: building application
    [1/280] Preparing syscall dependency handling
    
    [2/280] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr), build: v3.2.99-ncs1
    [3/280] Creating directories for 'mcuboot_subimage'
    [4/280] No download step for 'mcuboot_subimage'
    [5/280] No update step for 'mcuboot_subimage'
    [6/280] No patch step for 'mcuboot_subimage'
    [7/280] No configure step for 'mcuboot_subimage'
    [7/280] Performing build step for 'mcuboot_subimage'
    [1/190] Preparing syscall dependency handling
    
    [2/190] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr), build: v3.2.99-ncs1
    [3/190] Generating misc/generated/syscalls_subdirs.trigger
    [4/190] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [5/190] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [6/190] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [7/190] Generating include/generated/driver-validation.h
    [8/190] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [9/190] Generating include/generated/offsets.h
    [10/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [11/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [12/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [13/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [14/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [15/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [16/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [17/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [18/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [19/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [20/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [21/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [22/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [23/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [24/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [25/190] Generating zephyr/autogen-pubkey.c
    [26/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [27/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [28/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [29/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [30/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [31/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [32/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [33/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [34/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [35/190] Building C object CMakeFiles/app.dir/main.c.obj
    [36/190] Building C object CMakeFiles/app.dir/os.c.obj
    [37/190] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [38/190] Building C object CMakeFiles/app.dir/keys.c.obj
    [39/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [40/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [41/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [42/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [43/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [44/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [45/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [46/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [47/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/nrf/cc310_glue.c.obj
    [48/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
    [49/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
    [50/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [51/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_scratch.c.obj
    [52/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
    [53/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/caps.c.obj
    [54/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [55/190] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [56/190] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [57/190] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [58/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [59/190] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [60/190] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [61/190] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [62/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [63/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [64/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [65/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [66/190] Linking C static library app/libapp.a
    [67/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [68/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_no_mutex_zephyr.c.obj
    [69/190] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [70/190] Generating linker_zephyr_pre1.cmd
    [71/190] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [72/190] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [73/190] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [74/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [75/190] Generating linker_zephyr_pre0.cmd
    [76/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [77/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [78/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [79/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [80/190] Linking C static library zephyr/libzephyr.a
    [81/190] Linking C static library zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
    [82/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [83/190] Linking C static library zephyr/arch/common/libisr_tables.a
    [84/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [85/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [86/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [87/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [88/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [89/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [90/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [91/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [92/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [93/190] Linking C static library zephyr/arch/common/libarch__common.a
    [94/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [95/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [96/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [97/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
    [98/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [99/190] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [100/190] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [101/190] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [102/190] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [103/190] Generating ../../../include/generated/libc/minimal/strerror_table.h
    [104/190] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj
    [105/190] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [106/190] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [107/190] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [108/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a
    [109/190] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [110/190] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [111/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [112/190] Linking C static library zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a
    [113/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [114/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [115/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [116/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [117/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [118/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a
    [119/190] Linking C static library zephyr/drivers/clock_control/libdrivers__clock_control.a
    [120/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [121/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [122/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [123/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [124/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strerror.c.obj
    [125/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [126/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [127/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [128/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [129/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [130/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [131/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [132/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
    [133/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
    [134/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [135/190] Linking C static library zephyr/drivers/console/libdrivers__console.a
    [136/190] Linking C static library zephyr/drivers/gpio/libdrivers__gpio.a
    [137/190] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [138/190] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [139/190] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [140/190] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
    [141/190] Linking C static library zephyr/drivers/serial/libdrivers__serial.a
    [142/190] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [143/190] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [144/190] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [145/190] Linking C static library zephyr/lib/libc/minimal/liblib__libc__minimal.a
    [146/190] Linking C static library modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a
    [147/190] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [148/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [149/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [150/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [151/190] Linking C static library zephyr/drivers/pinctrl/libdrivers__pinctrl.a
    [152/190] Linking C static library modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a
    [153/190] Linking C static library modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a
    [154/190] Linking C static library zephyr/drivers/timer/libdrivers__timer.a
    [155/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [156/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [157/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [158/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [159/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [160/190] Building C object modules/segger/CMakeFiles/modules__segger.dir/mnt/hdd/nordic/v2.2.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [161/190] Linking C static library modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
    [162/190] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [163/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [164/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [165/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [166/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [167/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [168/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [169/190] Linking C static library modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a
    [170/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [171/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [172/190] Linking C static library modules/segger/libmodules__segger.a
    [173/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [174/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [175/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [176/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [177/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [178/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [179/190] Linking C static library zephyr/kernel/libkernel.a
    [180/190] Linking C executable zephyr/zephyr_pre0.elf
    
    [181/190] Generating dev_handles.c
    [182/190] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/misc/empty_file.c.obj
    [183/190] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [184/190] Linking C executable zephyr/zephyr_pre1.elf
    
    [185/190] Generating linker.cmd
    [186/190] Generating isr_tables.c, isrList.bin
    [187/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
    [188/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [189/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [190/190] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       33692 B        48 KB     68.55%
                 RAM:       17792 B       256 KB      6.79%
            IDT_LIST:          0 GB         2 KB      0.00%
    [183/280] Building C object zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj
    FAILED: zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj 
    ccache /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D__PROGRAM_START -D__ZEPHYR__=1 -I/mnt/hdd/nordic/v2.2.0/nrf/drivers/mpsl/clock_control -I/mnt/hdd/nordic/v2.2.0/zephyr/include -Izephyr/include/generated -I/mnt/hdd/nordic/v2.2.0/zephyr/soc/arm/nordic_nrf/nrf52 -I/mnt/hdd/nordic/v2.2.0/zephyr/soc/arm/nordic_nrf/common/. -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/bluetooth -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/settings/include -I/mnt/hdd/nordic/v2.2.0/nrf/include -I/mnt/hdd/nordic/v2.2.0/nrf/lib/multithreading_lock/. -I/mnt/hdd/nordic/v2.2.0/nrf/subsys/bluetooth/controller/. -I/mnt/hdd/nordic/v2.2.0/zephyr/drivers/flash -I/mnt/hdd/nordic/v2.2.0/nrf/tests/include -I/mnt/hdd/nordic/v2.2.0/modules/hal/cmsis/CMSIS/Core/Include -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/include -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/mdk -I/mnt/hdd/nordic/v2.2.0/zephyr/modules/hal_nordic/nrfx/. -I/mnt/hdd/nordic/v2.2.0/modules/debug/segger/SEGGER -I/mnt/hdd/nordic/v2.2.0/modules/debug/segger/Config -I/mnt/hdd/nordic/v2.2.0/zephyr/modules/segger/. -I/mnt/hdd/nordic/v2.2.0/modules/crypto/tinycrypt/lib/include -I/mnt/hdd/nordic/v2.2.0/modules/lib/zcbor/include -I/mnt/hdd/nordic/v2.2.0/nrfxlib/mpsl/include -I/mnt/hdd/nordic/v2.2.0/nrfxlib/mpsl/include/protocol -I/mnt/hdd/nordic/v2.2.0/nrfxlib/softdevice_controller/include -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/mgmt/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/util/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/smp/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/include -isystem /mnt/hdd/nordic/v2.2.0/zephyr/lib/libc/minimal/include -isystem /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem /mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs=CMAKE_SOURCE_DIR -fmacro-prefix-map=/mnt/hdd/nordic/v2.2.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/mnt/hdd/nordic/v2.2.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj -MF zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj.d -o zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj -c /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c
    In file included from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/toolchain.h:50,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/lib/libc/minimal/include/string.h:13,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/sys/mpsc_packet.h:9,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log_msg.h:10,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log_core.h:9,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log.h:11,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:7:
    /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:29:1: error: static assertion failed: "Missing partitions?"
       29 | BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER == 1 ||
          | ^~~~~~~~~~~~
    [191/280] Building C object modules/nrf/lib/dk_buttons_and_leds/CMakeFiles/..__nrf__lib__dk_buttons_and_leds.dir/dk_buttons_and_leds.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/cmake --build /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it.

    From the build log, it seems that the failure is caused by this reason:

    /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:29:1: error: static assertion failed: "Missing partitions?"
       29 | BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER == 1 ||
          | ^~~~~~~~~~~~

    Is it because the partition is not set, or other reasons? If yes, how do we set up partitions?

    By the way, we use nRF Connect for VS Code (Linux) for development.

    Thanks again for your help.

    Best Regards,

    Kevin

Reply
  • Hi,

    Thank you for your prompt reply. 

    Do you mean that the problem is that the value of CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER in the configuration is set incorrectly?

    Is my understanding correct? If yes, its default value in .config was as follows:

    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=1

    Then I added its new value in prj.conf for testing, as follows:

    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=2

    I also list the prj.conf settings based on guidelines.

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Nordic_LBS"
    
    # Enable the LBS service
    CONFIG_BT_LBS=y
    CONFIG_BT_LBS_POLL_BUTTON=y
    CONFIG_DK_LIBRARY=y
    
    # CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    
    # DFU configuration
    
    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Allow for large Bluetooth data packets.
    CONFIG_BT_L2CAP_TX_MTU=252
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER=2
    

    But I was getting a failure when building the example:

     *  Executing task: nRF Connect: Build [pristine]: ble_dfu_peripheral_lbs/build (active) 
    
    Building ble_dfu_peripheral_lbs
    west build --build-dir /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs;/mnt/hdd/nordic/code/smp_svr;/mnt/hdd/nordic/code/vasco;/mnt/hdd/nordic/code_v2.0.0/smp_svr" -DCONF_FILE:STRING="/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/prj.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/kevin/.cache/zephyr
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    CMake Warning at /mnt/hdd/nordic/v2.2.0/zephyr/cmake/modules/boards.cmake:88 (message):
      BOARD_ROOT element without a 'boards' subdirectory:
    
      /mnt/hdd/nordic/code_v2.0.0/smp_svr
    
      Hints:
    
        - if your board directory is '/foo/bar/boards/<ARCH>/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
        - if in doubt, use absolute paths
    Call Stack (most recent call first):
      /mnt/hdd/nordic/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
      /mnt/hdd/nordic/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      /mnt/hdd/nordic/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:8 (find_package)
    
    
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /mnt/hdd/nordic/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/dts.cmake
    Parsing /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/Kconfig
    Loaded configuration '/mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/prj.conf'
    Configuration saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/.config'
    Kconfig header saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/kevin/.cache/zephyr
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /mnt/hdd/nordic/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /mnt/hdd/nordic/v2.2.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/dts.cmake
    Parsing /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/mnt/hdd/nordic/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration '/mnt/hdd/nordic/v2.2.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /mnt/hdd/nordic/v2.2.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    MCUBoot bootloader key file: /mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /mnt/hdd/nordic/v2.2.0/nrf/modules/mcuboot/CMakeLists.txt:286 (message):
      
    
              ---------------------------------------------------------
              --- WARNING: Using default MCUBoot key, it should not ---
              --- be used for production.                           ---
              ---------------------------------------------------------
              
    
    
    
    CMake Warning at /mnt/hdd/nordic/v2.2.0/zephyr/CMakeLists.txt:1833 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build
    -- west build: building application
    [1/280] Preparing syscall dependency handling
    
    [2/280] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr), build: v3.2.99-ncs1
    [3/280] Creating directories for 'mcuboot_subimage'
    [4/280] No download step for 'mcuboot_subimage'
    [5/280] No update step for 'mcuboot_subimage'
    [6/280] No patch step for 'mcuboot_subimage'
    [7/280] No configure step for 'mcuboot_subimage'
    [7/280] Performing build step for 'mcuboot_subimage'
    [1/190] Preparing syscall dependency handling
    
    [2/190] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/mnt/hdd/nordic/v2.2.0/zephyr), build: v3.2.99-ncs1
    [3/190] Generating misc/generated/syscalls_subdirs.trigger
    [4/190] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [5/190] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [6/190] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [7/190] Generating include/generated/driver-validation.h
    [8/190] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [9/190] Generating include/generated/offsets.h
    [10/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [11/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [12/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [13/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [14/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [15/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [16/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [17/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [18/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [19/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [20/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [21/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [22/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [23/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [24/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [25/190] Generating zephyr/autogen-pubkey.c
    [26/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [27/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [28/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [29/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [30/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [31/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [32/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [33/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [34/190] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [35/190] Building C object CMakeFiles/app.dir/main.c.obj
    [36/190] Building C object CMakeFiles/app.dir/os.c.obj
    [37/190] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [38/190] Building C object CMakeFiles/app.dir/keys.c.obj
    [39/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [40/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [41/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [42/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [43/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [44/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [45/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [46/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [47/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/nrf/cc310_glue.c.obj
    [48/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
    [49/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
    [50/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [51/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_scratch.c.obj
    [52/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
    [53/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/caps.c.obj
    [54/190] Building C object CMakeFiles/app.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [55/190] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [56/190] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [57/190] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [58/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [59/190] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [60/190] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [61/190] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [62/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [63/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [64/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [65/190] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [66/190] Linking C static library app/libapp.a
    [67/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [68/190] Building C object zephyr/CMakeFiles/zephyr.dir/mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_no_mutex_zephyr.c.obj
    [69/190] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [70/190] Generating linker_zephyr_pre1.cmd
    [71/190] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [72/190] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [73/190] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [74/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [75/190] Generating linker_zephyr_pre0.cmd
    [76/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [77/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [78/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [79/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [80/190] Linking C static library zephyr/libzephyr.a
    [81/190] Linking C static library zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
    [82/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [83/190] Linking C static library zephyr/arch/common/libisr_tables.a
    [84/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [85/190] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [86/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [87/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [88/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [89/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [90/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [91/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [92/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [93/190] Linking C static library zephyr/arch/common/libarch__common.a
    [94/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [95/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [96/190] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [97/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
    [98/190] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [99/190] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [100/190] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [101/190] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [102/190] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [103/190] Generating ../../../include/generated/libc/minimal/strerror_table.h
    [104/190] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj
    [105/190] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [106/190] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [107/190] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [108/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a
    [109/190] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [110/190] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [111/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [112/190] Linking C static library zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a
    [113/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [114/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [115/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [116/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [117/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [118/190] Linking C static library zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a
    [119/190] Linking C static library zephyr/drivers/clock_control/libdrivers__clock_control.a
    [120/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [121/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [122/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [123/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [124/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strerror.c.obj
    [125/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [126/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [127/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [128/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [129/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [130/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [131/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [132/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
    [133/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
    [134/190] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [135/190] Linking C static library zephyr/drivers/console/libdrivers__console.a
    [136/190] Linking C static library zephyr/drivers/gpio/libdrivers__gpio.a
    [137/190] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [138/190] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [139/190] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [140/190] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
    [141/190] Linking C static library zephyr/drivers/serial/libdrivers__serial.a
    [142/190] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [143/190] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [144/190] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [145/190] Linking C static library zephyr/lib/libc/minimal/liblib__libc__minimal.a
    [146/190] Linking C static library modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a
    [147/190] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [148/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [149/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [150/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [151/190] Linking C static library zephyr/drivers/pinctrl/libdrivers__pinctrl.a
    [152/190] Linking C static library modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a
    [153/190] Linking C static library modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a
    [154/190] Linking C static library zephyr/drivers/timer/libdrivers__timer.a
    [155/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [156/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [157/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [158/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [159/190] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [160/190] Building C object modules/segger/CMakeFiles/modules__segger.dir/mnt/hdd/nordic/v2.2.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [161/190] Linking C static library modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
    [162/190] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [163/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [164/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [165/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [166/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [167/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [168/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [169/190] Linking C static library modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a
    [170/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [171/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [172/190] Linking C static library modules/segger/libmodules__segger.a
    [173/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [174/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [175/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [176/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [177/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [178/190] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [179/190] Linking C static library zephyr/kernel/libkernel.a
    [180/190] Linking C executable zephyr/zephyr_pre0.elf
    
    [181/190] Generating dev_handles.c
    [182/190] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/misc/empty_file.c.obj
    [183/190] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [184/190] Linking C executable zephyr/zephyr_pre1.elf
    
    [185/190] Generating linker.cmd
    [186/190] Generating isr_tables.c, isrList.bin
    [187/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
    [188/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [189/190] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [190/190] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       33692 B        48 KB     68.55%
                 RAM:       17792 B       256 KB      6.79%
            IDT_LIST:          0 GB         2 KB      0.00%
    [183/280] Building C object zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj
    FAILED: zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj 
    ccache /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D__PROGRAM_START -D__ZEPHYR__=1 -I/mnt/hdd/nordic/v2.2.0/nrf/drivers/mpsl/clock_control -I/mnt/hdd/nordic/v2.2.0/zephyr/include -Izephyr/include/generated -I/mnt/hdd/nordic/v2.2.0/zephyr/soc/arm/nordic_nrf/nrf52 -I/mnt/hdd/nordic/v2.2.0/zephyr/soc/arm/nordic_nrf/common/. -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/bluetooth -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/settings/include -I/mnt/hdd/nordic/v2.2.0/nrf/include -I/mnt/hdd/nordic/v2.2.0/nrf/lib/multithreading_lock/. -I/mnt/hdd/nordic/v2.2.0/nrf/subsys/bluetooth/controller/. -I/mnt/hdd/nordic/v2.2.0/zephyr/drivers/flash -I/mnt/hdd/nordic/v2.2.0/nrf/tests/include -I/mnt/hdd/nordic/v2.2.0/modules/hal/cmsis/CMSIS/Core/Include -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/drivers/include -I/mnt/hdd/nordic/v2.2.0/modules/hal/nordic/nrfx/mdk -I/mnt/hdd/nordic/v2.2.0/zephyr/modules/hal_nordic/nrfx/. -I/mnt/hdd/nordic/v2.2.0/modules/debug/segger/SEGGER -I/mnt/hdd/nordic/v2.2.0/modules/debug/segger/Config -I/mnt/hdd/nordic/v2.2.0/zephyr/modules/segger/. -I/mnt/hdd/nordic/v2.2.0/modules/crypto/tinycrypt/lib/include -I/mnt/hdd/nordic/v2.2.0/modules/lib/zcbor/include -I/mnt/hdd/nordic/v2.2.0/nrfxlib/mpsl/include -I/mnt/hdd/nordic/v2.2.0/nrfxlib/mpsl/include/protocol -I/mnt/hdd/nordic/v2.2.0/nrfxlib/softdevice_controller/include -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -I/mnt/hdd/nordic/v2.2.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/mgmt/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/util/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/smp/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include -I/mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/include -isystem /mnt/hdd/nordic/v2.2.0/zephyr/lib/libc/minimal/include -isystem /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem /mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem /mnt/hdd/nordic/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/mnt/hdd/nordic/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/mnt/hdd/nordic/code/ble_dfu_peripheral_lbs=CMAKE_SOURCE_DIR -fmacro-prefix-map=/mnt/hdd/nordic/v2.2.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/mnt/hdd/nordic/v2.2.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj -MF zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj.d -o zephyr/subsys/mgmt/mcumgr/CMakeFiles/subsys__mgmt__mcumgr.dir/lib/cmd/img_mgmt/src/img_mgmt_priv.c.obj -c /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c
    In file included from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/toolchain.h:50,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/lib/libc/minimal/include/string.h:13,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/sys/mpsc_packet.h:9,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log_msg.h:10,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log_core.h:9,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/include/zephyr/logging/log.h:11,
                     from /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:7:
    /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:29:1: error: static assertion failed: "Missing partitions?"
       29 | BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER == 1 ||
          | ^~~~~~~~~~~~
    [191/280] Building C object modules/nrf/lib/dk_buttons_and_leds/CMakeFiles/..__nrf__lib__dk_buttons_and_leds.dir/dk_buttons_and_leds.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /mnt/hdd/nordic/toolchains/v2.2.0/usr/local/bin/cmake --build /mnt/hdd/nordic/code/ble_dfu_peripheral_lbs/build
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it.

    From the build log, it seems that the failure is caused by this reason:

    /mnt/hdd/nordic/v2.2.0/zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_priv.c:29:1: error: static assertion failed: "Missing partitions?"
       29 | BUILD_ASSERT(CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER == 1 ||
          | ^~~~~~~~~~~~

    Is it because the partition is not set, or other reasons? If yes, how do we set up partitions?

    By the way, we use nRF Connect for VS Code (Linux) for development.

    Thanks again for your help.

    Best Regards,

    Kevin

Children
  • Hi, I had a talk with a firmware developer familiar with MCU manager. 

    First of all we confirm that dfu works on our side. We used NCS 2.2. That may indicate an issue in your code out setup.

    Are you using external storage for the secondary slots?

    After you read the image state on Image 4 above, could you then click Confirm button instead of trying upgrade with Test & Confirm? On the Advanced screen you can upload the image and then select Confirm manually. Did you try that?

    Did you also try using nRF Connect Device Manager on iOS?

  • Hi,

    Well... maybe there is something wrong with my code. But I followed all the procedures in the guide, even the sample code. Other than that, I didn't add or modify anything, except adding a test log to the test image.

    I'm not sure if I use the secondary slots for external storage. As mentioned above, I followed all the steps in the guide and didn't change anything except the test logs. Or maybe I missed somewhere. 

    In addition, I also suspect that another possible place is the device tree setting. The DTS of nRF52840DK in NCS v.2.2.0 is here: nrf52840dk_nrf52840.dts.

    The screenshot below shows the result of my following your advice.

    Device Manager, 2023-03-01
    Nordic_LBS (Device Manager)
    I	14:46:40.842	[e] Connected to FB:C7:5C:DB:A6:D2
    I	14:46:41.270	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    I	14:46:41.577	[e] Services discovered
    I	14:46:41.667	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
    I	14:46:41.720	[e] MTU changed to: 252
    I	14:46:41.946	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
    I	14:46:41.976	[e] Notifications enabled
    I	14:46:42.004	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:46:42.078	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
    I	14:46:42.105	[e] Wait for value changed complete
    I	14:46:42.154	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
    I	14:46:42.178	[e] PHY read (TX: LE 2M, RX: LE 2M)
    I	14:46:42.205	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
    I	14:46:42.240	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
    I	14:46:42.259	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:46:42.288	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:46:42.437	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-86-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
    I	14:46:42.460	[e] Received Header (Op: 1, Flags: 0, Len: 134, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
    I	14:46:42.525	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
    I	14:46:42.551	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
    I	14:46:45.595	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)
    I	14:48:32.174	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 2, Command: 0) CBOR {}
    I	14:48:32.200	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:48:32.284	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-86-00-01-02-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
    I	14:48:32.312	[e] Received Header (Op: 1, Flags: 0, Len: 134, Group: 1, Seq: 2, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
    I	14:49:30.779	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 177, Command: 0) CBOR {}
    I	14:49:30.819	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:49:30.873	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-B1-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-6D-FE-5C-B1-3B-F2-10-F3-22-2C-64-C5-71-10-A0-8B-6A-1F-46-7E-D4-C6-37-C8-BF-0B-02-F9-7F-0F-D6-E3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
    I	14:49:30.918	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
    I	14:49:30.952	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 177, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
    I	14:49:44.524	[e] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 178, Command: 0) CBOR {"confirm":true,"hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM="}
    I	14:49:44.561	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:49:44.584	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-06-00-01-B2-00-BF-62-72-63-03-FF
    I	14:49:44.607	[e] Received Header (Op: 3, Flags: 0, Len: 6, Group: 1, Seq: 178, Command: 0) CBOR {"rc":3}
    I	14:50:55.508	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 179, Command: 0) CBOR {}
    I	14:50:55.554	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:50:55.584	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-B3-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-6D-FE-5C-B1-3B-F2-10-F3-22-2C-64-C5-71-10-A0-8B-6A-1F-46-7E-D4-C6-37-C8-BF-0B-02-F9-7F-0F-D6-E3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
    I	14:50:55.610	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
    I	14:50:55.645	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 179, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
    I	14:51:04.115	[e] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 180, Command: 0) CBOR {"confirm":false,"hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM="}
    I	14:51:04.156	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:51:04.192	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-F4-00-01-B4-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-6D-FE-5C-B1-3B-F2-10-F3-22-2C-64-C5-71-10-A0-8B-6A-1F-46-7E-D4-C6-37-C8-BF-0B-02-F9-7F-0F-D6-E3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F5-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
    I	14:51:04.218	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
    I	14:51:04.244	[e] Received Header (Op: 3, Flags: 0, Len: 244, Group: 1, Seq: 180, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
    I	14:51:31.493	[e] Sending (10 bytes) Header (Op: 2, Flags: 0, Len: 2, Group: 0, Seq: 181, Command: 5) CBOR {}
    I	14:51:31.535	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:51:31.559	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-02-00-00-B5-05-BF-FF
    I	14:51:31.584	[e] Received Header (Op: 3, Flags: 0, Len: 2, Group: 0, Seq: 181, Command: 5) CBOR {}
    W	14:51:39.305	[e] Error: (0x8): GATT CONN TIMEOUT
    I	14:51:39.356	[e] Disconnected
    I	14:51:53.050	[e] Connected to FB:C7:5C:DB:A6:D2
    I	14:51:53.474	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    I	14:51:53.555	[e] PHY updated (TX: LE 2M, RX: LE 2M)
    I	14:51:53.784	[e] Services discovered
    I	14:51:53.845	[e] MTU changed to: 252
    I	14:51:53.874	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
    I	14:51:53.922	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
    I	14:51:53.937	[e] Notifications enabled
    I	14:51:53.956	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:51:54.064	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
    I	14:51:54.091	[e] Wait for value changed complete
    I	14:51:54.133	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
    I	14:51:54.160	[e] PHY read (TX: LE 2M, RX: LE 2M)
    I	14:51:54.195	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
    I	14:51:54.239	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
    I	14:51:54.263	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:51:54.295	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:51:54.337	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-6D-FE-5C-B1-3B-F2-10-F3-22-2C-64-C5-71-10-A0-8B-6A-1F-46-7E-D4-C6-37-C8-BF-0B-02-F9-7F-0F-D6-E3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
    I	14:51:54.469	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
    I	14:51:54.502	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM=","bootable":true,"pending":false,"confirmed":false,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":false,"permanent":false}],"splitStatus":0}
    I	14:51:54.649	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
    I	14:51:54.668	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
    I	14:51:58.167	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)
    I	14:52:15.142	[e] Sending (10 bytes) Header (Op: 2, Flags: 0, Len: 2, Group: 0, Seq: 2, Command: 5) CBOR {}
    I	14:52:15.185	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:52:15.303	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-02-00-00-02-05-BF-FF
    I	14:52:15.337	[e] Received Header (Op: 3, Flags: 0, Len: 2, Group: 0, Seq: 2, Command: 5) CBOR {}
    W	14:52:16.083	[e] Error: (0x8): GATT CONN TIMEOUT
    I	14:52:16.123	[e] Disconnected
    I	14:52:36.790	[e] Connected to FB:C7:5C:DB:A6:D2
    I	14:52:37.220	[e] Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    I	14:52:37.295	[e] PHY updated (TX: LE 2M, RX: LE 2M)
    I	14:52:37.543	[e] Services discovered
    I	14:52:37.595	[e] MTU changed to: 252
    I	14:52:37.615	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
    I	14:52:37.802	[e] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
    I	14:52:37.834	[e] Notifications enabled
    I	14:52:37.874	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:52:37.938	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
    I	14:52:37.969	[e] Wait for value changed complete
    I	14:52:38.008	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
    I	14:52:38.033	[e] PHY read (TX: LE 2M, RX: LE 2M)
    I	14:52:38.067	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
    I	14:52:38.118	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:52:38.136	[e] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 1, Command: 6) CBOR {}
    I	14:52:38.158	[e] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	14:52:38.214	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-1D-63-C4-57-13-B3-06-10-AD-EB-52-EF-E1-4B-9C-8B-D0-AB-49-CF-BA-02-ED-69-4F-16-AC-02-96-D5-D2-E5-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-6D-FE-5C-B1-3B-F2-10-F3-22-2C-64-C5-71-10-A0-8B-6A-1F-46-7E-D4-C6-37-C8-BF-0B-02-F9-7F-0F-D6-E3-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75
    I	14:52:38.299	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 73-00-FF
    I	14:52:38.331	[e] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"HWPEVxOzBhCt61Lv4Uuci9CrSc+6Au1pTxasApbV0uU=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"bf5csTvyEPMiLGTFcRCgi2ofRn7UxjfIvwsC+X8P1uM=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
    I	14:52:38.388	[e] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-01-06-BF-62-72-63-08-FF
    I	14:52:38.420	[e] Received Header (Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 1, Command: 6) CBOR {"rc":8}
    I	14:52:41.905	[e] Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 420ms)
    

    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    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: Swap type: none
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
    Starting Bluetooth Peripheral LBS example
    build time: Mar  1 2023 10:40:40
    I: 2 Sectors of 4096 bytes
    I: alloc wra: 0, fe8
    I: data wra: 0, 0
    I: SoftDevice Controller build revision: 
    I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
    I: 29 a5 03 38 39 27 d7 85 |)..89'..
    I: 1f 85 d8 e1             |....    
    I: No ID address. App must call settings_load()
    Bluetooth initialized
    Advertising successfully started
    Connected
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: none
    I: Swap type: test
    I: Swap type: test
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: test
    I: Starting swap using move algorithm.
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
    Starting Bluetooth Peripheral LBS example
    build time: Mar  1 2023 10:10:34
    I: 2 Sectors of 4096 bytes
    I: alloc wra: 0, fd0
    I: data wra: 0, 1c
    I: SoftDevice Controller build revision: 
    I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
    I: 29 a5 03 38 39 27 d7 85 |)..89'..
    I: 1f 85 d8 e1             |....    
    I: No ID address. App must call settings_load()
    Bluetooth initialized
    Advertising successfully started
    ############### Test Log - Another Image ###############
    Connected
    I: Swap type: revert
    I: Swap type: revert
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    I: Starting bootloader
    I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: revert
    I: Starting swap using move algorithm.
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot*** Booting Zephyr OS build v3.2.99-ncs1 ***
    Starting Bluetooth Peripheral LBS example
    build time: Mar  1 2023 10:40:40
    I: 2 Sectors of 4096 bytes
    I: alloc wra: 0, fd0
    I: data wra: 0, 1c
    I: SoftDevice Controller build revision: 
    I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
    I: 29 a5 03 38 39 27 d7 85 |)..89'..
    I: 1f 85 d8 e1             |....    
    I: No ID address. App must call settings_load()
    Bluetooth initialized
    Advertising successfully started
    Connected
    I: Swap type: none
    I: Swap type: none
    

    1. First, "READ" the image on the Advanced screen after connecting to the nRF52840DK.

    2. In "Firmware Upload" section, upload a image named "app_update.bin" and choose "Application Core".

    3. The upload process.

    4. The State will show "UPLOAD COMPLETE" after the process is completed.

    5. "READ" the image again. You will see there are two images in the nRF52840DK.

    6. The result after clicking "CONFIRM" option. It will display "Invalid value (3)".

    7. Next, "TEST" the new image after "READ" the images again.

    8. Send a "RESET" command.

    9. After reset the nRF52840DK, the current image will change to the new image.

    10. If you send a "RESET" command again, you will see the current image is reversed.


    The following results show what we tried using Device manager on iOS.

    1. First, "READ" the image on the Advanced screen after connecting to the nRF52840DK.

    2. In IMAGE UPGRADE section, choose a image named "dfu_application.zip" to upgrade.

    3. Choose "Confirm Only" option.

    4. Then it will display "Remote error: In Value (3)" on the State.

    5. "READ" the image and there will be two images in the nRF52840DK.

    6. Next, use "Test And Confirm" option to test.

     

    7. After upgrading the image, it will reset the nRF52840DK.

    8. Confirm the new image.

    9. The result is the same as "Confirm Only" option because the new image cannot be confirmed successfully.

    10. "READ" the images again. The nRF52840DK boots from the new image.

    11. "RESET" the nRF52840DK to check if it will boot from the new image next time.

    12. The current image has been inverted to the original image.


    The following results show what we tried using nRF Connect on iOS.

    Scanner On.
    Device Appearance switched from McuMgrDFU to Blinky.
    Scanner Off.
    Connected.
    Discovered Nordic LED and Button Service and SMP Service Services.
    Discovered Characteristics Blinky Button State and Blinky LED State for Service Nordic LED and Button Service.
    Discovered Characteristics SMP Characteristic for Service SMP Service.
    Discovered Client Characteristic Configuration for Characteristic Blinky Button State
    Characteristic Blinky LED State has no Descriptors.
    Discovered Client Characteristic Configuration for Characteristic SMP Characteristic
    Found valid Firmware in file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/dfu_application.zip for Device DFU McuMgr.
    Disconnected.
    Connected.
    Discovered Nordic LED and Button Service and SMP Service Services.
    Discovered Characteristics Blinky Button State and Blinky LED State for Service Nordic LED and Button Service.
    Discovered Characteristics SMP Characteristic for Service SMP Service.
    Discovered Client Characteristic Configuration for Characteristic Blinky Button State
    Characteristic Blinky LED State has no Descriptors.
    Discovered Client Characteristic Configuration for Characteristic SMP Characteristic
    Found valid Firmware in file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/dfu_application.zip for Device DFU McuMgr.
    Peripheral connected
    Device ready
    LIST Command Performed with Success.
    LIST Command Performed with Success.
    Upgrade started with 1 images using 'Confirm Only' mode
    Firmware Upgrade Started.
    State changed from none to requestMcuMgrParameters
    Peripheral connected
    Device ready
    Device capabilities not supported.
    State changed from requestMcuMgrParameters to validate
    Validation response: {"splitStatus" : 0, "images" : {{"slot" : 0, "pending" : false, "permanent" : false, "confirmed" : true, "active" : true, "bootable" : true, "version" : "0.0.0", "hash" : 0x1D63C45713B30610ADEB52EFE14B9C8BD0AB49CFBA02ED694F16AC0296D5D2E5}}}
    State changed from validate to upload
    Insufficient MTU: 249.
    Request (Group: image, seq: 1) failed: Insufficient MTU: 249.)
    MTU set to 249
    No remaining chunks to be sent? chunkOffset: 207616, imageData: 207616.
    No remaining chunks to be sent? chunkOffset: 207616, imageData: 207616.
    Upload finished (1 of 1)
    State changed from upload to confirm
    Confirmation response: {"rc" : In Value (3)}
    Remote error: In Value (3).
    DFU failed: Remote error: In Value (3).
    Found valid Firmware in file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/dfu_application.zip for Device DFU McuMgr.
    Upgrade started with 1 images using 'Confirm Only' mode
    Firmware Upgrade Started.
    State changed from none to requestMcuMgrParameters
    Peripheral connected
    Device ready
    Device capabilities not supported.
    State changed from requestMcuMgrParameters to validate
    Validation response: {"images" : {{"confirmed" : true, "permanent" : false, "pending" : false, "hash" : 0x1D63C45713B30610ADEB52EFE14B9C8BD0AB49CFBA02ED694F16AC0296D5D2E5, "version" : "0.0.0", "slot" : 0, "active" : true, "bootable" : true}, {"version" : "0.0.0", "active" : false, "pending" : false, "bootable" : true, "slot" : 1, "permanent" : false, "hash" : 0x6DFE5CB13BF210F3222C64C57110A08B6A1F467ED4C637C8BF0B02F97F0FD6E3, "confirmed" : false}}, "splitStatus" : 0}
    Image 0 already uploaded
    Nothing to be uploaded
    State changed from validate to upload
    State changed from upload to confirm
    Confirmation response: {"rc" : In Value (3)}
    Remote error: In Value (3).
    DFU failed: Remote error: In Value (3).
    Found valid Firmware in file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/dfu_application.zip for Device DFU McuMgr.
    Upgrade started with 1 images using 'Confirm Only' mode
    Firmware Upgrade Started.
    State changed from none to requestMcuMgrParameters
    Peripheral connected
    Device ready
    Device capabilities not supported.
    State changed from requestMcuMgrParameters to validate
    Validation response: {"splitStatus" : 0, "images" : {{"slot" : 0, "bootable" : true, "confirmed" : true, "hash" : 0x1D63C45713B30610ADEB52EFE14B9C8BD0AB49CFBA02ED694F16AC0296D5D2E5, "pending" : false, "permanent" : false, "active" : true, "version" : "0.0.0"}, {"pending" : false, "hash" : 0x6DFE5CB13BF210F3222C64C57110A08B6A1F467ED4C637C8BF0B02F97F0FD6E3, "confirmed" : false, "active" : false, "slot" : 1, "permanent" : false, "bootable" : true, "version" : "0.0.0"}}}
    Image 0 already uploaded
    Nothing to be uploaded
    State changed from validate to upload
    State changed from upload to confirm
    Confirmation response: {"rc" : In Value (3)}
    Remote error: In Value (3).
    DFU failed: Remote error: In Value (3).
    Found valid Firmware in file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/dfu_application.zip for Device DFU McuMgr.
    Upgrade started with 1 images using 'Confirm Only' mode
    Firmware Upgrade Started.
    State changed from none to requestMcuMgrParameters
    Peripheral connected
    Device ready
    Device capabilities not supported.
    State changed from requestMcuMgrParameters to validate
    Validation response: {"splitStatus" : 0, "images" : {{"active" : true, "version" : "0.0.0", "confirmed" : true, "permanent" : false, "pending" : false, "hash" : 0x1D63C45713B30610ADEB52EFE14B9C8BD0AB49CFBA02ED694F16AC0296D5D2E5, "bootable" : true, "slot" : 0}, {"active" : false, "slot" : 1, "pending" : false, "version" : "0.0.0", "bootable" : true, "confirmed" : false, "permanent" : false, "hash" : 0x6DFE5CB13BF210F3222C64C57110A08B6A1F467ED4C637C8BF0B02F97F0FD6E3}}}
    Image 0 already uploaded
    Nothing to be uploaded
    State changed from validate to upload
    State changed from upload to confirm
    Confirmation response: {"rc" : In Value (3)}
    Remote error: In Value (3).
    DFU failed: Remote error: In Value (3).

    1. Connect to the nRF52840DK in nRF Connect.

    2. The infrmation of the nRF52840DK.

    3. Read the image using "List" option.

    4. In DFU seciton, Select a image name "dfu_application.zip" to upgrade.

    5. The additional information in DFU section.

    6. The upgrade process.

    7. There will be an error window pop up after the process is completed. It displayed "Remote error: In Value (3)".

    Please feel free to let me know if you need anything else.

    Thanks again for your help.

    Best Regards,

    Kevin

Related