AnsweredAssumed Answered

Dual Target Project

Question asked by sebasira on Feb 5, 2013
Latest reply on Feb 5, 2013 by kef

Hello everyone!

 

I've got a project for a HCS12-128 (MC9S12A128) and I want to load it into the same hardware but with a HCS12-256 (MC9S12A256). On the 128 works fine, but  when I load it into 256 it won't pass the startup. The startup is the one created by the project wizard (for 1258). (Note, if it helps, I'm working with CW v4.6).

 

It gets stuck inside Init rigth after start execution. Here's a portion of it

 

static void Init(void) {

/* purpose:     1) zero out RAM-areas where data is allocated   */

/*              2) copy initialization data from ROM to RAM     */

/*              3) call global constructors in C++              */

/*   called from: _Startup, LibInits                            */

   __asm {

ZeroOut:

             LDX   _startupData.pZeroOut        ; *pZeroOut         

             LDY   _startupData.nofZeroOuts     ; nofZeroOuts

             BEQ   CopyDown                     ; if nothing to zero out

 

When loaded into a 128 MCU, in the ASM window I see:

 

388000   LDX    0xC00D

388003   LDY    0xC00B

388006   BEQ    *+16

 

 

Instead, when I load it into the 256 MCU:

 

388000   BGND

388001   BGND

388002   BGND

388003   BGND


 

Why is this happening?

 

 

I'm guessing it could be related to PRM file, so I attached it. With other projects I've done the same thing and I did not have any problem, and the only difference is that now I've touch the PRM from it's default.

 

Any input is appreciatted! Thanks!

 

 

 

 

 

 

Original Attachment has been moved to: PRM-for-12.prm.zip

Outcomes