# STM32, Keil and *** error 65: access violation at 0x60000000 : no 'write' permission

I tried to run LCD software in Keil for STM32, but I got

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


Do you know how to solve that error ? I saw that I can create a MAP, but it didn't work

MAP  0x00000000, 0x70000000  READ WRITE  // allow R/W access to IO space


(Click for full resolution image)

from this definition :

#define LCD_REG              (*((volatile unsigned short *) 0x60000000)) /* RS = 0 */
#define LCD_RAM              (*((volatile unsigned short *) 0x60020000)) /* RS = 1 */


I'm using simulator

• i followed this video to resolve the same issue related to access violation when i try to use keil in simulator mode youtu.be/gEedJNB2WfM – user102299 Mar 3 '16 at 5:29

Try going to:

Project -> Options for Target '<your target>' -> Debug tab


and select the debugger option.

• then what should I do ? I don't have ULINK, can't I use simulator ? – Rick Ant Feb 25 '12 at 9:48
• I was under impression that you wanted to run the code on a microcontroller, in which case you would choose an appropriate debugger from the list (not necessarily a ulink). I have not tried using a simulator yet, so won't be able to help with that, sorry. – Armandas Feb 25 '12 at 14:45
• I'm not using ULink as my debugger, I'm using simulator – Rick Ant Feb 27 '12 at 1:32
• So I need to have ULink or Jlink and the board..? – Rick Ant Mar 12 '12 at 12:30
• @RickAnt - you should not accept an answer that does not solve your problem. – Chris Stratton Nov 10 '15 at 16:05

If you want to use the simulator:

• select the simulator in project properties on the debug page
• start a debugging session. Don't run the code yet
• go to Debug -> Memory Map... and manually map the ranges the simulator cannot find.

For example:

• Welcome to EE.SE, this is not a forum. Your answer is better suited as a comment as it doesn't aim to solve the given question. – Funkyguy Aug 20 '15 at 19:29
• This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Daniel Grillo Aug 20 '15 at 20:39
• @DanielGrillo - actually, this is an attempted answer to the specific part of the poster's question which concerned their inability to enact a map. Doing so may or may not solve the problem, but this is an entirely appropriate response to the question. – Chris Stratton Nov 10 '15 at 16:03
• @ChrisStratton Have you seen it before Dmitry's edition? Now is much better to understand but at that time I couldn't. – Daniel Grillo Nov 10 '15 at 17:01
• The information content was the same. Both before and after the edit, the answer is targeted at someone knee-deep in the problem, not an uninvolved reader. – Chris Stratton Nov 10 '15 at 17:04