Christian Bruckbauer

Code Warrior Error Message: Error A13003 Value is truncated by one byte

Discussion created by Christian Bruckbauer on Apr 22, 2008
Latest reply on Apr 24, 2008 by Jim Donelson
Hello Guys!

We work at this time on a MC9S08QG8 Demo Board and try to make some settings in the SOPT1 register.

We use following source code:

_Startup:
            LDHX   #RAMEnd+1        ; initialize the stack pointer
            TXS
            CLI                     ; enable interrupts
            mov #%00000011,SOPT1
            mov #%00001100,$0023     ;Rx/Tx enable
            mov #%01000001 ,$0021

At the compile process we get an error for the red marked line. We use following MC9S08QG8.inc file.

;*** SOPT1 - System Options Register 1; 0x00001802 ***
SOPT1:              equ    $00001802                                ;*** SOPT1 - System Options Register 1; 0x00001802 ***
; bit numbers for usage in BCLR, BSET, BRCLR and BRSET
SOPT1_RSTPE:        equ    0                                         ; RESET Pin Enable
SOPT1_BKGDPE:       equ    1                                         ; Background Debug Mode Pin Enable
SOPT1_STOPE:        equ    5                                         ; Stop Mode Enable
SOPT1_COPT:         equ    6                                         ; COP Watchdog Timeout
SOPT1_COPE:         equ    7                                         ; COP Watchdog Enable
; bit position masks
mSOPT1_RSTPE:       equ    %00000001
mSOPT1_BKGDPE:      equ    %00000010
mSOPT1_STOPE:       equ    %00100000
mSOPT1_COPT:        equ    %01000000
mSOPT1_COPE:        equ    %10000000

We try all possible different syntax without success.  Maybe someone can help us.

Best regards,

norticum

Outcomes