Need suggestions for debugging memory error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need suggestions for debugging memory error

Jump to solution
848 Views
JBM
Contributor IV

I'm working with CodeWarrior and an MC9S08QE128.  I have gone to banked memory due to the size of the code and everything was working but as of today I have an error I can't run down.  At a point in the code when a function is called, the code jumps to the wrong function and in fact jumps to the middle of the wrong function.  I then get an ILLEGAL BP and it resets.

 

All code except for main.c has been moved to the banked memory using pragmas.

 

I'm not doing any dynamic memory allocation.

 

I have watched the registers and everything look OK to me.  I thought at first it was a stack problem, but the stack is fine (I have it at 2K at the moment to ensure it's the the problem).  There is enough RAM for all the data, I've checked that.

 

Unfortunately, I can't post the code (13+ K lines) since it's not mine.

 

Any ideas on how to run this down?

 

Thanks for the help.

 

Brad

Labels (1)
0 Kudos
1 Solution
329 Views
bigmac
Specialist III

Hello Brad,

 


JBM wrote:

I'm working with CodeWarrior and an MC9S08QE128.  I have gone to banked memory due to the size of the code and everything was working but as of today I have an error I can't run down.  At a point in the code when a function is called, the code jumps to the wrong function and in fact jumps to the middle of the wrong function.  I then get an ILLEGAL BP and it resets.

 

All code except for main.c has been moved to the banked memory using pragmas.

  


The ISR code must also use unbanked memory.

 

Regards,

Mac

 

 

View solution in original post

0 Kudos
2 Replies
330 Views
bigmac
Specialist III

Hello Brad,

 


JBM wrote:

I'm working with CodeWarrior and an MC9S08QE128.  I have gone to banked memory due to the size of the code and everything was working but as of today I have an error I can't run down.  At a point in the code when a function is called, the code jumps to the wrong function and in fact jumps to the middle of the wrong function.  I then get an ILLEGAL BP and it resets.

 

All code except for main.c has been moved to the banked memory using pragmas.

  


The ISR code must also use unbanked memory.

 

Regards,

Mac

 

 

0 Kudos
329 Views
JBM
Contributor IV

Thanks, that was it.

0 Kudos