STM32 Nucleo as a Pixhawk for 25 euros

Attaching these two boards together would provide pretty much the same as Pixhawk:
3D accelometer, 3D gyroscope, 3D magnetometer, pressure , temperature and humidity sensor, 180 Mhz, FPU and so on.
The total cost would be about 25 euros plus shipping (free from Mouser with orders over 50 euros).

So, for the price of an entry level racer board, you would get a Pixhawk.

Could it be possible to port the code for this setup? Would it work?