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
Solved! Go to Solution.
I've manage to solve it. I forgot to change the librari from ansixbi to ansibi.
I've manage to solve it. I forgot to change the librari from ansixbi to ansibi.