I tried with CodeWarrior v10.6, and also have problem with the assembly file compiling. I have contacted compiler team for the solution.
Now, you can use embedded assembly code in C file to work it around, just like below:
__declspec(section ".init") __asm void cfg_WATCHDOG(void);
__asm void cfg_WATCHDOG(void)
{
nofralloc
/* Clear the soft lock bit SWT_CR.SLKSWT_CR: */
/* SR --> 0x0000c520 */
lis r4, 0
ori r4, r4, SR_WSC_1@l
lis r3, SWT_SR@ha
stw r4, SWT_SR@l(r3)
/* SR --> 0x0000d928 */
lis r4, 0
ori r4, r4, SR_WSC_2@l
stw r4, SWT_SR@l(r3)
/* Disable watchdog, SWT.CR.WEN = 0*/
lis r4, CR_VALUE@h
ori r4, r4, CR_VALUE@l
lis r3, SWT_CR@ha
stw r4, SWT_CR@l(r3)
blr
}
I will get back to this issue as soon as I have the solution for assembly files compiling in CW10.6.