Porting PX4 to a new NuttX-based board

Hi all, I’d like to port PX4 to our own STM32F7-based board.
So far, we managed to port NuttX with PWM, SPI, UART, … support to our board.

What do we need to do now to build PX4 for our NuttX board?
We already followed the PX4 Porting Guide and created a similar folder structure like in px4/fmu-v5.

However, I do not understand your CMake build system:
How exactly does px4_add_board work?

We only want to add some high-level drivers from PX4 like barometer or acceleration sensors.
Since we already added PWM and SPI drivers from NuttX, we do not need any STM32 or NuttX-specific drivers from PX4 any more.

In other words, we would like to keep our NuttX OS as separate from PX4 as possible, since PX4 is only the application running on NuttX.

For reference, our current board config can be seen here.