The debug session locks the debugged elf when Create and Use Copy of Executable checkbox is not selected, see Symbolics. If you make changes to the source files and rebuild the project while a debug session is on, the build commands are invoked but the locked files are not overwritten and a link-time error is generated.
This feature allows automatic termination of the debug sessions when initiating a build that produces executables locked by those debug sessions.
To enable build while debugging:
The Preferences dialog appears.
The CodeWarrior debugger preferences appears in the right pane of the Preferences dialog.
Now the debug session will automatically terminate while initiating a build that produces executables locked by those debug sessions