Scratch FC build with PX4

I am building an FC from scratch, and want to know if PX4 will work on a custom flight controller?
I want to build the flight controller, build the ESC’s, and use a raspberry pi as a companion computer, for advanced options.
i would like to use PX4, MAVLink, and QGroundControl as the basic software, and am developing in MatLab. My question is this concept possible with these specifications and choices ?
Then i will choose apropriate hardware to facilitate the project.

I would recommend you to watch this video to get more information:

Thanks. I will look into it, ive started a smaller project for preparation.