AnsweredAssumed Answered

Illegal BP MC9S12XDP

Question asked by Daniel NDIAYE on Mar 25, 2010
Latest reply on May 29, 2018 by Joern Lee

Hello,

First of all I am sorry for the possible faults, I am not English-speaking and I hope  you will understand my problem!

 

I have some problems to execute  a project with CodeWarrior. As soon as I execute my project the debugger tells me "ILLegal BP" and ends code (at the red line in the following code)  while it executes Start12.c (fonction Init())

 

Thank you

 

Regards

 

 



 


#ifndef __ONLY_INIT_SP
#if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN))
static void __far Init(void)
#else
static void Init(void)
#endif
{
/* 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:
#if defined(__HIWARE_OBJECT_FILE_FORMAT__) && defined(__LARGE__)
             LDX   _startupData.pZeroOut:1  ; in the large memory model in the HIWARE format, pZeroOut is a 24 bit pointer
#else
             LDX   _startupData.pZeroOut    ; *pZeroOut
#endif
             LDY   _startupData.nofZeroOuts ; nofZeroOuts
             BEQ   CopyDown                 ; if nothing to zero out


Outcomes