Dual Targetting HCS12 y HCS12X problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Dual Targetting HCS12 y HCS12X problem

跳至解决方案
811 次查看
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 解答
673 次查看
sebasira
Senior Contributor I

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

在原帖中查看解决方案

0 项奖励
回复
1 回复
674 次查看
sebasira
Senior Contributor I

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

0 项奖励
回复