MPLAB-X Tricks

Starting a new project: Select standalone project then the microcontroller and XC32 compiler. To add a new assembly file: Right click on "Source Files" -> new -> assemblyfile.s. To add additional files (i.e. crt0.S) right click on "Source Files" and click on "Add existing item".

To disable default startup code: right click on the project -> Properties -> xc32-ld -> Libraries -> Check do link startup code

To set the configuration bits: open "Window" -> "PIC memory views" -> "Configuration bits". Set the bits as desired then "Generate source code" and paste this into a new .c file in the project.

To debug the program: Debug -> debug main project