Using Arduino mega2560 or STM32F429(cortex M4)


I want to study and analyze Ardupilot open source to make my own drone.

So, I was wondering if I could use Arduino mega 2560 to make my own drone with Ardupilot open source(APM2.x).

If it is okay, I would like to use STM32F429.

I’m asking this because I don’t want to use complete product like APM 2.6 or 3DR Pixhawk.

I’m very open to any advice you suggest since I don’t know much about Ardupilot.

Thank you,
With respect,
Wonhee Lee