Generate a firmware for mcuboot with a small non secure partition and a secure partition

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate a firmware for mcuboot with a small non secure partition and a secure partition

6,219 Views
_arthur_
Contributor II

Hello,

I'm using the frdm_rw612 board for this test. My IDE is vscode with the MCUxpresso plugin. I'm trying to compile my firmware to be "mcuboot ready" meaning I would like to be able to do the OTA with it.

First, I followed this tutorial: https://community.nxp.com/t5/Zephyr-Project-Knowledge-Base/Zephyr-app-with-MCUboot-in-VS-Code/ta-p/2...

It's working as expected. The current partitions organization being what I found in the boards\nxp\frdm_rw612\frdm_rw612_common.dtsi file:

partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			/*
			 * Partition sizes must be aligned
			 * to the flash security sub-region size of 128KB.
			 */
			boot_partition: partition@0 {
				label = "mcuboot";
				reg = <0x00000000 DT_SIZE_K(128)>;
			};
			slot0_partition: partition@20000 {
				label = "image-0";
				reg = <0x00020000 DT_SIZE_K(640)>;
			};
			slot0_ns_partition: partition@C0000 {
				label = "image-0-non-secure";
				reg = <0x000C0000 DT_SIZE_M(3)>;
			};
			slot1_partition: partition@3C0000 {
				label = "image-1";
				reg = <0x003C0000 DT_SIZE_K(640)>;
			};
			slot1_ns_partition: partition@460000 {
				label = "image-1-non-secure";
				reg = <0x00460000 DT_SIZE_M(3)>;
			};
			storage_partition: partition@760000 {
				label = "storage";
				reg = <0x00760000 (DT_SIZE_M(57) - DT_SIZE_K(384))>; 
			};
		};

 

From my understanding, the hello-world example is so small it can fit inside the small (640kB) secure partition.

Unfortunately, when I do the same thing for my current firmware (which has Wifi, Bluetooth etc.) I cannot compile because it says it overloads the partition:

[...]/arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
[...]/arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 1682828 bytes

To sumup:

I can compile and flash mcuboot. I also can correctly flash the hello-world example (I can see from the UART it can correctly load this hello-world app). On the other hand, I cannot compile my "big" firmware.

How can I generate an image with a minimal secure partition that will only jump in the non secure area where my main firmware will be?

I want to keep your current partition structure because I'll use in the future this secure partition.

Thank you,

0 Kudos
Reply
27 Replies

5,687 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_, hope you are doing well.

Could you please confirm your desired partition distribution? Is it a small non-secure partition and a big secure partition, or the other way around? Additionally, could you please also share your application size?

In any case, you should be able to modify your partition sizes with an overlay file, taking care to consider the alignment for each partition size of 128kB.

Best Regards!
0 Kudos
Reply

5,635 Views
_arthur_
Contributor II

Hello Roman,

To be honest, I don't know. Like I said in my first post, I wanted to follow the frdm_rw612 partition distribution because it seems to be the recommended way to do it.

Today I don't use any secure feature because it's still a prototype but soon we will work on the production version and I don't want to make a choice today that will be an issue later.

The FRDM_RW612 has a 640kB secure partition and a 3MB non-secure partition.

My current application size is 2.3MB (no optimization at all).

How can I generate a firmware handling both these partitions?

0 Kudos
Reply

5,592 Views
_arthur_
Contributor II

I read this post: https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/Zephyr-MCUBoot-TFM-Demo-using-RW612/ta-p/20475...

I also downloaded the "psa_protected_storage" sample to better understand the tfm structure but I'm still not sure to understand how you partition the image.

For example, for the psa_protected_storage, which partition is used to store encrypted data? Is it in the "storage_partition"?

In the post I mention above, it mentions a fw_storage partition. I don't have this partition and yet, I'm able to use the Wifi.

Where are the up-to-date documentation? I'm not trying to do something fancy, just use mcuboot to be able to do OTA but I struggle to find the correct documentation to understand how to do it.

Thanks for your help,

Arthur

0 Kudos
Reply

5,581 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_.

If you need to do OTA with MCUboot, I suggest to use the "smp_svr" sample which main purpose is to make firmware updates to use with MCUmgr protocol and allow updates via Bluetooth, UDP, UART, etc. This sample works along MCUboot to check for properly signed binaries and update them into your MCU.

To test the sample  you would need to download an MCUmgr client to make the firmware updates, as well as to build and flash separately MCUboot first, and then build and flash the smp_svr sample with the required macros added to the prj.conf file of the smp_svr sample (this will depend on the OTA transport you wish to use). Once this is done, your system should be ready to communicate properly with your MCUmgr client to check a list of uploaded images and to be able to load a new image.

To load a new valid image for MCUboot, I suggest to add the following configurations to the  prj.conf file of the sample you wish to load:

 CONFIG_HEAP_MEM_POOL_SIZE=2048

The following will allow to generate an MCUboot valid signed image just by building your sample:

CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="<path-to-imported-zephyr-mcuboot-sample>/root-rsa-2048.pem"

CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE=y

CONFIG_BOOTLOADER_MCUBOOT=y

 

Please let me know if this works for you and fits your requirements.

Best Regards!
0 Kudos
Reply

5,548 Views
_arthur_
Contributor II

Hello Roman,

The issue is the same with your sample, as soon as I exceed the flash size of 640kB (your default secure partition size) I get this error when I compile:

