How to use emIDE


Debugging with emIDE and J-Link - The J-Link Memory Window

The J-Link Memory Window allows reading and writing the target's memory.
It features automatic refresh of the displayed memory, as well as colored highlighting of changes.
The Memory Window can be used to debug memory-realted problems, like stack overflows, to view large byte array or peripheral registers, or to change variable values and memory content.

Overview

Memory area: The memory area shows the start address of the memory in the current line, followed by the memory content, displayed in hexadecimal and with the selected size of Bytes, half Words or Words, and the Bytes represented as ASCII.

Change highlighting: The shown memory is read when the application halts. It can also be updated manually or in a selectable interval of 100 to 10000 milli seconds. If the memory content changes, the changes will be highlighted in three different levels.
Area "C" shows the three levels of change highlighting.

Level 1:
Value has just changed.
Level 2:
Value changed the previous time it was updated.
Level 3:
Value changed the second-previous time.

Going through memory: The memory area can easily be scrolled through the complete memory (0x00000000 to 0xFFFFFFFF) with the scrollbar, the mousewheel or the keyboard. To easily go to a specific address, the address can be entered in the text field.

Toolbar and Contextmenu

With the toolbar on top of the Memory Window and the right-click contextmenu, the memory area can be configured. Following functions are available:

Go to address: To jump to a specific address, enter an address in the text field and click the "go to" button in the toolbar ("1" in screenshot), or right-click in the memory area and select Go to Address in the context menu to open the address input dialog.

Change memory display size: The memory can be displayed in Bytes, half Words (2 Bytes) and Words (4 Bytes). To change the display, click on the '1'-, '2'- or '4'-button in the toolbar ("2" in screenshot) or select the desired display size in the right-click contextmenu.

Refresh memory: The memory content is automatically updated when the application stops. To update the memory while the target is running, too, click on the auto refresh button in the toolbar ("3" in screenshot) or 'Auto refresh' in the contextmenu. Enter the refresh interval (in milli seconds) in the input dialog and click OK.
To manually trigger an update, click the refresh botton ("4" in screenshot).
Right of the refresh buttons, the current state of auto refresh is displayed.

Memory area

The memory area allows viewing and writing of the target memory.

Going through memory: To easily scroll through the target memory, the scrollbar or the mousewheel can be used. After clicking inside the memory area, the keyboard Page Up and Page Down keys can also be used to scroll to the previous / next memory.
Unread or unreadable memory is indicated with "--". Area "A" shows unread memory.

Writing memory: The target's memory content can be written through the Memory Window. By clicking inside the memory area, the cursor can be set to the clicked position in memory. The cursor can be moved by the Arrow keys of the keyboard.
The marked Byte under the cursor can be written. Allowed keys are 0-9 and A-F.
Changes which are not written to the target, yet, are printed red. Area "B" shows unwritten Bytes.

Please note: Writing to unreadable memory is not possible.
Writing the flash content of the target might cause unwanted behavior.