The twrk60n512_FirmwareUpdate build configuration links against Debug configurations because the FLASHX driver fails when working with the Release configuration. To make it work, add the following lines in the BSP project file bsp_twrk60n512\Peripheral IO Drivers\flashx\freescale\flash_ftfl.c (function ftfl_flash_command_sequence(), line 124):
result = FTFL_OK;
FMC_PFB0CR &= 0xFFFFFFE6; /* Single entry buffer disable.*/
FMC_PFB1CR &= 0xFFFFFFE6; /* Single entry buffer disable. */
FMC_PFB0CR &= 0xFFFFFFF9; /* Data Cache disable. */
FMC_PFB1CR &= 0xFFFFFFF9; /* Data Cache disable. */
After these changes, the BSP library must be rebuilt in both Debug and Release configurations. See the Build MQX libraries chapter for more information.
More information on this issue in the FNET project (included in folder C:\Program Files\Etherios\Cloud Connector\Kits\Kinetis\Tools\FNET Bootloader) in file twrk60n512_boot\Sources\fnet_stack\cpu\mk\fnet_mk_flash.c (function fnet_ftfl_command(), line 90) and at Mask Set Errata for Mask 0M33Z.