MCUBoot Scratch possibility in EEPROM

Hello,

I'm trying to do a bootloader with mcuboot to have an upgrade way with encryption image. My MCU is a RA6M4 with 1MB of code flash in a custom board with an 2MB EEPROM memory in QSPI.

So, I put MbedTLS (crypto Only) and QSPI in the stack under MCUboot port.

I want to use the Swap configuration with second image in EEPROM.

In order to avoid lose the scratch space in code flash, i'm trying to configure the scratch space inside the EEPROM. But I have error "attempting to use more internal flash than exists on the MCU".
My numbers of layout is:
- Bootloader Flash Area Size = 0x18000
- Image 1 Header Size = 0x200
- Image 1 Flash Area Size = 0xE8000
- Scratch Flash Area Size = 0x8000
If I put scratch flash area size to 0, the error is that i have no defined scratch area.


So my questions are:

- Is possible to put the scratch space into my external EEPROM?

- Can I have in my EEPROM the first MB with stuff of my aplication (littleFS) and the last MB with the second image for upgrade?

- Can you confirm that tinycrypt is not possible to use if I want encrypted images? I tried but shows error, I think is strange.

- There is any way to share functions (mainly MbedTLS crypto) between bootloader and first aplication, just to do not have same functions two times?

Thanks.