RW612 MCUBoot + TF-M Not Booting

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

RW612 MCUBoot + TF-M Not Booting

436 Views
jm-streametric
Contributor II
Hello,
I am having issues with flashing my custom board set up very similar to the FRDM-RW612 with the TF-M + MCUBoot example.
It seems that the newest version of the nxp-zephyr repo (v4.3.0) has changed some of the files in the tutorial. I have tried to follow it the best I can but my board still does not boot correctly.
When I flash just the MCUBoot bootloader, I do see the expected output error Unable to find bootable image. When I follow the guide's instructions to flash the psa crypto sample I don't see any output on the terminal at all, not even the MCUBoot text anymore. I also tested it with the blinky sample in case it was just a terminal issue, but in that case the board LED does not blink either.

Both of these samples do boot and run when i flash just TF-M without MCUBoot (west build -b frdm_rw612//ns samples/basic/blinky --pristine && west flash).
In this case I also noticed an odd quirk. Since I need to use flexcomm3 for a peripheral, I wanted to switch the zephyr console to another output. When I edit the device tree I get different problems:
 
1. Switching zephyr console to Flexcomm2 instead of Flexcomm3
Made the following edits to boards/nxp/frdm_rw612/frdm_rw612_common.dtsi:
  • Removed i2c-0 alias
  • Removed ambient-temp0 alias
  • Replaced chosen/zephyr,console with &flexcomm2
  • Added flexcomm2 node:
&flexcomm2 {
	compatible = "nxp,lpc-usart";
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&pinmux_flexcomm2_usart>;
	pinctrl-names = "default";
	wakeup-source;
};
  • Removed nxp_pmod_touch_panel_i2c, arduino_i2c, and mikrobus_i2c nodes

And added a flexcomm2 pinctrl to boards/nxp/frdm_rw612/frdm_rw612-pinctrl.dtsi:

&pinctrl {
	pinmux_flexcomm2_usart: pinmux_flexcomm2_usart {
		group0 {
			pinmux = <IO_MUX_FC2_USART_DATA>;
			slew-rate = "normal";
			bias-pull-up;
		};
	};
};

 

And after this, when I flash the exact same blinky code that worked with FC3 as console, I see the bootloader output on FC3 (below) but nothing is ever outputted on FC2 and the LED does not blink.

[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+g3b3595f16
[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.

 

2. Switching zephyr console to Flexcomm14 instead of Flexcomm3

  • Replaced chosen/zephyr,console with &flexcomm14
  • Added flexcomm14 node:
  •  
&flexcomm14 {
	compatible = "nxp,lpc-usart";
	status = "disabled";
	current-speed = <115200>;
	pinctrl-0 = <&pinmux_flexcomm14_usart>;
	pinctrl-names = "default";
	wakeup-source;
};

And added a flexcomm14 pinctrl to boards/nxp/frdm_rw612/frdm_rw612-pinctrl.dtsi:

&pinctrl {
	pinmux_flexcomm14_usart: pinmux_flexcomm14_usart {
		group0 {
			pinmux = <IO_MUX_FC14_USART_DATA>;
			slew-rate = "normal";
		};
	};
};

With these edits, I don't see any output on FC3 or FC14, and the LED does not blink at all.

 

I don't know if the issue I am having with TF-M + MCUBoot is related to the TF-M-only console output problem, but I thought I'd include that just in case.  My end goal is to have MCUBoot and TF-M so that I can perform firmware updates after booting, and I need to use Flexcomm3 for a peripheral so I need a different console output than the FRDM-RW612 uses.

I'd also like to note that I can flash my board and print to console with FC14 when using neither TF-M nor MCUBoot, I only encountered issues with flashing/booting once enabling these subsystems.

 

Any help is very appreciated, thank you!

0 Kudos
Reply
3 Replies

189 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. Could you please give us more details about your setup?

Are you using MCUXpresso for VSCode?

Before trying to implement all the changes related flexcomms, could you please clarify if you could follow the post? (with the respective version changes)

 

Best Regards,

Ricardo

0 Kudos
Reply

180 Views
jm-streametric
Contributor II

Hi Ricardo, sorry if my original posts were scattered.

I just started completely from scratch with the TF-M + MCUBoot guide so I could list what I had issues with. I do use MCUXpresso for VSCode for normal development, but since the guide is using the west command line tools, that's what I've used here.

Issues with the TF-M + MCUBoot guide (on nxp_zephyr tag nxp-v4.3.0)

- Under "Build and Flash TF-M from Downstream" in step 6 of "Modify secure image", it says that M_BOOT_FLASH_CONF_START should be the same as BOOT_FLASH_ACT_APP. I couldn't find BOOT_FLASH_ACT_APP anywhere in the repo, I'm not sure how to find what it is set to. I used #define M_BOOT_FLASH_CONF_START (0x18020000)

- In step 8 of "Modify secure image", the guide instructs to add a VTOR configuration to SystemInitHook in hardware_init.c, but it looks like that code already exists. I left it alone.

- In the "Modify non-secure image" section, the guide instructs to edit files in the folder nxp_zephyr\zephyr\build\tfm\api_ns\platform\partition, but nxp_zephyr\zephyr\build does not exist by default. The guide hasn't instructed to build anything by this point. After I had (later) built the app, the files in steps 2-6 were already modified to the correct values.

- In step 7 of "Modify non-secure image", there is no nxp_zephyr/zsdk/boards directory. I am assuming it's supposed to be nxp_zephyr/zephyr/boards, so I followed step 8 with that path.

- After making the edit to nxp_zephyr/zephyr/boards/nxp/frdm_rw612/frdm_rw612_rw612_ns.dts like the guide says, I get the following build error: required nodelabel not found: slot0_partition. If instead of making that edit, I build with the default device tree file, the sample builds almost all the way but at the last step I get the error:
Traceback (most recent call last):
...
intelhex.AddressOverlapError: Data overlapped at address 0x18020000
During handling of the above exception, another exception occurred:
...
intelhex.AddressOverlapError: /nxp_zephyr/zephyr/build/zephyr/tfm_s_signed.hex has merge issues
I just ignored this error and continued with the guide.

- The last problem I had was in the "Merge Binaries" section on step 3, I get the error Error: No such command 'merge'. I used the command "export" instead of merge since it looked to have a similar function to me.

 

After making these adjustments and flashing like the guide instructs, I still get the following terminal output:

*** Booting MCUboot v2.2.0-192-g96576b341ee1 ***
*** Using Zephyr OS build nxp-v4.3.0 ***
I: Starting bootloader
I: Image index: 0, Swap type: perm
I: Image index: 0, Swap type: perm
I: Primary image: magic=bad, swap_type=0x0, copy_done=0x2, image_ok=0x2
I: Secondary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x1
I: Boot source: none
I: Image index: 0, Swap type: perm
I: Image index: 0, Swap type: perm
I: Image index: 0, Swap type: perm
I: Image index: 0, Swap type: perm
E: Image in the primary slot is not valid!
E: Unable to find bootable image

 

I don't know if any of the adjustments I've made to the guide's instructions are what cause my problems, or if it's some other difference in the updated zephyr repo.  Thank you for responding.

0 Kudos
Reply

272 Views
jm-streametric
Contributor II
I've played around with the proj.conf and found out that the issue is something related to the flash subsystem.
I am currently testing MCUBoot with no TF-M, and the difference between an app that runs and an app that stalls at the line I: Jumping to the first image slot is one or more of the following KConfig options:
 
CONFIG_FLASH_FILL_BUFFER_SIZE=32
CONFIG_FLASH=y
CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM="RAM"
CONFIG_FLASH_INIT_PRIORITY=50
CONFIG_FLASH_HAS_DRIVER_ENABLED=y
CONFIG_FLASH_HAS_EXPLICIT_ERASE=y
CONFIG_FLASH_HAS_PAGE_LAYOUT=y
CONFIG_FLASH_JESD216=y
CONFIG_FLASH_MCUX_FLEXSPI_NOR=y
CONFIG_MEMC_MCUX_FLEXSPI=y

I've been digging around MCUBoot and NXP's flash files but I'm not sure if I'm on the right track or not.  It looks like the line:

((void (*)(void))vt->reset)();

in the do_boot() function of MCUBoot's zephyr main.c is the last place I can debug to in GDB.  After that reset "function" is called, the PC is at 0x20005840 and continuing/stepping does nothing, the program just hangs.
 

Again any help or tips where to look to debug this issue are appreciated, thank you!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2291158%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERW612%20MCUBoot%20%2B%20TF-M%20Not%20Booting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291158%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EHello%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20am%20having%20issues%20with%20flashing%20my%20custom%20board%20set%20up%20very%20similar%20to%20the%20FRDM-RW612%20with%20the%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_self%22%3ETF-M%20%2B%20MCUBoot%20example%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIt%20seems%20that%20the%20newest%20version%20of%20the%20nxp-zephyr%20repo%20(v4.3.0)%20has%20changed%20some%20of%20the%20files%20in%20the%20tutorial.%20I%20have%20tried%20to%20follow%20it%20the%20best%20I%20can%20but%20my%20board%20still%20does%20not%20boot%20correctly.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EWhen%20I%20flash%20just%20the%20MCUBoot%20bootloader%2C%20I%20do%20see%20the%20expected%20output%20error%20%3CSTRONG%3EUnable%20to%20find%20bootable%20image%3C%2FSTRONG%3E.%20When%20I%20follow%20the%20guide's%20instructions%20to%20flash%20the%20psa%20crypto%20sample%20I%20don't%20see%20any%20output%20on%20the%20terminal%20at%20all%2C%20not%20even%20the%20MCUBoot%20text%20anymore.%20I%20also%20tested%20it%20with%20the%20blinky%20sample%20in%20case%20it%20was%20just%20a%20terminal%20issue%2C%20but%20in%20that%20case%20the%20board%20LED%20does%20not%20blink%20either.%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3EBoth%20of%20these%20samples%20do%20boot%20and%20run%20when%20i%20flash%20just%20TF-M%20without%20MCUBoot%20(%3CEM%3Ewest%20build%20-b%20frdm_rw612%2F%2Fns%20samples%2Fbasic%2Fblinky%20--pristine%20%26amp%3B%26amp%3B%20west%20flash%3C%2FEM%3E).%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIn%20this%20case%20I%20also%20noticed%20an%20odd%20quirk.%20Since%20I%20need%20to%20use%20flexcomm3%20for%20a%20peripheral%2C%20I%20wanted%20to%20switch%20the%20zephyr%20console%20to%20another%20output.%20When%20I%20edit%20the%20device%20tree%20I%20get%20different%20problems%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E1.%20%3CU%3ESwitching%20zephyr%20console%20to%20Flexcomm2%20instead%20of%20Flexcomm3%3C%2FU%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMade%20the%20following%20edits%20to%20boards%2Fnxp%2Ffrdm_rw612%2Ffrdm_rw612_common.dtsi%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CUL%3E%3CLI%3E%3CSPAN%3ERemoved%20i2c-0%20alias%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3ERemoved%20ambient-temp0%20alias%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EReplaced%20chosen%2Fzephyr%2Cconsole%20with%20%26amp%3Bflexcomm2%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EAdded%20flexcomm2%20node%3A%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bflexcomm2%20%7B%0A%09compatible%20%3D%20%22nxp%2Clpc-usart%22%3B%0A%09status%20%3D%20%22okay%22%3B%0A%09current-speed%20%3D%20%26lt%3B115200%26gt%3B%3B%0A%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinmux_flexcomm2_usart%26gt%3B%3B%0A%09pinctrl-names%20%3D%20%22default%22%3B%0A%09wakeup-source%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CUL%3E%3CLI%3ERemoved%20nxp_pmod_touch_panel_i2c%2C%20arduino_i2c%2C%20and%20mikrobus_i2c%20nodes%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAnd%20added%20a%20flexcomm2%20pinctrl%20to%26nbsp%3B%3CSPAN%3Eboards%2Fnxp%2Ffrdm_rw612%2Ffrdm_rw612-pinctrl.dtsi%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bpinctrl%20%7B%0A%09pinmux_flexcomm2_usart%3A%20pinmux_flexcomm2_usart%20%7B%0A%09%09group0%20%7B%0A%09%09%09pinmux%20%3D%20%3CIO_MUX_FC2_USART_DATA%3E%3B%0A%09%09%09slew-rate%20%3D%20%22normal%22%3B%0A%09%09%09bias-pull-up%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%3C%2FIO_MUX_FC2_USART_DATA%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EAnd%20after%20this%2C%20when%20I%20flash%20the%20exact%20same%20blinky%20code%20that%20worked%20with%20FC3%20as%20console%2C%20I%20see%20the%20bootloader%20output%20on%20FC3%20(below)%20but%20nothing%20is%20ever%20outputted%20on%20FC2%20and%20the%20LED%20does%20not%20blink.%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%2Bg3b3595f16%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%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E2.%20%3CU%3ESwitching%20zephyr%20console%20to%20Flexcomm14%20instead%20of%20Flexcomm3%3C%2FU%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EReplaced%20chosen%2Fzephyr%2Cconsole%20with%20%26amp%3Bflexcomm14%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EAdded%20flexcomm14%20node%3A%3C%2FLI%3E%3CLI%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLI%3E%3C%2FUL%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bflexcomm14%20%7B%0A%09compatible%20%3D%20%22nxp%2Clpc-usart%22%3B%0A%09status%20%3D%20%22disabled%22%3B%0A%09current-speed%20%3D%20%26lt%3B115200%26gt%3B%3B%0A%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinmux_flexcomm14_usart%26gt%3B%3B%0A%09pinctrl-names%20%3D%20%22default%22%3B%0A%09wakeup-source%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EAnd%20added%20a%20flexcomm14%20pinctrl%20to%26nbsp%3B%3CSPAN%3Eboards%2Fnxp%2Ffrdm_rw612%2Ffrdm_rw612-pinctrl.dtsi%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26amp%3Bpinctrl%20%7B%0A%09pinmux_flexcomm14_usart%3A%20pinmux_flexcomm14_usart%20%7B%0A%09%09group0%20%7B%0A%09%09%09pinmux%20%3D%20%3CIO_MUX_FC14_USART_DATA%3E%3B%0A%09%09%09slew-rate%20%3D%20%22normal%22%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%3C%2FIO_MUX_FC14_USART_DATA%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EWith%20these%20edits%2C%20I%20don't%20see%20any%20output%20on%20FC3%20or%20FC14%2C%20and%20the%20LED%20does%20not%20blink%20at%20all.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20don't%20know%20if%20the%20issue%20I%20am%20having%20with%20TF-M%20%2B%20MCUBoot%20is%20related%20to%20the%20TF-M-only%20console%20output%20problem%2C%20but%20I%20thought%20I'd%20include%20that%20just%20in%20case.%20%26nbsp%3BMy%20end%20goal%20is%20to%20have%20MCUBoot%20and%20TF-M%20so%20that%20I%20can%20perform%20firmware%20updates%20after%20booting%2C%20and%20I%20need%20to%20use%20Flexcomm3%20for%20a%20peripheral%20so%20I%20need%20a%20different%20console%20output%20than%20the%20FRDM-RW612%20uses.%3C%2FP%3E%3CP%3EI'd%20also%20like%20to%20note%20that%20I%20can%20flash%20my%20board%20and%20print%20to%20console%20with%20FC14%20when%20using%20neither%20TF-M%20nor%20MCUBoot%2C%20I%20only%20encountered%20issues%20with%20flashing%2Fbooting%20once%20enabling%20these%20subsystems.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAny%20help%20is%20very%20appreciated%2C%20thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2292628%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RW612%20MCUBoot%20%2B%20TF-M%20Not%20Booting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2292628%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%3CSPAN%3EI've%20played%20around%20with%20the%20proj.conf%20and%20found%20out%20that%20the%20issue%20is%20something%20related%20to%20the%20flash%20subsystem.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20am%20currently%20testing%20MCUBoot%20with%20no%20TF-M%2C%20and%20the%20difference%20between%20an%20app%20that%20runs%20and%20an%20app%20that%20stalls%20at%20the%20line%20%3CSTRONG%3EI%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E%3A%20%3C%2FSTRONG%3E%3CSPAN%3E%3CSTRONG%3EJumping%20to%20the%20first%20image%20slot%3C%2FSTRONG%3E%20is%20one%20or%20more%20of%20the%20following%20KConfig%20options%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ECONFIG_FLASH_FILL_BUFFER_SIZE%3D32%0ACONFIG_FLASH%3Dy%0ACONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM%3D%22RAM%22%0ACONFIG_FLASH_INIT_PRIORITY%3D50%0ACONFIG_FLASH_HAS_DRIVER_ENABLED%3Dy%0ACONFIG_FLASH_HAS_EXPLICIT_ERASE%3Dy%0ACONFIG_FLASH_HAS_PAGE_LAYOUT%3Dy%0ACONFIG_FLASH_JESD216%3Dy%0ACONFIG_FLASH_MCUX_FLEXSPI_NOR%3Dy%0ACONFIG_MEMC_MCUX_FLEXSPI%3Dy%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI've%20been%20digging%20around%20MCUBoot%20and%20NXP's%20flash%20files%20but%20I'm%20not%20sure%20if%20I'm%20on%20the%20right%20track%20or%20not.%20%26nbsp%3BIt%20looks%20like%20the%20line%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E((%3C%2FSPAN%3E%3CSPAN%3Evoid%3C%2FSPAN%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CSPAN%3E*%3C%2FSPAN%3E%3CSPAN%3E)(%3C%2FSPAN%3E%3CSPAN%3Evoid%3C%2FSPAN%3E%3CSPAN%3E))%3C%2FSPAN%3E%3CSPAN%3Evt%3C%2FSPAN%3E%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3Ereset%3C%2FSPAN%3E%3CSPAN%3E)()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3Ein%20the%20do_boot()%20function%20of%20MCUBoot's%20zephyr%20main.c%20is%20the%20last%20place%20I%20can%20debug%20to%20in%20GDB.%20%26nbsp%3BAfter%20that%20reset%20%22function%22%20is%20called%2C%20the%20PC%20is%20at%200x20005840%20and%20continuing%2Fstepping%20does%20nothing%2C%20the%20program%20just%20hangs.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3EAgain%20any%20help%20or%20tips%20where%20to%20look%20to%20debug%20this%20issue%20are%20appreciated%2C%20thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294386%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RW612%20MCUBoot%20%2B%20TF-M%20Not%20Booting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294386%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20you%20are%20doing%20well.%20Could%20you%20please%20give%20us%20more%20details%20about%20your%20setup%3F%3C%2FP%3E%0A%3CP%3EAre%20you%20using%20MCUXpresso%20for%20VSCode%3F%3C%2FP%3E%0A%3CP%3EBefore%20trying%20to%20implement%20all%20the%20changes%20related%20flexcomms%2C%20could%20you%20please%20clarify%20if%20you%20could%20follow%20the%20post%3F%20(with%20the%20respective%20version%20changes)%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards%2C%3C%2FP%3E%0A%3CP%3ERicardo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294560%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RW612%20MCUBoot%20%2B%20TF-M%20Not%20Booting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294560%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Ricardo%2C%20sorry%20if%20my%20original%20posts%20were%20scattered.%3C%2FP%3E%3CP%3EI%20just%20started%20completely%20from%20scratch%20with%20the%20TF-M%20%2B%20MCUBoot%20guide%20so%20I%20could%20list%20what%20I%20had%20issues%20with.%20I%20do%20use%20MCUXpresso%20for%20VSCode%20for%20normal%20development%2C%20but%20since%20the%20guide%20is%20using%20the%20west%20command%20line%20tools%2C%20that's%20what%20I've%20used%20here.%3C%2FP%3E%3CP%3E%3CU%3EIssues%20with%20the%20TF-M%20%2B%20MCUBoot%20guide%20(on%20nxp_zephyr%20tag%20nxp-v4.3.0)%3C%2FU%3E%3C%2FP%3E%3CP%3E-%20Under%20%22Build%20and%20Flash%20TF-M%20from%20Downstream%22%20in%20step%206%20of%20%22Modify%20secure%20image%22%2C%20it%20says%20that%20M_BOOT_FLASH_CONF_START%20should%20be%20the%20same%20as%20BOOT_FLASH_ACT_APP.%20I%20couldn't%20find%20BOOT_FLASH_ACT_APP%20anywhere%20in%20the%20repo%2C%20I'm%20not%20sure%20how%20to%20find%20what%20it%20is%20set%20to.%20I%20used%20%3CSTRONG%3E%23define%20M_BOOT_FLASH_CONF_START%20(0x18020000)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%20In%20step%208%20of%20%22Modify%20secure%20image%22%2C%20the%20guide%20instructs%20to%20add%20a%20VTOR%20configuration%20to%20SystemInitHook%20in%20hardware_init.c%2C%20but%20it%20looks%20like%20that%20code%20already%20exists.%20I%20left%20it%20alone.%3C%2FP%3E%3CP%3E-%20In%20the%20%22Modify%20non-secure%20image%22%20section%2C%20the%20guide%20instructs%20to%20edit%20files%20in%20the%20folder%20%3CEM%3Enxp_zephyr%5Czephyr%5Cbuild%5Ctfm%5Capi_ns%5Cplatform%5Cpartition%3C%2FEM%3E%2C%20but%20%3CEM%3Enxp_zephyr%5Czephyr%5Cbuild%3C%2FEM%3E%20does%20not%20exist%20by%20default.%20The%20guide%20hasn't%20instructed%20to%20build%20anything%20by%20this%20point.%20After%20I%20had%20(later)%20built%20the%20app%2C%20the%20files%20in%20steps%202-6%20were%20already%20modified%20to%20the%20correct%20values.%3C%2FP%3E%3CP%3E-%20In%20step%207%20of%20%22Modify%20non-secure%20image%22%2C%20there%20is%20no%20%3CEM%3Enxp_zephyr%2Fzsdk%2Fboards%3C%2FEM%3E%20directory.%20I%20am%20assuming%20it's%20supposed%20to%20be%20%3CEM%3Enxp_zephyr%2Fzephyr%2Fboards%3C%2FEM%3E%2C%20so%20I%20followed%20step%208%20with%20that%20path.%3C%2FP%3E%3CP%3E-%20After%20making%20the%20edit%20to%20%3CEM%3Enxp_zephyr%2Fzephyr%2Fboards%2Fnxp%2Ffrdm_rw612%2Ffrdm_rw612_rw612_ns.dts%3C%2FEM%3E%20like%20the%20guide%20says%2C%20I%20get%20the%20following%20build%20error%3A%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Erequired%20nodelabel%20not%20found%3A%20slot0_partition%3C%2FFONT%3E.%20If%20instead%20of%20making%20that%20edit%2C%20I%20build%20with%20the%20default%20device%20tree%20file%2C%20the%20sample%20builds%20almost%20all%20the%20way%20but%20at%20the%20last%20step%20I%20get%20the%20error%3A%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3ETraceback%20(most%20recent%20call%20last)%3A%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E...%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eintelhex.AddressOverlapError%3A%20Data%20overlapped%20at%20address%200x18020000%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3EDuring%20handling%20of%20the%20above%20exception%2C%20another%20exception%20occurred%3A%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E...%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eintelhex.AddressOverlapError%3A%20%2Fnxp_zephyr%2Fzephyr%2Fbuild%2Fzephyr%2Ftfm_s_signed.hex%20has%20merge%20issues%3C%2FFONT%3E%3CBR%20%2F%3EI%20just%20ignored%20this%20error%20and%20continued%20with%20the%20guide.%3C%2FP%3E%3CP%3E-%20The%20last%20problem%20I%20had%20was%20in%20the%20%22Merge%20Binaries%22%20section%20on%20step%203%2C%20I%20get%20the%20error%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3EError%3A%20No%20such%20command%20'merge'%3C%2FFONT%3E.%20I%20used%20the%20command%20%22export%22%20instead%20of%20merge%20since%20it%20looked%20to%20have%20a%20similar%20function%20to%20me.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAfter%20making%20these%20adjustments%20and%20flashing%20like%20the%20guide%20instructs%2C%20I%20still%20get%20the%20following%20terminal%20output%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E***%20Booting%20MCUboot%20v2.2.0-192-g96576b341ee1%20***%0A***%20Using%20Zephyr%20OS%20build%20nxp-v4.3.0%20***%0AI%3A%20Starting%20bootloader%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AI%3A%20Primary%20image%3A%20magic%3Dbad%2C%20swap_type%3D0x0%2C%20copy_done%3D0x2%2C%20image_ok%3D0x2%0AI%3A%20Secondary%20image%3A%20magic%3Dgood%2C%20swap_type%3D0x1%2C%20copy_done%3D0x3%2C%20image_ok%3D0x1%0AI%3A%20Boot%20source%3A%20none%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AI%3A%20Image%20index%3A%200%2C%20Swap%20type%3A%20perm%0AE%3A%20Image%20in%20the%20primary%20slot%20is%20not%20valid!%0AE%3A%20Unable%20to%20find%20bootable%20image%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI%20don't%20know%20if%20any%20of%20the%20adjustments%20I've%20made%20to%20the%20guide's%20instructions%20are%20what%20cause%20my%20problems%2C%20or%20if%20it's%20some%20other%20difference%20in%20the%20updated%20zephyr%20repo.%20%26nbsp%3BThank%20you%20for%20responding.%3C%2FP%3E%3C%2FLINGO-BODY%3E