14.17.7 External Flash Memory

The External Flash Memory window displays the contents of external memory.

A secure boot-loader is used to download the custom firmware image from the system’s shared external SPI Flash device, thereby allowing system designers to customize the device’s behavior.

Figure 14-62. External Flash Memory

External Flash Memory Display

To see external memory contents in this window:

  • Allocate functions/variables to external memory in your code - see the MPLAB XC32/XC32++ C Compiler User’s Guide (DS-50001686) for details.
  • Load symbols - File > Properties > Loading, check Load symbols when programming or building for production (slows process).
  • Compile your code - Build the project.

You may specify how memory is displayed in the window by selecting from the Format drop-down box on the bottom of the window:

Code Format

This window will have the following columns:

  • Line – Reference line number corresponding to memory address.
  • Address – Physical hexadecimal address of the opcode.
  • Opcode – Hexadecimal opcode, shown in 4-byte blocks
The opcode that is highlighted represents the current location of the program counter.
  • Label – Opcode label in symbolic format.
  • Disassembly – A disassembled version of the opcode mnemonic.

Data Format

This window will have the following columns:

  • Address – Hexadecimal address of the data in the next column.
  • Data Blocks – Hexadecimal data, shown in 4-byte blocks.
  • ASCII – ASCII representation of the corresponding line of data.

External Flash Memory Icons

Icons are located on the left side of the window.

Table 14-71. External Flash Memory Window Icons
Icon Icon Text Function
Find Specify a string to find in the window. Select to match whole word or case.
Find Next Find next instance of string from Find.
Find Previous Find previous instance of string from Find.
Go To Go to specified line number or address.

External Flash Memory Menu

Right click in the memory window data area set to CODE FORMAT to pop up this menu. Not all items may be visible for all 32-bit MCUs.

Table 14-72. External Memory Window Context Menu - Code Format
Item Description
Set Memory Region Select addresses for display. See your device data sheet for details.
Run to Cursor Run the program to the current cursor location.
Step Instruction Perform a step instruction.
Set PC at Cursor Set the Program Counter (PC) to the cursor location.
Focus Cursor at PC Move the cursor to the current PC address and centers this address in the window.
Toggle Breakpoint Toggle (on/off) existing breakpoint.
Symbolic Mode Display disassembled hex code with symbols.
Fill Memory Fill memory from Start Address to End Address with the value in Data.

Specify other options in the Fill Memory dialog.

Go To Go to the address/function specified using the Go To dialog.
Go To Source Line Go to the corresponding line in source code in the editor.
Find Find text specified using the Find dialog.
Output To File Write the displayed window contents to a text file using the Output to File dialog.
Print Print the contents of this window using the Print dialog.
Note: If you have a large memory device, the number of pages printed can become very large. A suggestion is to print the window contents to a file (Print dialog, General tab, Print to File check box) and then select which pages from the file you need to print.
Automatically Adjust Table Columns Adjust the columns automatically.
Adjust Table Columns Adjust the columns manually.

Right click in the memory window data area set to DATA FORMAT to pop up the menu. Not all items may be visible for all 32-bit MCUs.

Table 14-73. External Memory Window Context Menu - Data Format
Item Description
Fill Memory Fill memory from Start Address to End Address with the value in Data.

Specify other options in the Fill Memory dialog.

Go To Go to the address/function specified using the Go To dialog.
Find Find text specified using the Find dialog.
Output To File Write the displayed window contents to a text file using the Output to File dialog.
Import Table Import tabular data from a file into a Memory window using the Import Table dialog.
Export Table Export tabular data from a Memory window into a file using the Export Table dialog.
Print Print the contents of this window using the Print dialog.
Note: If you have a large memory device, the number of pages printed can become very large. A suggestion is to print the window contents to a file (Print dialog, General tab, Print to File check box) and then select which pages from the file you need to print.
Adjust Table Columns Adjust the columns automatically.