Most microcontroller offer different levels of protection, usually with special configuration registers and settings:
- Protect:
the device or parts of it are protected against programming the flash memory. This is typically used to protect a bootloader or any parts of the device to be overwritten either by the debugger or by the application itself. To unprotect usually a configuration register has to be reprogrammed or the flash memory needs a mass erase.
- Secure:
Access to the flash memory with an external tool or debugger is not possible any more. This used to protect the software on the device to be inspected or to prevent reverse engineering. To recover the device a mass erase typically has to be applied.
- Disable Mass Erase:
This is probably the most dangerous option a device can offer for a developer. With this configuration set, it will not be possible to do a mass erase of the device. So if you combine
secure with
disable mass erase, you will not be able to recover your device any more.
Depending on the device/flash features, CodeWarrior provides
Protect/Unprotect
and
Secure/Unsecure
target task actions of the flash programmer:
Figure 1.
Protect/Unprotect, Secure/Unsecure Target Task Actions

In case during development you wrote/selected wrong settings to your device, and with this accidentally secure it. And if your wrong settings includes
disable mass erase as well, you will not be able to recover your device anymore. So you have to be very careful not to secure any devices as this might be a permanent thing, unless your settings requires so.
Note:
Connecting to the
wrong device might trigger a
false alarm about the device being
secured. To avoid getting this message accidentally, always carefully check to which board/device you are connecting.