Pic32mz issues with free RTOS

This might be a long shot, but maybe give this suggestion a try?

I would be very curious if this helps resolve the problem you are seeing.