I'm very new to the PIC32MZ DA and XC32 (Using in the pass the PIC18 in asm) and I'd like to play with the on-board three led and switches as a start.
I have a PIC32MZ2064DAA288, MPLAB 5.05, XC32 2.10 on WIN7 (No Harmony install yet)
But so far I can't find anything for this PIC32MZ DA. So I have only two lines to start it: #include <xc.h> and main () { } (Simple enough ah! ah! ah!

The "make and program device" work OK: "Programming/Verify complete"
and "run project too": "Programming completed Running target..."
So far so good.
But when I try to DEBUG PROJECT I always get: The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
So I copy the "configuration bits" from the output window, but I'm always still having this warning.
So I have a 2 folds questions
1: What is the most used directives to include in my setup.
2: How can I read the registers (Like the one on oscillator, i2c, rtcc etc.)
Thanks to all that reply, cause I'm kind of stuck right now.