You are on page 1of 4

TN_001

<Memory Dump Using LPC-Link2>


KEY WORDS: < LPC-Link2, Flash, MCU, Memory>

PROBLEM DESCRIPTION
There are usually some time developer wants to check or dump the internal memory contents of MCU.
One way to achieve this without the GUI IDE is using the LPC-Link2 debugger board.
The NXP official external debugger for LPC MCU serial is LPC-Link2 board, which is LPC4370 based and supports both
CMSIS-DAP and JLINK protocol.
Detail of this board can be found on below link.
http://www.nxp.com/products/software-and-tools/nxp-designs-reference-design-library/nxp-designs/lpc-link2:OM13054?

ANALYSIS
Three major steps for MCU memory dump are:
1. Program the LPC-Link2 with Jlink image using LPCScrypt which is an integrated flash and security programming
tool for LPC microcontrollers.
LPCScrypt can be downloaded on below link.
http://www.nxp.com/products/software-and-tools/software-development-tools/software-tools/lpc-microcontroller-
utilities/lpcscrypt-v1.8.0:LPCSCRYPT
After installation, there are user guides on the installed directory.

User can refer to these docs on how to program Jlink image to LPC-Link2 board.
2. Download and install the latest Jlink software from Segger if you don’t have it in your PC.
https://www.segger.com/downloads/jlink
After successful installation, the Jlink tools can be seen in the installed directory.

3. Connect LPC-Link2 to your host PC and target board via USB and SWD or JTAG, then power on the target board.
Launch Jlink.exe to establish communication with target MCU.
TN_001
a) Firstly, the LPC-Link2 should be detected by Jlink tool as below.

b) Type “Connect” and “?” in the cmd line to select the target MCU.

c) Select related target interface (SWD or JTAG) and speed.


TN_001

d) Then the MCU core should be found as blelow.

e) Use “savebin [file_name] [start_addr] [size]” to dump the desired memory contents.
Eg. savebin D:\memoryDump.bin 0 100 //dump 100 Byte size flash from address 0 to file memoryDump.bin
TN_001

f) After successful dump, the memoryDump.bin file can be found in the specified directory with memory contents
in it.

CONCLUSION AND SUGGESTIONS


LPC-Link2 is a powerful debug tool that can be used for memory dump without IDE support.
This useful feature facilitates the developer on in-field debugging and analysis.

You might also like