XC800 8-Bit Microcontroller Family: Which JTAG port should I use?
There is just one physical JTAG module. The default port is P0.x; you should use this one if you can. For P5 you can only debug after software (SW) has properly reconfigured the ports from P0 to P5. So you cannot debug directly after RESET. There is not a lot of customer usage for JTAG on P5.