OK! I was able to replicate the example explained in AN12255 on RT1170-EVK. I attach the project.
I configured XIP_BOOT_HEADER_ENABLE=1 to also include boot headers in the binary. I build twice by changing FIRMWARE_INDEX 0 or 1. Then on my EVK I burned 0x08 into xSPI_FLASH_SEC_IMG_OFFSET:

so that the images have an offset of 2MB between them
Using JLINK, I wrote image 0 at the beginning of the flash and image 1 at offset 0x20000. And the result is this:

Then I tried the encrypted versions. The procedure is not as straightforward as for the plain-text version. I had to configure XIP_BOOT_HEADER_ENABLE=0, so that no boot header would be included in the binary. Then:
- using Provisioning tool I wrote image 1, and verified its operation (of course I turned on the ENCRYPTED_XIP_EN switch and in the USER_KEY5 I have the KEK written). I did this because I don't know how to force provisioning tool to write the image to an arbitrary address.
- using JLINK I reread the FW from the flash (paying attention to the length)
- using Provisioning tool I wrote image 0, and verified
- Using JLINK, I wrote at offset 0x200000 the reread image.
Image 0 is executed but image 1 does not start.
What could I have done wrong?
more questions:
Is it possible to input an executable with boot headers to Provisioning Tool? How?
Is it possible to generate the encrypted bootable image (thus containing FCB, IVT, keyblob, etc.) offline (without having an EVK connected)?
Is it possible with Provisioning Tool to force the binary write address?
at resets or power cycles it always starts image 0. Is there any way to persist the index of the image to start?
best regards
Max