This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Access violation at 0xFFFFFFF4

Hi,
I am new in ARM programming using keil.I tried to debug a sample code in the keil compiler but I have this error when i pressed f7:
Error 65: access violation at 0xFFFFFFF4.I saw the thread to solve this issue. some body said I should add following line to my ini file:
MAP 0x40000000, 0x40001FFF Read Write

I have done it but the Error 65: access violation at 0xFFFFFFF4 is appeared again.
which place i should be add above code to my ini file ?
my ini code is like this:
BREAKPOINTS]
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile=""
MAP 0x40000000, 0x40001FFF Read Write
[FLASH]
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 0
Device="AD7160"
[GENERAL]
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
[SWO]
SWOLogFile=""
[MEM]
MAP 0x40000000, 0x40001FFF Read Write EXEC
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF

What should i do to solve this problem .I would like to debug lines of my code step by step.

I would be grateful if you can answer this question

thanks
Mohsen

Parents
  • Hello mohsen Gholami,

    I am assuming you are using uVision simulator to debug code for a Cortex-M device.
    As you know do Cortex-M devices fetch the PC at address 0x0 after reset. But some of the Cortex-M devices do not have Flash at address 0x0. In this case the Flash area is remapped to address 0x0.

    In Options for Target - Debug - 'Simulator section' CPU DLL you can add "-REMAP" to Parameter.
    This will automatically remap the code from the specified Flash area (IROM1) to address 0x00000000.

    But be aware that some devices are not simulated and also the address space for the peripherals are not mapped. To map the periperal address space you need an INI file which does this mapping.

    Use command MAP.

    MAP 0x40000000, 0x40001FFF Read Write // map peripherals

    Best Regards,
    Martin Guenther

Reply
  • Hello mohsen Gholami,

    I am assuming you are using uVision simulator to debug code for a Cortex-M device.
    As you know do Cortex-M devices fetch the PC at address 0x0 after reset. But some of the Cortex-M devices do not have Flash at address 0x0. In this case the Flash area is remapped to address 0x0.

    In Options for Target - Debug - 'Simulator section' CPU DLL you can add "-REMAP" to Parameter.
    This will automatically remap the code from the specified Flash area (IROM1) to address 0x00000000.

    But be aware that some devices are not simulated and also the address space for the peripherals are not mapped. To map the periperal address space you need an INI file which does this mapping.

    Use command MAP.

    MAP 0x40000000, 0x40001FFF Read Write // map peripherals

    Best Regards,
    Martin Guenther

Children