(NEED HELP) Change some files on ArduPilot and compile it

Hi,
I’m using PXFMINI (erlerobotics production) on raspberry Pi 3 and installed escarlata on it.
How can I change ArduPilot codes and compile it to not access PWMs via I2C?
I want to write my own Controller to drive a drone. I’m using imu data with ROS, and I want to access PWMs myself with PCA9685 that embedded on PXFmini .

If there is another way to access PWMs or motors speed from ROS or somthing else please tell me.

Read the developer information on ardupilot.org it explains how to compile the code.

I know how to compile it, I want to know how change the code to not access to PWMs.

Can I compile ArduPilot to just send sensors data?