error 65: Access Violation

Hi,

I am simulating my code using the uVision v2.33.

When I am exiting a function i get the following error:

error 65: Access violation at address 0x00BA0180. and the simulator jumps to disassembly window.

I have read the forum and the doc abt access violation errors but am not able to understand why I am getting the error on exiting a function?

I am searching for an answer in the C166 manuals and the ST10f269 manual. But am directionless right now.

If anyone is familiar or knows the problem area, please share it with me.

Regards
Deepak

Parents
  • Probably stack corruption or stack overflow.
    Something scrambled the return address that would have pointed from that function to the code that called it. Instead, it jumped somewhere into the blue, or more precisely into a region where, according to your debugger setup files, there is no code to be executed. So something must have modified stack contents.

    To really see what's going on, you'ld have to keep an eye on the uVision Call stack display and the SP register while you step slowly from beginning to exit of that function. And switch to machinecode-level debugging (in the disassembly window) near the end.

Reply
  • Probably stack corruption or stack overflow.
    Something scrambled the return address that would have pointed from that function to the code that called it. Instead, it jumped somewhere into the blue, or more precisely into a region where, according to your debugger setup files, there is no code to be executed. So something must have modified stack contents.

    To really see what's going on, you'ld have to keep an eye on the uVision Call stack display and the SP register while you step slowly from beginning to exit of that function. And switch to machinecode-level debugging (in the disassembly window) near the end.

Children
More questions in this forum