Dual Targetting HCS12 y HCS12X problem

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

Dual Targetting HCS12 y HCS12X problem

ソリューションへジャンプ
801件の閲覧回数
sebasira
Senior Contributor I

Hello everybody!

 

I'm working with CW4.6 and both HCS12 and HCS12X (not simultaneously). Is the same application that can be loaded to any of the 2 MCUs.

 

I first started the project as if it would only be for HCS12XA. Then I added a new target (for the HCS12) and I choose to compile with libraries for this MCU and not for the HCS12XA. I've made changes in the target settings and I also add some conditiona compilation.

 

The problem I encountered is that when compiling for HCS12 the __HCS12X__ is still defined and so in some routines as:

void NEAR _lDivMod (void)              /* q = a / b; a = a % b */{   __asm {#ifdef __HCS12X__          CLRW   lDivMod_q3#else          CLRA          CLRB          STD    lDivMod_q3

 

the interrup for "Unimplemented instruction trap" is launched. Because CRLW does not exists for HCS12

 

How can I solve that?

 

COMPILER SETTINGS: -D_HCS12 -D__NO_FLOAT__ -Lasm=%n.lst -Mb -Onf -WmsgSd1825 -WmsgSd3804 -WmsgSd4002 -WmsgSd12002

 

ASM SETTINGS: -D_HCS12 -Mb 

 

I also try using another Start12.c from other HCS12 only project

ラベル(1)
0 件の賞賛
返信
1 解決策
663件の閲覧回数
sebasira
Senior Contributor I

I've manage to solve it. I forgot to change the librari from ansixbi to ansibi.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
664件の閲覧回数
sebasira
Senior Contributor I

I've manage to solve it. I forgot to change the librari from ansixbi to ansibi.

0 件の賞賛
返信