PROGRAM MEMORY WINDOW

8.8 PROGRAM MEMORY WINDOW

The Program Memory window displays locations in the range of program memory for the currently selected processor. If external program memory is supported by the selected device and enabled, it will also appear in the Program Memory window.

• Program Memory Window Display • Program Memory Window Menu • Program Memory Window FAQ

8.8.1 Program Memory Window Display

You may change the way opcodes are displayed in the program memory window by clicking on one of the buttons on the bottom of the window:

• Opcode Hex • Machine or Symbolic • PSV Mixed (dsPIC devices only) • PSV Data (dsPIC devices only)

8.8.1.1 OPCODE HEX This format displays program memory information as hex code. The window will have

the following columns: • Address – Hexadecimal address of the opcode in the next column.

• Opcode Blocks – Hexadecimal opcode, shown in 2- or 3-byte blocks. For most PICmicro MCU's these blocks represent words. For PIC18CXXX devices, the blocks represent 2 bytes. For dsPIC devices, the blocks represent 3 bytes.

The opcode block that is highlighted represents the current location of the program counter.

• ASCII – ASCII representation of the corresponding line of opcode.

8.8.1.2 MACHINE OR SYMBOLIC Machine format displays disassembled hex code with no symbolic information.

Symbolic format displays disassembled hex code with symbols. The window will have the following columns:

• Debug Info – Information useful for debugging. A pointer shows the current location of the program counter.

• Line – Reference line number • Address – Opcode hexadecimal address. • Opcode – Hexadecimal opcode, shown in 2- or 3-byte blocks. For most PICmicro

MCU's these blocks represent words. For PIC18CXXX devices, the blocks represent 2 bytes. For dsPIC devices, the blocks represent 3 bytes.

• Label (Symbolic Only) – Opcode label in symbolic format. • Disassembly – A disassembled version of the opcode mnemonic.

DS51519A-page 110

 2005 Microchip Technology Inc.

MPLAB IDE Windows

8.8.1.3 PSV MIXED (dsPIC DEVICES ONLY) This format displays program memory as opcode and the PSV area (CORCON

register, PSV bit set). The window will have the following columns: • Debug Info – Information useful for debugging. A pointer shows the current

location of the program counter. • Line – Reference line number. • Address – Opcode hexadecimal address. • Opcode – Hexadecimal opcode, shown in 3-byte blocks. • PSV Address – Data space hexadecimal address of the opcode. • Data – Opcode formatted as data. • Label – Opcode label in symbolic format. • Disassembly – A disassembled version of the opcode mnemonic.

For more information on dsPIC devices, see dsPIC30F Family Reference Manual (DS70046).

8.8.1.4 PSV DATA (dsPIC DEVICES ONLY) This format displays program memory as file registers, for when program space is

visible in data space (CORCON register, PSV bit set). The window will have the following columns:

• Address – Program space hexadecimal address of the data. • PSV Address – Data space hexadecimal address of the data. • Data Blocks – Hexadecimal data, shown in 3-byte blocks.

The data block that is highlighted represents the current location of the program counter.

• ASCII – ASCII representation of the corresponding line of data. For more information on dsPIC devices, see dsPIC30F Family Reference Manual

(DS70046).

8.8.2 Program Memory Window Menu

Below are the menu items in the Program Memory right mouse button menu. • Close

Close this window. • Set/Remove Breakpoint (Machine/Symbolic Only) Set or remove a breakpoint at the currently-selected line. • Enable/Disable Break (Machine/Symbolic Only)

Enable or disable a breakpoint at the currently selected line. • Breakpoints Disable, enable or remove all breakpoints. • Run To Cursor Run the program to the current cursor location. Formerly Run to Here. • Set PC at Cursor Set the program counter (PC) to the cursor location. • Center Debug Location Center the current PC line in the window. • Cursor Tracks Debug Location Cursor (arrow) will track the current debug location.

 2005 Microchip Technology Inc.

DS51519A-page 111

MPLAB ® IDE User’s Guide

• Find Find text specified in the Find dialog in this window. • Find Next Find the next instance of Find text. F3 repeats the last Find. Shift+F3 reverses the direction of the last Find.

• Go To Go to the address specified in the Go To dialog. • Import Table Open the Import dialog (see Section 9.8 “File Management Dialog”.) “Opcode

Hex” must be selected for this item to be available. • Export Table Open the Export As dialog (see Section 9.8 “File Management Dialog”.)

“Opcode Hex” must be selected for this item to be available. • Fill Memory Fill memory from Start Address to End Address with the value in Data. See

Section 9.9 “Fill Memory/Registers Dialog”. • Output to File Write the displayed window contents to a text file. Uses a Save As dialog (see

Section 9.8 “File Management Dialog”), with the addition of an “Output Range”. Select the type of range, either “Lines” or “Address”, and then enter the “Start” and “End” values to output.

• Print Print the contents of the window. • Refresh Refresh the data in this window. • Properties Set up window properties. See Section 9.17 “Properties Dialog”.

8.8.3 Program Memory Window FAQ

How do I: • Enable external (off-chip) memory, for parts that support this?

Select Configure>External Memory. In the External Memory dialog, check “Use External Memory”, enter a range and click OK. External Memory will now appear in the Program Memory window.

Note: For some tools, you may actively have to upload external memory to MPLAB IDE before values will appear in the window.

• Fill program memory with a value? Right-click in the window and select “Fill Memory” to open a dialog where you may enter fill data.

• Set a breakpoint? See Section 3.18 “Using Breakpoints”.

DS51519A-page 112

 2005 Microchip Technology Inc.

MPLAB IDE Windows