Generating Map files with MPLAB X

I started using MPLAB X since the very first betas were made available so I have eventually acquired a little confidence with the tool. Occasionally though I can still find myself hunting around for a feature/configuration parameter that is not where it used to be (in MPLAB 8). Eventually it just takes a little random probing around in the configuration dialog boxes and the many sub-panes… it’s all there!

Generating a Map file with the XC16 compiler is one those cases and the picture below tells you all:

Linker Diagnostics Dialog

It is quite obvious actually, once you found it.

  1. The map file is generated by the Linker, so open the Project Configuration dialog box and select the XC16 linker
  2. Now (here is the trick) notice there are multiple “Options Categories” and you need to select the “Diagnostics” one from the combo box. This will update the options pane and fill it with a new list of options.
  3. Modify the text field labeled “Generate Map File”  (obvious) but, here is another tricky step, if you find it already filled with some macro names that might hint at your project file name: Don’t trust them! Erase the text field content and type by hand your desired map file name (.map extension included).
  4. Build the Project, and Voila’! The map file is deposited in your project main directory.
  5. Have fun browsing around it.
This entry was posted in PIC24, PIC32, Tips and Tricks, Tools. Bookmark the permalink.