By default, the kinetisconnect.scp is configured as the connect script for most Kinetis part launch configurations. This script will report if the Kinetis part is secure and requires a mass erase, but will initiate a mass erase. This is intentional. The kinetismasserase.scp script will mass erase, but only if the part is secure. A question posed to you is why you would want to mass erase every time? If you insist, you can modify the kinetismasserase.scp script file to bypass the secure check, and proceed with mass erase. So, for example, in the kinetismasserase.scp script, find and modify line 790 as below:
.
.
790 if s% & 0x00000004 Then Goto 860
800 REM ================================================================
810 Print "Part is not secured"
.
.
to
790 Goto 860
800 REM ================================================================
810 Print "Part is not secured"
Of course, you need to use kinetismasserase.scp as your launch configuration connect script.
Thanks and regards,
MCUXpresso Support