AnsweredAssumed Answered

Illegal BP MC9S12XDP

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


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






#ifndef __ONLY_INIT_SP
#if (!defined(FAR_DATA) || defined(__HCS12X__)) && (defined( __BANKED__) || defined(__LARGE__) || defined(__BANKED_COPY_DOWN))
static void __far Init(void)
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 {
#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
             LDX   _startupData.pZeroOut    ; *pZeroOut
             LDY   _startupData.nofZeroOuts ; nofZeroOuts
             BEQ   CopyDown                 ; if nothing to zero out