Mohammed Noureldin
Mohammed Noureldin

Reputation: 16826

ERROR 65 in ARM KEIL 5 (Permissions error)

I'm relatively new in ARM Cortex M4 series micro-controller. When I'm trying to debug a simple project(blinky which easily just blinks a led on and off) using KEIL 5 simulator, I get an error like this:

* error 65: access violation at 0x400FE608 : no 'read' permission * error 65: access violation at 0x400FE608 : no 'write' permission

I searched on internet for a solution, and I get this one:

http://www.keil.com/support/docs/814.htm

But actually it is not easy and not logical to mention all the addresses to which I want to access in my whole code like the method mentioned above.

could anybody suggest something else for me please?

(Actually I get this error with all projects which I intended to simulate so I can't simulate anything).

Here is the simple code which I have been using:

#define GCGPIOR (*((int*)0x400FE608))
int main(void) 
{ 
GCGPIOR |= 0x20; 
return 0; 
}

and I am using this mc: TM4C1294NCPDT

Upvotes: 1

Views: 6388

Answers (2)

Rafael Hernández
Rafael Hernández

Reputation: 21

I have a similar problem with KEIL V5, in a CMSIS project with LPC1768 microcontroller.

When debugging with real microcontroller as target, everything works fine. Debugging with simulator as target, when CMSIS tries to initialize the System core clock I get:

*** error 65: access violation at 0x400FC1A0 : no 'write' permission

Upvotes: 2

Clifford
Clifford

Reputation: 93476

Is this really sample code from the chip vendor? The definition of GCGPIOR should be volatile.

#define GCGPIOR (*((volatile int*)0x400FE608)))

Have you selected the correct device in the simulator/project configuration? Have you installed the Keil::TM4C_DFP device package and are you using the correct device configuration?

The problem appears to be that the memory map used by the simulator is automatically set up from the linker memory map. If you make direct memory mapped I/O accesses not known to the linker, then it will raise an exception (when this mechanism detects a bug in your code you may be glad of that - it is not a bug in uVision - it is intentional behaviour).

If the MAP command or dialogue did not work for you, Occam's razor suggest to me that you did not perform the operation correctly. You should map the entire I/O region given in your part's data sheet or user manual. It may work I suppose if you define the I/O region in the linker scatter file - but that may be getting a bit too complicated.

Upvotes: 0

Related Questions