DEMOJM Coldfire locks up when compiled with Codewarrior V6.1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DEMOJM Coldfire locks up when compiled with Codewarrior V6.1

1,190件の閲覧回数
nophead
Contributor I

The example programs work when compiled with the version of Codewarrior that comes in the kit, V6.1, but if I compile them with Codewarrior V6.3 they all lock up in disable_ep_tx().

 

Anybody know a fix for this?

ラベル(1)
0 件の賞賛
返信
1 返信

642件の閲覧回数
nophead
Contributor I

Well looking into the assembler code it appears the V6.3 compiler is badly broken:

 

The line:

MCF_USB_ENDPT(ep) &= ~MCF_USB_ENDPT_TX_EN;

Translates to:

LEA 0xFFFF9AC0,A0

MOV3Q #2,D0

BCLR D0(A0,D0.L*4)

 

D0 is used as both the bit to be cleared and the array index. It should use D7 as the index.

 

The V6.1 compiler produces much worse code but at least it is correct.

CLR.L D0

MOVE.B D7,D0

LEA 0xFFFF9AC0,A0

LEA (A0,D0.L*4),A0

MVZ.B (A0),D0

BCLR #2,D0

MOVE.B D0,(A0)

 

 

 

 

 

 

0 件の賞賛
返信