Hi Marte Skjønsfjell,
I had already ported the MK64F12 to the MK21F12 and the ported demo ran well on the TWR-K21F120M board.
The attachment is consist of the head file and project and assure them are settled in the ~\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets and ~\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices respectively, then open the project later.

Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------