7.3.1 Map File Generation

If compilation is being performed via MPLAB X IDE, a map file is generated by default. If you are using the driver from the command line, use the -Wl,-Map option to request that the map file be produced (see 4.6.11.8 Wl: Pass Option To The Linker, Option). Map files are typically assigned the extension .map.

Map files are produced by the linker application. If the build is stopped before the linker is executed, then no map file is produced. A map file is produced, even if the linker generates errors and this partially-complete file can help you track down the cause of these errors. However, if the linker did not run to completion, due to too many errors or a fatal error, the map file will not be created. You can use the -fmax-errors driver option to increase the number of errors allowed before the linker exits.