Hi Martin,
Please take easy!
I already test it on my side, I can reproduce your problem now.
So, I check it with our MCUBOOT R&D team this afternoon.
I have got that, the flash bootloader don't have the unlock function, the EraseAll to Unlock is used for the kinetis chip which contains the ROM bootloader.
K22 and K64 don't have the ROM bootloader, so it just use the flashbootloader.
So, they recommend me to use the backdoor key to unlock the flashbootloader.
Now, follow me to use the backdoor key, and secure the flash bootloader.
1. In the flash bootloader
1)Set the backdoor key, take an example:
BackDoorK0 EQU 0x1
BackDoorK1 EQU 0x1
BackDoorK2 EQU 0x1
BackDoorK3 EQU 0x1
BackDoorK4 EQU 0x1
BackDoorK5 EQU 0x1
BackDoorK6 EQU 0x1
BackDoorK7 EQU 0x1
2) FSEC enable the backdoor key and secure the chip
FSEC EQU 0xbf
2. In the KinetisFlashTool, please do it like this:

Now, it works perfectly.
Please try it on your side.
Any updated information from your side, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------