Need suggestions for debugging memory error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Need suggestions for debugging memory error

跳至解决方案
858 次查看
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

标签 (1)
0 项奖励
1 解答
339 次查看
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 项奖励
2 回复数
340 次查看
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 项奖励
339 次查看
JBM
Contributor IV

Thanks, that was it.

0 项奖励