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:
It is quite obvious actually, once you found it.
- The map file is generated by the Linker, so open the Project Configuration dialog box and select the XC16 linker
- 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.
- 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).
- Build the Project, and Voila’! The map file is deposited in your project main directory.
- Have fun browsing around it.