Keil Logo

µVISION DEBUGGER: Debug issue on NXP LPC4300 using SPIFI memory


Information in this knowledgebase article applies to:

  • MDK-ARM Version 5
  • ULINK Debug Adapter
  • Software Pack: Keil.LPC4300_DFP

QUESTION

I am using the MDK-ARM Version 5.xx together with the ULINKpro Debug Adapter to work on a NXP LPC4357 device. I want to flash my application into and boot from the SPIFI memory. When I try to debug my application it fails with:

Cannot access Memory (@ 0x00000000, Read, Acc Size: 4 Byte)
Cannot access Memory (@ 0x00000002, Read, Acc Size: 2 Byte)
Cannot access Memory (@ 0x00000002, Read, Acc Size: 2 Byte)
Cannot access Memory (@ 0x00000002, Read, Acc Size: 2 Byte)
Cannot access Memory (@ 0x00000004, Read, Acc Size: 4 Byte)

How can I solve this problem?

ANSWER

The errors shown above usually happen when the target device did not successfully boot your application from the SPIFI memory. When this happens, the debugger cannot access the corresponding memory on your target device.

In order to make sure your target device boots from the SPIFI memory instead of other memory (such as the internal Flash memory etc.), using the MCB4300 evaluation board as an example, please check the following two points:

  • Check the boot jumper settings. -- Please refer to this application note NXP LPC4300: Cortex-M4/M0 Hands-On Lab to setup the correct jumper on the board to boot your application from SPIFI memory.SPIFI Setting on MCB4300
  • The board might be booting from internal Flash. -- The LPC4357 ignores the boot jumper settings if the internal Flash contains a valid program (determined by a checksum of the vector table). Your program downloads to SPIFI Flash properly, but when the debugger resets the device, it boots from internal Flash resulting in the "Cannot access Memory..." message.
    To correct this, use the Pack Installer to load a different µVision project (e.g. Blinky) to internal Flash, so that the proper Flash algorithms for the on-chip Flash is selected. Then, just click Flash - Erase to erase the internal Flash.
    The device should now boot according to your boot jumper setting when you start the debugger.

There is also a known problem in MDK-ARM Version 5.14 together with the SPIFI flash memory of the NXP devices which causes these "Cannot access Memory..." errors during debugging. Please refer to this knowledgebase article for more information: µVision DEBUGGER: Debug Issues with NXP LPC4300 SPIFI Devices

MORE INFORMATION

See also

Last Reviewed: Wednesday, September 28, 2016


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.