Hi, I am using the Keil uVision 5 simulator for debugging my LPC1768 code..
When I run the simulator, I get the following error. I tried with simple LED blink program, I get the same error.
*** error 65: access violation at 0xFFFFFFF4 : no 'write' permission
I have seen quite a few threads already on this topic.
1. Some suggested to use a REMAP flag in cpu dll parameter box, I even tried that but no success.
2. Or to use an ini file to MAP address 0x40000000 to 0x400FFFFF as read write. (This is actually APB bus address according to the datasheet and it is already mapped correctly I checked in the debugger Memory Map.
So there is no success so far. Please help if anyone has come across this error.
Another thing, I found obvious about the error is the address at which it reports violation. In the datasheet this address (0xE0100000 - 0xFFFFFFFF) is marked as reserved and clearly mentioned that access to reserved memory may result bus faults. I fail to understand why would a simple LED code even try to access that region or Could it be the startup file??
One more thing, I tried was to create a new project and I was able to run the simulator with same program. But after two three times, it resorts to same issue. This is quite weird. May be not something obvious.
Thanks.
I found the issue, though I don't know how to resolve it. The problem is with ROM settings for the target. My device uses the usb bootloader which is stored at 0x0000 to 0x2000 so I changed the IROM1 address base from 0x0 to 0x2000.
This somehow changes the default base address of SP from 0xFFFFFFFF to 0xFFFFFFE0 and since this falls under reserved area, I get access violation error.
If I change IROM1 base address back to zero and build the code with first uncheck and then recheck "Use Memory map layout from target dialog" option in the linker tab.
OR
Simply If I never check "Use Memory map layout from target dialog" option in the linker dialog. Then error never comes irrespective IROM1 address values.
May be you can throw some light on why the SP is changed depending on the IROM1 address settings.