ADDRESS error

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

ADDRESS error

3,793 次查看
rao
Contributor I
I am working with mcf 5282 .
while running the code it is giving ADDRESS ERROR.
please help in this issue.
thanks in advance.
标签 (1)
0 项奖励
1 回复

435 次查看
mjbcswitzerland
Specialist V

Hi

The address error is because your code is incorrectly trying to excecute on a non-aligned boundary (or accessing non-aligned memory). You will have to debug your code to find the cause of the error.

A good method is to add your own address error interrupt handling function (interrupt vector 3) which dumps the exception stack contents when it happens. The exception stack will contain information about which type of access caused the error and which address the PC had at the time. Using this information you can find the location in code which is incorrect.

If the error occurs every time the code runs and you are using a debugger it is of course easy to find which piece of code is causing the exception simply by stepping through the functions and "homing" in on the bad code.

Regards

Mark Butcher
www.mjbc.ch

 

 

0 项奖励