AnsweredAssumed Answered

hcs08

Question asked by Francois on Mar 9, 2016
Latest reply on Mar 15, 2016 by Pascal Irrle

Hello,

 

I've a little issue with CodeWarrior on HCS08SG32:

When compiling the following lines, in the first case, the compiler make a reference to a strange location (0x0232).

I think that if the line 0x8be8 (LDA 0x232 which has nothing to do here  was replaced by CLRA, it would be OK.

Any comment would be appreciated.

 

Francois

 

Case not OK

n = (long)(RamRO.Tle[1].TleValueAvg) * (Data.Tle[0].Range);

 

8bdd:   CD9BD5 JSR 0x9BD5 _SEXT16_32 (0x9bd5)

8be0:   C68017 LDA 0x8017

8be3:   CE8016 LDX 0x8016

8be6:   87 PSHA

8be7:   89 PSHX

8be8:   C60232 LDA 0x0232

8beb:   87 PSHA

8bec:   87 PSHA

8bed:   95 TSX

8bee:   89 PSHX

8bef:   8B PSHH

8bf0:   AF04 AIX #4

8bf2:   CD9B7F JSR 0x9B7F _LMUL (0x9b7f)

 

 

Case OK

n = (long)(RamRO.Tle[1].TleValueAvg) * Data.DummyUint;

 

8bdd:   CD9BD0 JSR 0x9BD0 _SEXT16_32 (0x9bd0)

8be0:   328020 LDHX 0x8020

8be3:   4F CLRA

8be4:   89 PSHX

8be5:   8B PSHH

8be6:   87 PSHA

8be7:   87 PSHA

8be8:   95 TSX

8be9:   89 PSHX

8bea:   8B PSHH

8beb:   AF04 AIX #4

8bed:   CD9B7A JSR 0x9B7A _LMUL (0x9b7a)

 

typedef struct

{

/* DataFlash area */

/* Parameters for Tle */

StructDataTle Tle[2];

uint DummyUint;

}

StructData;

Outcomes