ADDRESS error

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

ADDRESS error

4,244 Views
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.
Labels (1)
0 Kudos
Reply
1 Reply

886 Views
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 Kudos
Reply