region `FLASH' overflowed by 15872 bytes

Add BT and UDP support to this smp_svr sample and you will see the error

So all my previous questions still stands to try to understand and solve my issue:

How can I generate an image with a minimal secure partition that will only jump in the non secure area where my main firmware will be?

How can I generate a firmware handling both these partitions?

When using the psa_protected_storage, where is the encrypted data stored? I would like to use this feature.

Moroever, I'll need to have a custom non-volatile partition for files, is it the current storage_partition from your partition table definition in the common.dtsi?

0 Kudos
Reply

5,470 Views
_arthur_
Contributor II

I made some progress. As a short-term solution I invert slotx_partition with slotx_ns_partition in the frdm_rw612_common.dtsi file and I can compile and use a bigger secure partition.

If I change this in my overlay file, it can compile but mcuboot is not able to jump to the image during runtime. I suppose that when mcuboot is generated, it's not using my overlay file in my current project.

Anyway, I'm not sure to understand the difference between a secure and a non-secure partition. Is there any drawbacks to have my whole firmware in a secure partition?

I'm still wondering how I can add the PSA_protected_storage to this project. Which partition will be used for this feature if I add it?

0 Kudos
Reply

5,442 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_, hope you are doing well.

If you want to re-size your partitions you could do it in an overlay file as you did with the partitions, however you should maintain the structure so MCUboot is able to recognize the images in their destined partitions.

Additionally, please consider that if you wish to use the flash partitioning shared, this is meant to be used with the TF-M stack, which also uses MCUboot as secure bootloader to validate and load images in a secure environment.

For more information about the protected storage, please see the Zephyr reference documentation Secure Storage.

Best Regards!
0 Kudos
Reply

4,985 Views
_arthur_
Contributor II

Dear Roman,

You don't reply to my questions, it's difficult to fully understand.

When you say "however you should maintain the structure", you mean having first the secure and partition and following the non-secure partition?

I'm still wondering how I can add the PSA_protected_storage to this project. Which partition will be used for this feature if I add it?

How can I generate an image with a minimal secure partition that will only jump in the non secure area where my main firmware will be?

How can I generate a firmware handling both these partitions?

0 Kudos
Reply

4,929 Views
RomanVR
NXP Employee
NXP Employee

Dear @_arthur_, I apologize for the generated confusion.

"When you say "however you should maintain the structure", you mean having first the secure and partition and following the non-secure partition?"

Yes, you should maintain the structure of the partitions as is, as well as respect the alignment of the partitions (128kB).

" I'm still wondering how I can add the PSA_protected_storage to this project. Which partition will be used for this feature if I add it?"

As commented before, if you wish to use the PSA protected storage you should use the TF-M stack which uses the partition layout that you are sharing along with MCUboot as a secondary stage bootloader for image validation. Along with TF-M the secure partition is used to save secure keys and also is used for the protected storage as stated in the Trusted Firmware-M Overview.

"How can I generate an image with a minimal secure partition that will only jump in the non secure area where my main firmware will be?"

You could change the partition sizes with an overlay file as long as you comply with the TF-M requirements which can be found at the path "modules/tee/tf-m/trusted-firmware-m/platform/ext/target/".

How can I generate a firmware handling both these partitions?

For detailed information please refer to Trusted Firmware-M documentation and Zephyr documentation as the development would have to be on your own.

Hope this information helps.

Best Regards!
0 Kudos
Reply

4,741 Views
_arthur_
Contributor II

Hello Roman,

Thank you, I better understand now.

Is this link something written by your engineering team? https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/Zephyr-MCUBoot-TFM-Demo-using-RW612/ta-p/20475...

Do I still need to modify the SDK like this? Because I cannot modify the non-secure image like it is described in the "Modify non-secure image" section. The "build" folder does not exist in nxp_zephyr\zephyr\

Moroever, in my frdm_rw612_rw612_ns.dts file, there is a line which delete all the partitions already configured in the frdm_rw612_common.dtsi. It doesn't follow the idea of keeping the partition structure.

Anyway, if I use the non secure board, it doesn't compile because I'm using the storage partition and it doesn't exist anymore with the /delete-node/ line

&w25q512jvfiq {
	/delete-node/ partitions;

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		slot0_ns_partition: partition@080C0000 {
			label = "image-0-non-secure";
			reg = <0x080C0000 DT_SIZE_M(3)>;
		};

		/* This partition is reserved for connectivity firmwares storage
		 * and shouldn't be moved.
		 */
		fw_storage: partition@400000 {
			label = "fw_storage";
			reg = <0x400000 0x280000>;
			read-only;
		};
	};
};

 When you say "the development would have to be on your own", you mean that you don't officialy support TF-M? And that's why we need to modify by hand the SDK?

0 Kudos
Reply

4,730 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_.

Yes, that guide was written by our engineering team meant to be used with Zephyr version 4.0.0, however just as you mention, on further versions (4.2.0 and 4.3.0 as of now) this guide is not needed as BL2 integration (MCUboot as secure bootloader) is included by default in the TFM example shown in the guide. Therefore, on versions 4.2.0 downstream & upstream and 4.3.0 this feature is already supported.

Hope this clears out your doubts.

Best Regards!
0 Kudos
Reply

4,698 Views
_arthur_
Contributor II

Hello Roman,

Ok it helps me to better understand.

I'm able to compile my firmware with the tfm by deleting this in the frdm_rw612_rw612_ns.dts file:

&w25q512jvfiq {
	/delete-node/ partitions;

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		slot0_ns_partition: partition@080C0000 {
			label = "image-0-non-secure";
			reg = <0x080C0000 DT_SIZE_M(3)>;
		};

		/* This partition is reserved for connectivity firmwares storage
		 * and shouldn't be moved.
		 */
		fw_storage: partition@400000 {
			label = "fw_storage";
			reg = <0x400000 0x280000>;
			read-only;
		};
	};
};

I don't understand the goal to delete the partitions node.

Anyway, if I flash the "tfm_merged.hex", I get this output:

[INF] Starting bootloader
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[INF] PSA Crypto init done, sig_type: EC-P256, using builtin keys
[INF] Image index: 1, Swap type: none
[INF] Image index: 0, Swap type: none
[INF] Bootloader chainload address offset: 0x20000
[INF] Image version: v0.0.0
[INF] Jumping to the first image slot
Booting TF-M v2.2.0+g9a6c6f958
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[Sec Thread] Secure image initializing!
[INF][PS] Encryption alg: 0x5500100
[INF][Crypto] Provision entropy seed...
[INF][Crypto] Provision entropy seed... complete.

The bl2 seems to boot correctly but then nothing happens. My non secure firmware doesn't boot.

I tried to flash also the file zephyr_ns_signed.hex but the result is the same.

Am I mistaken when I think that

boot_partition is the partition with the bl2 (mcuboot)
slot0_partition is the partition with tfm (psa)
slot0_ns_partition is the partition with my firmware
 
Do you confirm that this non secure configuration is incompatible with enabling sysbuild to build mcuboot? like explained here: https://community.nxp.com/t5/Zephyr-Project-Knowledge-Base/Zephyr-app-with-MCUboot-in-VS-Code/ta-p/2...
0 Kudos
Reply

4,638 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_.

Could you please share with me the steps that you are following to build and flash your application with TF-M and BL2? Are you using the sysbuild to build MCUboot?

Additionally, the partitions are destined as you mention, the secure partition is meant to host TF-M's secure services and the non-secure partition would be your non-secure application.

Best Regards!
0 Kudos
Reply

3,713 Views
_arthur_
Contributor II

Hello Roman,

Are you able to tell me what am I doing wrong? It's very important for me to find a solution in order to publish a firmware this week.

Thanks for your help

0 Kudos
Reply

3,679 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_, sorry for the delay.

I have tried generating a basic firmware with TF-M with BL2, and it is working properly. I understand why you are deleting the section that you mentioned from the frdm_rw612_rw612_ns.dts file, however this step is required since this overlay is supposed to set the partition structure used by TF-M in the non-secure "version" of the board, deleting it could generate an incompatible structure and your application might not be loading in a known address for MCUboot.

Could you please share with me your generated dts file of your project? Or a screenshot of the partition section of the dts? It should be located in the following path inside the project: debug/zephyr/zephyr.dts

Thanks for your patience.

Best Regards!
0 Kudos
Reply

3,505 Views
_arthur_
Contributor II

Hello Roman,

I'm sorry but I still have the same questions:

1. Do I need to enable sysbuild (and set SB_CONFIG_BOOTLOADER_MCUBOOT="y") or no?

2. Is the content I'm adding into prj.conf correct?

3. What do I need to flash when everything is compiled?

You says that I need to keep the deletion of the partitions node. Then, here is my issues in this scenario:

In my current firmware, I'm using the storage_partition defined in the common.dtsi. When I use the non secure configuration, because you delete all partitions, the storage_partition is not defined anymore, so my code cannot compile. 4. How can I use the storage_partition in this non-secure configuration?

You explicitely said that I must keep the same partition structure defined in the common.dtsi. 5. Therefore, why is fw_storage partition located at 0x400000? It's located into the slot1_partition if I look into the common.dtsi structure.

6. Anyway, what is this fw_storage partition? Why isn't it in the "standard" secure configuration?

I know you don't have much time, please reply to my 6 questions, it will help me to better understand and be autonomous.

If you can share a step by step TF-M with BL2 example to compile and flash a standard firmware using the storage_partition and Wifi/BLE connectivity it would be perfect. Thank you

PS: I didn't share my partition section of the DTS because it doesn't make sense in the current state.

0 Kudos
Reply

3,335 Views
_arthur_
Contributor II

Hello Roman,

I must publish a firmware tomorrow, can I expect a reply? Or it's not ready on your side yet and I need to find a plan B?

Thanks for your help,

Arthur

0 Kudos
Reply

3,318 Views
RomanVR
NXP Employee
NXP Employee

Hello @_arthur_.

Do I need to enable sysbuild (and set SB_CONFIG_BOOTLOADER_MCUBOOT="y") or no?
No, you do not need to use sysbuild since TF-M build system includes MCUboot by default.
 
Is the content I'm adding into prj.conf correct?
Yes, as an observation, the "CONFIG_BUILD_WITH_TFM" is set by default when creating a project for the non-secure version of the board.
 
What do I need to flash when everything is compiled?
It depends, in the screenshot from the TF-M Build System Zephyr documentation, is a detailed explanation on what is the utility of each generated file:
 

RomanVR_0-1766013775436.png

However, consider that for a first-use occasion, you should flash the tfm_merged.hex file which contains a merge of the MCUboot bootloader, TF-M Secure image and your non-secure application.
 
How can I use the storage partition in this non-secure configuration?
It is expected that the user would use the secure storage service provided by TF-M, since the flash layout of the TF-M configuration reserves a space for this storage.
 
Anyway, what is this fw_storage?
The fw_storage partition is reserved for Wi-Fi, BLE and 802.15.4 firmwares storage.


Hope this information helps on your development. Thank you for your patience.

 

Best Regards!
0 Kudos
Reply

3,257 Views
_arthur_
Contributor II

Hello Roman,

Thanks for your feedback. You didn't reply to the question about the partition structure

5. Therefore, why is fw_storage partition located at 0x400000? It's located into the slot1_partition if I look into the common.dtsi structure.

1. This fw_storage seems important, why is it never mentioned in the "secure" configuration?

2. Do I need to do anything special to populate this partition with the necessary firmwares?

0 Kudos
Reply

3,245 Views
_arthur_
Contributor II

Hello Roman,

I tried to compile and flash (tfm_merged.hex) for basic sample. If I use the zephyr/samples/hello_world I get that:

[INF] Starting bootloader
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[INF] PSA Crypto init done, sig_type: EC-P256, using builtin keys
[INF] Image index: 1, Swap type: none
[INF] Image index: 0, Swap type: none
[INF] Bootloader chainload address offset: 0x20000
[INF] Image version: v0.0.0
[INF] Jumping to the first image slot
Booting TF-M v2.2.0+g9a6c6f958
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[Sec Thread] Secure image initializing!
[INF][PS] Encryption alg: 0x5500100
[INF][Crypto] Provision entropy seed...
[INF][Crypto] Provision entropy seed... complete.
*** Booting Zephyr OS build nxp-v4.1.0-23883-g5fbcfde7cfc2 ***
Hello World! frdm_rw612/rw612/ns

So everything seems to work as expected.

However, if I use an example which uses WiFi like the zephyr/samples/net/wifi/shell then I get the same output as my firmware (which is using WiFi and BLE):

[INF] Starting bootloader
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[INF] PSA Crypto init done, sig_type: EC-P256, using builtin keys
[INF] Image index: 1, Swap type: none
[INF] Image index: 0, Swap type: none
[INF] Bootloader chainload address offset: 0x20000
[INF] Image version: v0.0.0
[INF] Jumping to the first image slot
Booting TF-M v2.2.0+g9a6c6f958
[WRN] This device was provisioned with dummy keys. This device is NOT SECURE
[Sec Thread] Secure image initializing!
[INF][PS] Encryption alg: 0x5500100
[INF][Crypto] Provision entropy seed...
[INF][Crypto] Provision entropy seed... complete.

So the root cause of the issue comes from the Wifi and may be linked to my questions about the firmware partition. Can you please share steps to compile an example with Wifi and tf-m?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2199133%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGenerate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199133%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20using%20the%20frdm_rw612%20board%20for%20this%20test.%20My%20IDE%20is%20vscode%20with%20the%20MCUxpresso%20plugin.%20I'm%20trying%20to%20compile%20my%20firmware%20to%20be%20%22mcuboot%20ready%22%20meaning%20I%20would%20like%20to%20be%20able%20to%20do%20the%20OTA%20with%20it.%3C%2FP%3E%3CP%3EFirst%2C%20I%20followed%20this%20tutorial%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FZephyr-Project-Knowledge-Base%2FZephyr-app-with-MCUboot-in-VS-Code%2Fta-p%2F2089541%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FZephyr-Project-Knowledge-Base%2FZephyr-app-with-MCUboot-in-VS-Code%2Fta-p%2F2089541%3C%2FA%3E%3C%2FP%3E%3CP%3EIt's%20working%20as%20expected.%20The%20current%20partitions%20organization%20being%20what%20I%20found%20in%20the%26nbsp%3Bboards%5Cnxp%5Cfrdm_rw612%5Cfrdm_rw612_common.dtsi%20file%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Epartitions%20%7B%0A%09%09%09compatible%20%3D%20%22fixed-partitions%22%3B%0A%09%09%09%23address-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%09%09%23size-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%0A%09%09%09%2F*%0A%09%09%09%20*%20Partition%20sizes%20must%20be%20aligned%0A%09%09%09%20*%20to%20the%20flash%20security%20sub-region%20size%20of%20128KB.%0A%09%09%09%20*%2F%0A%09%09%09boot_partition%3A%20partition%400%20%7B%0A%09%09%09%09label%20%3D%20%22mcuboot%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x00000000%20DT_SIZE_K(128)%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%09slot0_partition%3A%20partition%4020000%20%7B%0A%09%09%09%09label%20%3D%20%22image-0%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x00020000%20DT_SIZE_K(640)%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%09slot0_ns_partition%3A%20partition%40C0000%20%7B%0A%09%09%09%09label%20%3D%20%22image-0-non-secure%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x000C0000%20DT_SIZE_M(3)%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%09slot1_partition%3A%20partition%403C0000%20%7B%0A%09%09%09%09label%20%3D%20%22image-1%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x003C0000%20DT_SIZE_K(640)%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%09slot1_ns_partition%3A%20partition%40460000%20%7B%0A%09%09%09%09label%20%3D%20%22image-1-non-secure%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x00460000%20DT_SIZE_M(3)%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%09storage_partition%3A%20partition%40760000%20%7B%0A%09%09%09%09label%20%3D%20%22storage%22%3B%0A%09%09%09%09reg%20%3D%20%26lt%3B0x00760000%20(DT_SIZE_M(57)%20-%20DT_SIZE_K(384))%26gt%3B%3B%20%0A%09%09%09%7D%3B%0A%09%09%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EFrom%20my%20understanding%2C%20the%20hello-world%20example%20is%20so%20small%20it%20can%20fit%20inside%20the%20small%20(640kB)%20secure%20partition.%3C%2FP%3E%3CP%3EUnfortunately%2C%20when%20I%20do%20the%20same%20thing%20for%20my%20current%20firmware%20(which%20has%20Wifi%2C%20Bluetooth%20etc.)%20I%20cannot%20compile%20because%20it%20says%20it%20overloads%20the%20partition%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5B...%5D%2Farm-zephyr-eabi%2Fbin%2Fld.bfd.exe%3A%20zephyr%5Czephyr_pre0.elf%20section%20%60rodata'%20will%20not%20fit%20in%20region%20%60FLASH'%0A%5B...%5D%2Farm-zephyr-eabi%2Fbin%2Fld.bfd.exe%3A%20region%20%60FLASH'%20overflowed%20by%201682828%20bytes%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ETo%20sumup%3A%3C%2FP%3E%3CP%3EI%20can%20compile%20and%20flash%20mcuboot.%20I%20also%20can%20correctly%20flash%20the%20hello-world%20example%20(I%20can%20see%20from%20the%20UART%20it%20can%20correctly%20load%20this%20hello-world%20app).%20On%20the%20other%20hand%2C%20I%20cannot%20compile%20my%20%22big%22%20firmware.%3C%2FP%3E%3CP%3EHow%20can%20I%20generate%20an%20image%20with%20a%20minimal%20secure%20partition%20that%20will%20only%20jump%20in%20the%20non%20secure%20area%20where%20my%20main%20firmware%20will%20be%3F%3C%2FP%3E%3CP%3EI%20want%20to%20keep%20your%20current%20partition%20structure%20because%20I'll%20use%20in%20the%20future%20this%20secure%20partition.%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204694%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204694%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E%2C%26nbsp%3Bhope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20re-size%20your%20partitions%20you%20could%20do%20it%20in%20an%20overlay%20file%20as%20you%20did%20with%20the%20partitions%2C%20however%20you%20should%20maintain%20the%20structure%20so%20MCUboot%20is%20able%20to%20recognize%20the%20images%20in%20their%20destined%20partitions.%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20please%20consider%20that%20if%20you%20wish%20to%20use%20the%20flash%20partitioning%20shared%2C%20this%20is%20meant%20to%20be%20used%20with%20the%20TF-M%20stack%2C%20which%20also%20uses%20MCUboot%20as%20secure%20bootloader%20to%20validate%20and%20load%20images%20in%20a%20secure%20environment.%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20about%20the%20protected%20storage%2C%20please%20see%20the%20Zephyr%20reference%20documentation%20%3CA%20href%3D%22https%3A%2F%2Fdocs.zephyrproject.org%2Flatest%2Fservices%2Fstorage%2Fsecure_storage%2Findex.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ESecure%20Storage%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204542%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204542%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20made%20some%20progress.%20As%20a%20short-term%20solution%20I%20invert%26nbsp%3Bslotx_partition%20with%20slotx_ns_partition%20in%20the%20frdm_rw612_common.dtsi%20file%20and%20I%20can%20compile%20and%20use%20a%20bigger%20secure%20partition.%3C%2FP%3E%3CP%3EIf%20I%20change%20this%20in%20my%20overlay%20file%2C%20it%20can%20compile%20but%20mcuboot%20is%20not%20able%20to%20jump%20to%20the%20image%20during%20runtime.%20I%20suppose%20that%20when%20mcuboot%20is%20generated%2C%20it's%20not%20using%20my%20overlay%20file%20in%20my%20current%20project.%3C%2FP%3E%3CP%3EAnyway%2C%20I'm%20not%20sure%20to%20understand%20the%20difference%20between%20a%20secure%20and%20a%20non-secure%20partition.%20Is%20there%20any%20drawbacks%20to%20have%20my%20whole%20firmware%20in%20a%20secure%20partition%3F%3C%2FP%3E%3CP%3EI'm%20still%20wondering%20how%20I%20can%20add%20the%20PSA_protected_storage%20to%20this%20project.%20Which%20partition%20will%20be%20used%20for%20this%20feature%20if%20I%20add%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EThe%20issue%20is%20the%20same%20with%20your%20sample%2C%20as%20soon%20as%20I%20exceed%20the%20flash%20size%20of%20640kB%20(your%20default%20secure%20partition%20size)%20I%20get%20this%20error%20when%20I%20compile%3A%3C%2FP%3E%3CP%3Eregion%20%60FLASH'%20overflowed%20by%2015872%20bytes%3C%2FP%3E%3CP%3EAdd%20BT%20and%20UDP%20support%20to%20this%20smp_svr%20sample%20and%20you%20will%20see%20the%20error%3C%2FP%3E%3CP%3ESo%20all%20my%20previous%20questions%20still%20stands%20to%20try%20to%20understand%20and%20solve%20my%20issue%3A%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20can%20I%20generate%20an%20image%20with%20a%20minimal%20secure%20partition%20that%20will%20only%20jump%20in%20the%20non%20secure%20area%20where%20my%20main%20firmware%20will%20be%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20can%20I%20generate%20a%20firmware%20handling%20both%20these%20partitions%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhen%20using%20the%20psa_protected_storage%2C%20where%20is%20the%20encrypted%20data%20stored%3F%20I%20would%20like%20to%20use%20this%20feature.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMoroever%2C%20I'll%20need%20to%20have%20a%20custom%20non-volatile%20partition%20for%20files%2C%20is%20it%20the%20current%20storage_partition%20from%20your%20partition%20table%20definition%20in%20the%20common.dtsi%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EIf%20you%20need%20to%20do%20OTA%20with%20MCUboot%2C%20I%20suggest%20to%20use%20the%20%22smp_svr%22%20sample%20which%20main%20purpose%20is%20to%20make%20firmware%20updates%20to%20use%20with%20MCUmgr%20protocol%20and%20allow%20updates%20via%20Bluetooth%2C%20UDP%2C%20UART%2C%20etc.%20This%20sample%20works%20along%20MCUboot%20to%20check%20for%20properly%20signed%20binaries%20and%20update%20them%20into%20your%20MCU.%3C%2FP%3E%0A%3CP%3ETo%20test%20the%20sample%26nbsp%3B%20you%20would%20need%20to%20download%20an%20MCUmgr%20client%20to%20make%20the%20firmware%20updates%2C%20as%20well%20as%20to%20build%20and%20flash%20separately%20MCUboot%20first%2C%20and%20then%20build%20and%20flash%20the%20smp_svr%20sample%20with%20the%20required%20macros%20added%20to%20the%20prj.conf%20file%20of%20the%20smp_svr%20sample%20(this%20will%20depend%20on%20the%20OTA%20transport%20you%20wish%20to%20use).%20Once%20this%20is%20done%2C%20your%20system%20should%20be%20ready%20to%20communicate%20properly%20with%20your%20MCUmgr%20client%20to%20check%20a%20list%20of%20uploaded%20images%20and%20to%20be%20able%20to%20load%20a%20new%20image.%3C%2FP%3E%0A%3CP%3ETo%20load%20a%20new%20valid%20image%20for%20MCUboot%2C%20I%20suggest%20to%20add%20the%20following%20configurations%20to%20the%26nbsp%3B%20prj.conf%20file%20of%20the%20sample%20you%20wish%20to%20load%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3BCONFIG_HEAP_MEM_POOL_SIZE%3D2048%3C%2FP%3E%0A%3CP%3EThe%20following%20will%20allow%20to%20generate%20an%20MCUboot%20valid%20signed%20image%20just%20by%20building%20your%20sample%3A%3C%2FP%3E%0A%3CP%3ECONFIG_MCUBOOT_SIGNATURE_KEY_FILE%3D%22%3CPATH-TO-IMPORTED-ZEPHYR-MCUBOOT-SAMPLE%3E%2Froot-rsa-2048.pem%22%3C%2FPATH-TO-IMPORTED-ZEPHYR-MCUBOOT-SAMPLE%3E%3C%2FP%3E%0A%3CP%3ECONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE%3Dy%3C%2FP%3E%0A%3CP%3ECONFIG_BOOTLOADER_MCUBOOT%3Dy%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPlease%20let%20me%20know%20if%20this%20works%20for%20you%20and%20fits%20your%20requirements.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202785%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202785%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20read%20this%20post%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FWi-Fi-Bluetooth-802-15-4%2FZephyr-MCUBoot-TFM-Demo-using-RW612%2Fta-p%2F2047528%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FWi-Fi-Bluetooth-802-15-4%2FZephyr-MCUBoot-TFM-Demo-using-RW612%2Fta-p%2F2047528%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20also%20downloaded%20the%20%22psa_protected_storage%22%20sample%20to%20better%20understand%20the%20tfm%20structure%20but%20I'm%20still%20not%20sure%20to%20understand%20how%20you%20partition%20the%20image.%3C%2FP%3E%3CP%3EFor%20example%2C%20for%20the%20psa_protected_storage%2C%20which%20partition%20is%20used%20to%20store%20encrypted%20data%3F%20Is%20it%20in%20the%20%22storage_partition%22%3F%3C%2FP%3E%3CP%3EIn%20the%20post%20I%20mention%20above%2C%20it%20mentions%20a%20fw_storage%20partition.%20I%20don't%20have%20this%20partition%20and%20yet%2C%20I'm%20able%20to%20use%20the%20Wifi.%3C%2FP%3E%3CP%3EWhere%20are%20the%20up-to-date%20documentation%3F%20I'm%20not%20trying%20to%20do%20something%20fancy%2C%20just%20use%20mcuboot%20to%20be%20able%20to%20do%20OTA%20but%20I%20struggle%20to%20find%20the%20correct%20documentation%20to%20understand%20how%20to%20do%20it.%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%2C%3C%2FP%3E%3CP%3EArthur%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2201782%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201782%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3ETo%20be%20honest%2C%20I%20don't%20know.%20Like%20I%20said%20in%20my%20first%20post%2C%20I%20wanted%20to%20follow%20the%20frdm_rw612%20partition%20distribution%20because%20it%20seems%20to%20be%20the%20recommended%20way%20to%20do%20it.%3C%2FP%3E%3CP%3EToday%20I%20don't%20use%20any%20secure%20feature%20because%20it's%20still%20a%20prototype%20but%20soon%20we%20will%20work%20on%20the%20production%20version%20and%20I%20don't%20want%20to%20make%20a%20choice%20today%20that%20will%20be%20an%20issue%20later.%3C%2FP%3E%3CP%3EThe%20FRDM_RW612%20has%20a%20640kB%20secure%20partition%20and%20a%203MB%20non-secure%20partition.%3C%2FP%3E%3CP%3EMy%20current%20application%20size%20is%202.3MB%20(no%20optimization%20at%20all).%3C%2FP%3E%3CP%3EHow%20can%20I%20generate%20a%20firmware%20handling%20both%20these%20partitions%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E%2C%20hope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20confirm%20your%20desired%20partition%20distribution%3F%20Is%20it%20a%20small%20non-secure%20partition%20and%20a%20big%20secure%20partition%2C%20or%20the%20other%20way%20around%3F%20Additionally%2C%20could%20you%20please%20also%20share%20your%20application%20size%3F%3C%2FP%3E%0A%3CP%3EIn%20any%20case%2C%20you%20should%20be%20able%20to%20modify%20your%20partition%20sizes%20with%20an%20overlay%20file%2C%20taking%20care%20to%20consider%20the%20alignment%20for%20each%20partition%20size%20of%20128kB.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2249343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2249343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20Roman%2C%3C%2FP%3E%3CP%3EYou%20don't%20reply%20to%20my%20questions%2C%20it's%20difficult%20to%20fully%20understand.%3C%2FP%3E%3CP%3EWhen%20you%20say%20%22%3CSPAN%3Ehowever%20you%20should%20maintain%20the%20structure%3C%2FSPAN%3E%22%2C%20you%20mean%20having%20first%20the%20secure%20and%20partition%20and%20following%20the%20non-secure%20partition%3F%3C%2FP%3E%3CP%3E%3CSPAN%3EI'm%20still%20wondering%20how%20I%20can%20add%20the%20PSA_protected_storage%20to%20this%20project.%20Which%20partition%20will%20be%20used%20for%20this%20feature%20if%20I%20add%20it%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20can%20I%20generate%20an%20image%20with%20a%20minimal%20secure%20partition%20that%20will%20only%20jump%20in%20the%20non%20secure%20area%20where%20my%20main%20firmware%20will%20be%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHow%20can%20I%20generate%20a%20firmware%20handling%20both%20these%20partitions%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2254341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EThank%20you%2C%20I%20better%20understand%20now.%3C%2FP%3E%3CP%3EIs%20this%20link%20something%20written%20by%20your%20engineering%20team%3F%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FWi-Fi-Bluetooth-802-15-4%2FZephyr-MCUBoot-TFM-Demo-using-RW612%2Fta-p%2F2047528%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FWi-Fi-Bluetooth-802-15-4%2FZephyr-MCUBoot-TFM-Demo-using-RW612%2Fta-p%2F2047528%3C%2FA%3E%3C%2FP%3E%3CP%3EDo%20I%20still%20need%20to%20modify%20the%20SDK%20like%20this%3F%20Because%20I%20cannot%20modify%20the%20non-secure%20image%20like%20it%20is%20described%20in%20the%20%22Modify%20non-secure%20image%22%20section.%20The%20%22build%22%20folder%20does%20not%20exist%20in%20nxp_zephyr%5Czephyr%5C%3C%2FP%3E%3CP%3EMoroever%2C%20in%20my%26nbsp%3Bfrdm_rw612_rw612_ns.dts%20file%2C%20there%20is%20a%20line%20which%20delete%20all%20the%20partitions%20already%20configured%20in%20the%20frdm_rw612_common.dtsi.%20It%20doesn't%20follow%20the%20idea%20of%20keeping%20the%20partition%20structure.%3C%2FP%3E%3CP%3EAnyway%2C%20if%20I%20use%20the%20non%20secure%20board%2C%20it%20doesn't%20compile%20because%20I'm%20using%20the%20storage%20partition%20and%20it%20doesn't%20exist%20anymore%20with%20the%20%2Fdelete-node%2F%20line%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bw25q512jvfiq%20%7B%0A%09%2Fdelete-node%2F%20partitions%3B%0A%0A%09partitions%20%7B%0A%09%09compatible%20%3D%20%22fixed-partitions%22%3B%0A%09%09%23address-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%09%23size-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%0A%09%09slot0_ns_partition%3A%20partition%40080C0000%20%7B%0A%09%09%09label%20%3D%20%22image-0-non-secure%22%3B%0A%09%09%09reg%20%3D%20%26lt%3B0x080C0000%20DT_SIZE_M(3)%26gt%3B%3B%0A%09%09%7D%3B%0A%0A%09%09%2F*%20This%20partition%20is%20reserved%20for%20connectivity%20firmwares%20storage%0A%09%09%20*%20and%20shouldn't%20be%20moved.%0A%09%09%20*%2F%0A%09%09fw_storage%3A%20partition%40400000%20%7B%0A%09%09%09label%20%3D%20%22fw_storage%22%3B%0A%09%09%09reg%20%3D%20%26lt%3B0x400000%200x280000%26gt%3B%3B%0A%09%09%09read-only%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BWhen%20you%20say%20%22the%20development%20would%20have%20to%20be%20on%20your%20own%22%2C%20you%20mean%20that%20you%20don't%20officialy%20support%20TF-M%3F%20And%20that's%20why%20we%20need%20to%20modify%20by%20hand%20the%20SDK%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2254408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EYes%2C%20that%20guide%20was%20written%20by%20our%20engineering%20team%20meant%20to%20be%20used%20with%20Zephyr%20version%204.0.0%2C%20however%20just%20as%20you%20mention%2C%20on%20further%20versions%20(4.2.0%20and%204.3.0%20as%20of%20now)%20this%20guide%20is%20not%20needed%20as%20BL2%20integration%20(MCUboot%20as%20secure%20bootloader)%20is%20included%20by%20default%20in%20the%20TFM%20example%20shown%20in%20the%20guide.%20Therefore%2C%20on%20versions%204.2.0%20downstream%20%26amp%3B%20upstream%20and%204.3.0%20this%20feature%20is%20already%20supported.%3C%2FP%3E%0A%3CP%3EHope%20this%20clears%20out%20your%20doubts.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2255214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2255214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EOk%20it%20helps%20me%20to%20better%20understand.%3C%2FP%3E%3CP%3EI'm%20able%20to%20compile%20my%20firmware%20with%20the%20tfm%20by%20deleting%20this%20in%20the%20frdm_rw612_rw612_ns.dts%20file%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bw25q512jvfiq%20%7B%0A%09%2Fdelete-node%2F%20partitions%3B%0A%0A%09partitions%20%7B%0A%09%09compatible%20%3D%20%22fixed-partitions%22%3B%0A%09%09%23address-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%09%23size-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%0A%09%09slot0_ns_partition%3A%20partition%40080C0000%20%7B%0A%09%09%09label%20%3D%20%22image-0-non-secure%22%3B%0A%09%09%09reg%20%3D%20%26lt%3B0x080C0000%20DT_SIZE_M(3)%26gt%3B%3B%0A%09%09%7D%3B%0A%0A%09%09%2F*%20This%20partition%20is%20reserved%20for%20connectivity%20firmwares%20storage%0A%09%09%20*%20and%20shouldn't%20be%20moved.%0A%09%09%20*%2F%0A%09%09fw_storage%3A%20partition%40400000%20%7B%0A%09%09%09label%20%3D%20%22fw_storage%22%3B%0A%09%09%09reg%20%3D%20%26lt%3B0x400000%200x280000%26gt%3B%3B%0A%09%09%09read-only%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20don't%20understand%20the%20goal%20to%20delete%20the%20partitions%20node.%3C%2FP%3E%3CP%3EAnyway%2C%20if%20I%20flash%20the%20%22tfm_merged.hex%22%2C%20I%20get%20this%20output%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5BINF%5D%20Starting%20bootloader%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BINF%5D%20PSA%20Crypto%20init%20done%2C%20sig_type%3A%20EC-P256%2C%20using%20builtin%20keys%0A%5BINF%5D%20Image%20index%3A%201%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Image%20index%3A%200%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Bootloader%20chainload%20address%20offset%3A%200x20000%0A%5BINF%5D%20Image%20version%3A%20v0.0.0%0A%5BINF%5D%20Jumping%20to%20the%20first%20image%20slot%0ABooting%20TF-M%20v2.2.0%2Bg9a6c6f958%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BSec%20Thread%5D%20Secure%20image%20initializing!%0A%5BINF%5D%5BPS%5D%20Encryption%20alg%3A%200x5500100%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%20complete.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20bl2%20seems%20to%20boot%20correctly%20but%20then%20nothing%20happens.%20My%20non%20secure%20firmware%20doesn't%20boot.%3C%2FP%3E%3CP%3EI%20tried%20to%20flash%20also%20the%20file%20zephyr_ns_signed.hex%20but%20the%20result%20is%20the%20same.%3C%2FP%3E%3CP%3EAm%20I%20mistaken%20when%20I%20think%20that%3C%2FP%3E%3CDIV%3Eboot_partition%20is%20the%20partition%20with%20the%20bl2%20(mcuboot)%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eslot0_partition%20is%20the%20partition%20with%20tfm%20(psa)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eslot0_ns_partition%20is%20the%20partition%20with%20my%20firmware%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EDo%20you%20confirm%20that%20this%20non%20secure%20configuration%20is%20incompatible%20with%20enabling%20sysbuild%20to%20build%20mcuboot%3F%20like%20explained%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FZephyr-Project-Knowledge-Base%2FZephyr-app-with-MCUboot-in-VS-Code%2Fta-p%2F2089541%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FZephyr-Project-Knowledge-Base%2FZephyr-app-with-MCUboot-in-VS-Code%2Fta-p%2F2089541%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2256276%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2256276%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20share%20with%20me%20the%20steps%20that%20you%20are%20following%20to%20build%20and%20flash%20your%20application%20with%20TF-M%20and%20BL2%3F%20Are%20you%20using%20the%20sysbuild%20to%20build%20MCUboot%3F%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20the%20partitions%20are%20destined%20as%20you%20mention%2C%20the%20secure%20partition%20is%20meant%20to%20host%20TF-M's%20secure%20services%20and%20the%20non-secure%20partition%20would%20be%20your%20non-secure%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2259536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWith%20sysbuild%3A%3C%2FP%3E%3COL%3E%3CLI%3EOn%20the%20project%20modified%20for%20tfm%2C%20I%20enable%20sysbuild%20then%20I%20add%20this%20Cmake%20Extra%20Args%26nbsp%3BSB_CONFIG_BOOTLOADER_MCUBOOT%3D'y'%26nbsp%3B%3C%2FLI%3E%3CLI%3EI%20do%20a%20%22pristine%20build%22%20then%20it%20compiles%20a%20lot%20of%20different%20things%3C%2FLI%3E%3CLI%3EI%20get%20this%20message%20at%20the%20end%3C%2FLI%3E%3C%2FOL%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eimage.py%3A%20sign%20the%20payload%0Aimage.py%3A%20sign%20the%20payload%0AUsage%3A%20imgtool.py%20sign%20%5BOPTIONS%5D%20INFILE%20OUTFILE%0ATry%20'imgtool.py%20sign%20-h'%20for%20help.%0A%0AError%3A%20Image%20size%20(0x1ed91c)%20%2B%20trailer%20(0x1b0)%20exceeds%20requested%20size%200xa0000%0Aimage.py%3A%20sign%20the%20payload%0ABatch%20file%20failed%20at%20line%2012%20with%20errorcode%202%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2259530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259530%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EUsing%20sysbuild%20is%20even%20worse.%20This%20is%20what%20I%20do%20from%20my%20current%20project%20(with%20plenty%20of%20features%20already%20implemented%20like%20Wifi%2C%20Bluetooth%2C%20Ethernet)%20created%20from%20a%20hello_world%20example%20(meaning%20it%20doesn't%20use%20nor%20mcuboot%20nor%20the%20partitioning).%3C%2FP%3E%3COL%3E%3CLI%3EIn%20my%20debug%20configuration%2C%20I%20change%20the%20board%20from%20frdm_rw612%20to%20frdm_rw612%2Frw612%2Fns.%20And%20I%20explicitely%20set%26nbsp%3BDTC_OVERLAY_FILE%3D'boards%2Ffrdm_rw612.overlay'%26nbsp%3B%20(to%20keep%20the%20same%20overlay%20file%20I'm%20using%20in%20my%20current%20project)%3C%2FLI%3E%3CLI%3EI%20add%20the%20content%20below%26nbsp%3Bin%20my%20prj.conf%3C%2FLI%3E%3CLI%3EI%20delete%20in%20the%26nbsp%3B%3CSPAN%3Efrdm_rw612_rw612_ns.dts%20file%20what%20I%20told%20you%20in%20my%20previous%20message%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3ERight-click%20on%20my%20project%20then%20%22flash%20the%20selected%20target%22%20and%20I%20select%20the%20tfm_merged.hex%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%3EWhat%20I%20add%20in%20my%20prj.conf%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ECONFIG_BUILD_WITH_TFM%3Dy%0A%0ACONFIG_WIFI_NXP%3Dy%0ACONFIG_NXP_RW610%3Dy%0ACONFIG_ETH_DRIVER%3Dy%0A%0A%23%20stack%20size%0ACONFIG_SHELL_STACK_SIZE%3D6144%0ACONFIG_SYSTEM_WORKQUEUE_STACK_SIZE%3D2048%0ACONFIG_NET_MGMT_EVENT_STACK_SIZE%3D4608%0ACONFIG_NET_TCP_WORKQ_STACK_SIZE%3D2048%0ACONFIG_MAIN_STACK_SIZE%3D4096%0ACONFIG_IDLE_STACK_SIZE%3D1024%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EWhat%20I%20get%20in%20my%20console%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5BINF%5D%20Starting%20bootloader%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BINF%5D%20PSA%20Crypto%20init%20done%2C%20sig_type%3A%20EC-P256%2C%20using%20builtin%20keys%0A%5BINF%5D%20Image%20index%3A%201%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Image%20index%3A%200%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Bootloader%20chainload%20address%20offset%3A%200x20000%0A%5BINF%5D%20Image%20version%3A%20v0.0.0%0A%5BINF%5D%20Jumping%20to%20the%20first%20image%20slot%0ABooting%20TF-M%20v2.2.0%2Bg9a6c6f958%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BSec%20Thread%5D%20Secure%20image%20initializing!%0A%5BINF%5D%5BPS%5D%20Encryption%20alg%3A%200x5500100%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%20complete.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20didn't%20enable%20sysbuild%20because%2C%20based%20on%20the%20output%20I%20get%2C%20I%20already%20have%20a%20bootloader.%3C%2FP%3E%3CP%3ECan%20you%20please%20tell%20me%20what%20am%20I%20doing%20wrong%3F%3C%2FP%3E%3CP%3EThank%20you%20!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263046%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263046%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EAre%20you%20able%20to%20tell%20me%20what%20am%20I%20doing%20wrong%3F%20It's%20very%20important%20for%20me%20to%20find%20a%20solution%20in%20order%20to%20publish%20a%20firmware%20this%20week.%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E%2C%20sorry%20for%20the%20delay.%3C%2FP%3E%0A%3CP%3EI%20have%20tried%20generating%20a%20basic%20firmware%20with%20TF-M%20with%20BL2%2C%20and%20it%20is%20working%20properly.%20I%20understand%20why%20you%20are%20deleting%20the%20section%20that%20you%20mentioned%20from%20the%20frdm_rw612_rw612_ns.dts%20file%2C%20however%20this%20step%20is%20required%20since%20this%20overlay%20is%20supposed%20to%20set%20the%20partition%20structure%20used%20by%20TF-M%20in%20the%20non-secure%20%22version%22%20of%20the%20board%2C%20deleting%20it%20could%20generate%20an%20incompatible%20structure%20and%20your%20application%20might%20not%20be%20loading%20in%20a%20known%20address%20for%20MCUboot.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20share%20with%20me%20your%20generated%20dts%20file%20of%20your%20project%3F%20Or%20a%20screenshot%20of%20the%20partition%20section%20of%20the%20dts%3F%20It%20should%20be%20located%20in%20the%20following%20path%20inside%20the%20project%3A%20debug%2Fzephyr%2Fzephyr.dts%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20patience.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264034%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264034%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EI'm%20sorry%20but%20I%20still%20have%20the%20same%20questions%3A%3C%2FP%3E%3CP%3E1.%20Do%20I%20need%20to%20enable%20sysbuild%20(and%20set%26nbsp%3BSB_CONFIG_BOOTLOADER_MCUBOOT%3D%22y%22)%20or%20no%3F%3C%2FP%3E%3CP%3E2.%20Is%20the%20content%20I'm%20adding%20into%20prj.conf%20correct%3F%3C%2FP%3E%3CP%3E3.%20What%20do%20I%20need%20to%20flash%20when%20everything%20is%20compiled%3F%3C%2FP%3E%3CP%3EYou%20says%20that%20I%20need%20to%20keep%20the%20deletion%20of%20the%20partitions%20node.%20Then%2C%20here%20is%20my%20issues%20in%20this%20scenario%3A%3C%2FP%3E%3CP%3EIn%20my%20current%20firmware%2C%20I'm%20using%20the%20storage_partition%20defined%20in%20the%20common.dtsi.%20When%20I%20use%20the%20non%20secure%20configuration%2C%20because%20you%20delete%20all%20partitions%2C%20the%20storage_partition%20is%20not%20defined%20anymore%2C%20so%20my%20code%20cannot%20compile.%204.%20How%20can%20I%20use%20the%20storage_partition%20in%20this%20non-secure%20configuration%3F%3C%2FP%3E%3CP%3EYou%20explicitely%20said%20that%20I%20must%20keep%20the%20same%20partition%20structure%20defined%20in%20the%20common.dtsi.%205.%20Therefore%2C%20why%20is%20fw_storage%20partition%20located%20at%200x400000%3F%20It's%20located%20into%20the%26nbsp%3Bslot1_partition%20if%20I%20look%20into%20the%20common.dtsi%20structure.%3C%2FP%3E%3CP%3E6.%20Anyway%2C%20what%20is%20this%20fw_storage%20partition%3F%20Why%20isn't%20it%20in%20the%20%22standard%22%20secure%20configuration%3F%3C%2FP%3E%3CP%3EI%20know%20you%20don't%20have%20much%20time%2C%20please%20reply%20to%20my%206%20questions%2C%20it%20will%20help%20me%20to%20better%20understand%20and%20be%20autonomous.%3C%2FP%3E%3CP%3EIf%20you%20can%20share%20a%20step%20by%20step%20TF-M%20with%20BL2%20example%20to%20compile%20and%20flash%20a%20standard%20firmware%20using%20the%20storage_partition%20and%20Wifi%2FBLE%20connectivity%20it%20would%20be%20perfect.%20Thank%20you%3C%2FP%3E%3CP%3EPS%3A%20I%20didn't%20share%20my%20partition%20section%20of%20the%20DTS%20because%20it%20doesn't%20make%20sense%20in%20the%20current%20state.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSTRONG%3EDo%20I%20need%20to%20enable%20sysbuild%20(and%20set%20SB_CONFIG_BOOTLOADER_MCUBOOT%3D%22y%22)%20or%20no%3F%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3ENo%2C%20you%20do%20not%20need%20to%20use%20sysbuild%20since%20TF-M%20build%20system%20includes%20MCUboot%20by%20default.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%3CEM%3EIs%20the%20content%20I'm%20adding%20into%20prj.conf%20correct%3F%3C%2FEM%3E%3CBR%20%2F%3EYes%2C%20as%20an%20observation%2C%20the%20%22CONFIG_BUILD_WITH_TFM%22%20is%20set%20by%20default%20when%20creating%20a%20project%20for%20the%20non-secure%20version%20of%20the%20board.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3EWhat%20do%20I%20need%20to%20flash%20when%20everything%20is%20compiled%3F%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3EIt%20depends%2C%20in%20the%20screenshot%20from%20the%20TF-M%20Build%20System%20Zephyr%20documentation%2C%20is%20a%20detailed%20explanation%20on%20what%20is%20the%20utility%20of%20each%20generated%20file%3A%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RomanVR_0-1766013775436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370516iE07B7844FB412097%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22RomanVR_0-1766013775436.png%22%20alt%3D%22RomanVR_0-1766013775436.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHowever%2C%20consider%20that%20for%20a%20first-use%20occasion%2C%20you%20should%20flash%20the%20tfm_merged.hex%20file%20which%20contains%20a%20merge%20of%20the%20MCUboot%20bootloader%2C%20TF-M%20Secure%20image%20and%20your%20non-secure%20application.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3EHow%20can%20I%20use%20the%20storage%20partition%20in%20this%20non-secure%20configuration%3F%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3EIt%20is%20expected%20that%20the%20user%20would%20use%20the%20secure%20storage%20service%20provided%20by%20TF-M%2C%20since%20the%20flash%20layout%20of%20the%20TF-M%20configuration%20reserves%20a%20space%20for%20this%20storage.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3EAnyway%2C%20what%20is%20this%20fw_storage%3F%3C%2FEM%3E%3C%2FSTRONG%3E%3CBR%20%2F%3EThe%20fw_storage%20partition%20is%20reserved%20for%20Wi-Fi%2C%20BLE%20and%20802.15.4%20firmwares%20storage.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EHope%20this%20information%20helps%20on%20your%20development.%20Thank%20you%20for%20your%20patience.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265431%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265431%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EI%20must%20publish%20a%20firmware%20tomorrow%2C%20can%20I%20expect%20a%20reply%3F%20Or%20it's%20not%20ready%20on%20your%20side%20yet%20and%20I%20need%20to%20find%20a%20plan%20B%3F%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%2C%3C%2FP%3E%3CP%3EArthur%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265705%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265705%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20feedback.%20You%20didn't%20reply%20to%20the%20question%20about%20the%20partition%20structure%3C%2FP%3E%3CP%3E%3CSPAN%3E5.%20Therefore%2C%20why%20is%20fw_storage%20partition%20located%20at%200x400000%3F%20It's%20located%20into%20the%26nbsp%3Bslot1_partition%20if%20I%20look%20into%20the%20common.dtsi%20structure.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E1.%20This%20fw_storage%20seems%20important%2C%20why%20is%20it%20never%20mentioned%20in%20the%20%22secure%22%20configuration%3F%3C%2FP%3E%3CP%3E2.%20Do%20I%20need%20to%20do%20anything%20special%20to%20populate%20this%20partition%20with%20the%20necessary%20firmwares%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265832%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265832%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EI%20tried%20to%20compile%20and%20flash%20(tfm_merged.hex)%20for%20basic%20sample.%20If%20I%20use%20the%20zephyr%2Fsamples%2Fhello_world%20I%20get%20that%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5BINF%5D%20Starting%20bootloader%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BINF%5D%20PSA%20Crypto%20init%20done%2C%20sig_type%3A%20EC-P256%2C%20using%20builtin%20keys%0A%5BINF%5D%20Image%20index%3A%201%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Image%20index%3A%200%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Bootloader%20chainload%20address%20offset%3A%200x20000%0A%5BINF%5D%20Image%20version%3A%20v0.0.0%0A%5BINF%5D%20Jumping%20to%20the%20first%20image%20slot%0ABooting%20TF-M%20v2.2.0%2Bg9a6c6f958%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BSec%20Thread%5D%20Secure%20image%20initializing!%0A%5BINF%5D%5BPS%5D%20Encryption%20alg%3A%200x5500100%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%20complete.%0A***%20Booting%20Zephyr%20OS%20build%20nxp-v4.1.0-23883-g5fbcfde7cfc2%20***%0AHello%20World!%20frdm_rw612%2Frw612%2Fns%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESo%20everything%20seems%20to%20work%20as%20expected.%3C%2FP%3E%3CP%3EHowever%2C%20if%20I%20use%20an%20example%20which%20uses%20WiFi%20like%20the%20zephyr%2Fsamples%2Fnet%2Fwifi%2Fshell%20then%20I%20get%20the%20same%20output%20as%20my%20firmware%20(which%20is%20using%20WiFi%20and%20BLE)%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5BINF%5D%20Starting%20bootloader%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BINF%5D%20PSA%20Crypto%20init%20done%2C%20sig_type%3A%20EC-P256%2C%20using%20builtin%20keys%0A%5BINF%5D%20Image%20index%3A%201%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Image%20index%3A%200%2C%20Swap%20type%3A%20none%0A%5BINF%5D%20Bootloader%20chainload%20address%20offset%3A%200x20000%0A%5BINF%5D%20Image%20version%3A%20v0.0.0%0A%5BINF%5D%20Jumping%20to%20the%20first%20image%20slot%0ABooting%20TF-M%20v2.2.0%2Bg9a6c6f958%0A%5BWRN%5D%20This%20device%20was%20provisioned%20with%20dummy%20keys.%20This%20device%20is%20NOT%20SECURE%0A%5BSec%20Thread%5D%20Secure%20image%20initializing!%0A%5BINF%5D%5BPS%5D%20Encryption%20alg%3A%200x5500100%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%0A%5BINF%5D%5BCrypto%5D%20Provision%20entropy%20seed...%20complete.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESo%20the%20root%20cause%20of%20the%20issue%20comes%20from%20the%20Wifi%20and%20may%20be%20linked%20to%20my%20questions%20about%20the%20firmware%20partition.%20Can%20you%20please%20share%20steps%20to%20compile%20an%20example%20with%20Wifi%20and%20tf-m%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2266327%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2266327%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E%2C%26nbsp%3B%20hope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3EAnswering%20your%20question%2C%20it%20is%20expected%20for%20the%20Wifi%20firmware%20to%20be%20loaded%20automatically.%20However%2C%20I'm%20checking%20this%20issue%20internally.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20your%20patience.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2267014%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267014%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%20What's%20an%20estimated%20ETA%2C%20is%20it%20days%20or%20weeks%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2267062%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267062%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EI'm%20afraid%20I%20cannot%20give%20you%20an%20estimated%20time%20for%20the%20response%20given%20the%20holiday%20season%2C%20however%20I%20will%20let%20you%20know%20once%20I%20get%20something.%3C%2FP%3E%0A%3CP%3EThank%20you.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254885%22%20target%3D%22_blank%22%3E%40_arthur_%3C%2FA%3E%2C%26nbsp%3Bthank%20you%20and%20happy%202026%20for%20you%20too!%3C%2FP%3E%0A%3CP%3EI'm%20still%20waiting%20for%20my%20internal%20team%20to%20reply%20on%20this%20matter%2C%20I%20will%20let%20you%20know%20once%20I%20get%20an%20answer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2290702%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Generate%20a%20firmware%20for%20mcuboot%20with%20a%20small%20non%20secure%20partition%20and%20a%20secure%20partition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290702%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Roman%2C%3C%2FP%3E%3CP%3EI'm%20wishing%20you%20and%20NXP%20all%20the%20best%20for%202026%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20news%20about%20this%20topic%3F%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EArthur%3C%2FP%3E%3C%2FLINGO-BODY%3E