diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1c3d964735c53e769dbc9dfe9bcc9cdac7cea29..1dd8091769404965021cc4b7570112f38b7270f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -417,7 +417,7 @@ add_library(parameters_interface INTERFACE)
 include(px4_add_library)
 add_subdirectory(src/lib EXCLUDE_FROM_ALL)
 
-add_subdirectory(src/platforms/common EXCLUDE_FROM_ALL)
+add_subdirectory(src/platforms EXCLUDE_FROM_ALL)
 add_subdirectory(src/modules/systemlib EXCLUDE_FROM_ALL) # TODO: split into libraries in platform layer
 add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
 add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
diff --git a/boards/airmind/mindpx-v2/src/CMakeLists.txt b/boards/airmind/mindpx-v2/src/CMakeLists.txt
index 80cdd8bd7a5389e1b695be615d9802cb2dca7bad..4fbd7b3f50559960c2f3a4498ac9b73bddb820bd 100644
--- a/boards/airmind/mindpx-v2/src/CMakeLists.txt
+++ b/boards/airmind/mindpx-v2/src/CMakeLists.txt
@@ -43,8 +43,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/airmind/mindpx-v2/src/init.c b/boards/airmind/mindpx-v2/src/init.c
index a30f01f80a2a415139d62b0ab4099f9e2895176b..de16f44165c895f49a4e398d45f33b5f76ba09b5 100644
--- a/boards/airmind/mindpx-v2/src/init.c
+++ b/boards/airmind/mindpx-v2/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -72,12 +71,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-
-
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -238,26 +232,7 @@ static struct sdio_dev_s *sdio;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -265,11 +240,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/atmel/same70xplained/src/CMakeLists.txt b/boards/atmel/same70xplained/src/CMakeLists.txt
index 4748379aead62241b897f6e289c1f23a4b265ae4..e67d62209644edec5f463ca48ae2cdb85d8d1fe8 100644
--- a/boards/atmel/same70xplained/src/CMakeLists.txt
+++ b/boards/atmel/same70xplained/src/CMakeLists.txt
@@ -44,8 +44,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/atmel/same70xplained/src/init.c b/boards/atmel/same70xplained/src/init.c
index a200e3a639b56e4798085bcddc3f2ff74bdc3030..19a96ebe40b844923b6d6f23cec825f0aff72d7f 100644
--- a/boards/atmel/same70xplained/src/init.c
+++ b/boards/atmel/same70xplained/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -74,11 +73,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -237,24 +233,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 
 	/* configure power supply control/sense pins */
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -262,11 +242,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 
 	/* initial LED state */
 	drv_led_start();
diff --git a/boards/auav/esc35-v1/src/CMakeLists.txt b/boards/auav/esc35-v1/src/CMakeLists.txt
index 0a54e8eab599f18654347ca1817cfb7ee0c8a71e..db702078c809bc3a21d8c36b01c3648e76cc067f 100644
--- a/boards/auav/esc35-v1/src/CMakeLists.txt
+++ b/boards/auav/esc35-v1/src/CMakeLists.txt
@@ -42,6 +42,5 @@ px4_add_library(drivers_board
 )
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/auav/esc35-v1/src/init.c b/boards/auav/esc35-v1/src/init.c
index 807e86715567a920a19b2c12aa111b474f0d3a59..a87f0c51c305d54c86ec686cb6b60652fe663193 100644
--- a/boards/auav/esc35-v1/src/init.c
+++ b/boards/auav/esc35-v1/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -68,8 +67,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 #endif
@@ -162,24 +160,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 {
 	int result = OK;
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
 
-	param_init();
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/auav/x21/src/CMakeLists.txt b/boards/auav/x21/src/CMakeLists.txt
index 93fb657702dea5061bcf7b79d1fe87df566bb3a6..81a1b344af9120feb3eb32d4438e5ca3b3718b2f 100644
--- a/boards/auav/x21/src/CMakeLists.txt
+++ b/boards/auav/x21/src/CMakeLists.txt
@@ -42,8 +42,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/auav/x21/src/init.c b/boards/auav/x21/src/init.c
index 0f25f1f9cdcba85bebe4e02797c76650a71ffcdc..069a32d2da092e000ee45e3419113c15e0c0c728 100644
--- a/boards/auav/x21/src/init.c
+++ b/boards/auav/x21/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -72,11 +71,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -255,24 +251,8 @@ static struct sdio_dev_s *sdio;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -280,11 +260,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/av/x-v1/src/CMakeLists.txt b/boards/av/x-v1/src/CMakeLists.txt
index 360e888a5ee3ad8291779c9236cef389302af1f7..4a80e72d5bfaff3c6d52f401edea5867728c4279 100644
--- a/boards/av/x-v1/src/CMakeLists.txt
+++ b/boards/av/x-v1/src/CMakeLists.txt
@@ -41,8 +41,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
\ No newline at end of file
diff --git a/boards/av/x-v1/src/init.c b/boards/av/x-v1/src/init.c
index fba376cbf4b2528004e62dd7b27a79bd18ecd011..1b98b2577061fd5d26d440485860b06a33a478d7 100644
--- a/boards/av/x-v1/src/init.c
+++ b/boards/av/x-v1/src/init.c
@@ -55,7 +55,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -75,11 +74,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 #include <px4_i2c.h>
 
 #include "up_internal.h"
@@ -209,13 +205,7 @@ stm32_boardinitialize(void)
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-	/* run C++ ctors before we go any further */
-	up_cxxinitialize();
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -223,11 +213,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		PX4_ERR("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/bitcraze/crazyflie/src/CMakeLists.txt b/boards/bitcraze/crazyflie/src/CMakeLists.txt
index 4505fd107a4f5a8837b56e2e32650b41550226a6..4e1d54ac1e8c1baa03f40a6905e18d48b11d0dcc 100644
--- a/boards/bitcraze/crazyflie/src/CMakeLists.txt
+++ b/boards/bitcraze/crazyflie/src/CMakeLists.txt
@@ -41,6 +41,5 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/bitcraze/crazyflie/src/init.c b/boards/bitcraze/crazyflie/src/init.c
index af82f8b5cef020767d62b25162519c94a22ec431..45b317ea6cec79065b5f888699d664431dae711e 100644
--- a/boards/bitcraze/crazyflie/src/init.c
+++ b/boards/bitcraze/crazyflie/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/analog/adc.h>
 #include <nuttx/spi/spi.h>
@@ -68,9 +67,7 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <systemlib/err.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -149,29 +146,8 @@ stm32_boardinitialize(void)
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
-
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/gumstix/aerocore2/src/CMakeLists.txt b/boards/gumstix/aerocore2/src/CMakeLists.txt
index 93fb657702dea5061bcf7b79d1fe87df566bb3a6..81a1b344af9120feb3eb32d4438e5ca3b3718b2f 100644
--- a/boards/gumstix/aerocore2/src/CMakeLists.txt
+++ b/boards/gumstix/aerocore2/src/CMakeLists.txt
@@ -42,8 +42,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/gumstix/aerocore2/src/init.c b/boards/gumstix/aerocore2/src/init.c
index 4ba03da035762c0ec9848dda3e24eafa84dda828..ad1bf89b8cee7837a27167399a7e832772d547cf 100644
--- a/boards/gumstix/aerocore2/src/init.c
+++ b/boards/gumstix/aerocore2/src/init.c
@@ -53,7 +53,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -68,11 +67,8 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -206,24 +202,7 @@ static struct spi_dev_s *spi4;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#       if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#               error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#       endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -231,11 +210,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/intel/aerofc-v1/src/CMakeLists.txt b/boards/intel/aerofc-v1/src/CMakeLists.txt
index c0ca8bf5d64089c0c5fa7e236396f06582b363e9..f1e4250994bd7eab0e933a04206e09479d86bfe7 100644
--- a/boards/intel/aerofc-v1/src/CMakeLists.txt
+++ b/boards/intel/aerofc-v1/src/CMakeLists.txt
@@ -41,7 +41,6 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
-		parameters # param_init
-		modules__dataman # dm_flash_sector_description_set
+		px4_layer
+		modules__dataman # dm_flash_sector_description_set # TODO: fix this
 )
diff --git a/boards/intel/aerofc-v1/src/init.c b/boards/intel/aerofc-v1/src/init.c
index 245802a1fbe5aa1274a7ac72f585925d64829b17..b4ae07bb0a1ef3b5e32c65bc6df600da1bd499fe 100644
--- a/boards/intel/aerofc-v1/src/init.c
+++ b/boards/intel/aerofc-v1/src/init.c
@@ -55,7 +55,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/analog/adc.h>
 
@@ -70,9 +69,7 @@
 #include <dataman/dataman.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <systemlib/err.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 # if defined(FLASH_BASED_PARAMS)
 #  include <parameters/flashparams/flashfs.h>
@@ -175,29 +172,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 	/* the interruption subsystem is not initialized when stm32_boardinitialize() is called */
 	stm32_gpiosetevent(GPIO_FORCE_BOOTLOADER, true, false, false, _bootloader_force_pin_callback, NULL);
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
-
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/nxp/fmuk66-v3/src/CMakeLists.txt b/boards/nxp/fmuk66-v3/src/CMakeLists.txt
index 6c08faf65a258324b52c3557bdf382d57e56d44e..c559f9b9adbd78fd9a0168254882295c50f12128 100644
--- a/boards/nxp/fmuk66-v3/src/CMakeLists.txt
+++ b/boards/nxp/fmuk66-v3/src/CMakeLists.txt
@@ -45,9 +45,8 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
 		drivers__led # drv_led_start
-		parameters # param_init
+		px4_layer
 	)
\ No newline at end of file
diff --git a/boards/nxp/fmuk66-v3/src/init.c b/boards/nxp/fmuk66-v3/src/init.c
index c9fbdce894e98201bc0dfa55a6f43187b659a475..9699f32291af60fc7d643f3e0a8bc9b1fb218c06 100644
--- a/boards/nxp/fmuk66-v3/src/init.c
+++ b/boards/nxp/fmuk66-v3/src/init.c
@@ -53,7 +53,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -73,9 +72,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
+
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -278,24 +276,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 
 	VDD_ETH_EN(true);
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	param_init();
 
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -303,11 +285,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 #ifdef SERIAL_HAVE_DMA
 	static struct hrt_call serial_dma_call;
diff --git a/boards/omnibus/f4sd/src/CMakeLists.txt b/boards/omnibus/f4sd/src/CMakeLists.txt
index 3d8de289cc2c8fde18e3ceff73599099a2e55baf..bf72b7efcd225cea806fb7eee476f14143515383 100644
--- a/boards/omnibus/f4sd/src/CMakeLists.txt
+++ b/boards/omnibus/f4sd/src/CMakeLists.txt
@@ -42,8 +42,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/omnibus/f4sd/src/init.c b/boards/omnibus/f4sd/src/init.c
index ec9b87d87b3a43506e5a11431b2dc1e1e18ed5ec..846407ca73583e6cf40e62abbe58feb8e4d0f33f 100644
--- a/boards/omnibus/f4sd/src/init.c
+++ b/boards/omnibus/f4sd/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -72,11 +71,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 # if defined(FLASH_BASED_PARAMS)
 #  include <parameters/flashparams/flashfs.h>
@@ -260,24 +256,8 @@ static struct spi_dev_s *spi3;
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -285,11 +265,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/cannode-v1/src/CMakeLists.txt b/boards/px4/cannode-v1/src/CMakeLists.txt
index 2fe828c7f0a3eceaf70ce621bb2911f205271847..f449efe9e0682fbf39ce91f591c8537a802e3dd4 100644
--- a/boards/px4/cannode-v1/src/CMakeLists.txt
+++ b/boards/px4/cannode-v1/src/CMakeLists.txt
@@ -41,9 +41,8 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
 		drivers__led # drv_led_start
-		parameters # param_init
+		px4_layer
 	)
diff --git a/boards/px4/cannode-v1/src/init.c b/boards/px4/cannode-v1/src/init.c
index e0fa4070e1eafd717c31337abf304e3ecd5021cb..f342bd10a6fc6065024326e43fea3354a081fff3 100644
--- a/boards/px4/cannode-v1/src/init.c
+++ b/boards/px4/cannode-v1/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -68,8 +67,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 #endif
@@ -161,24 +159,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 {
 	int result = OK;
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
 
-	param_init();
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/px4/esc-v1/src/CMakeLists.txt b/boards/px4/esc-v1/src/CMakeLists.txt
index 5de38c98502071d45e98dcd00738ac9115c7ab7c..43bb52f158854417a82eca481e4a7f8b56a3c1e1 100644
--- a/boards/px4/esc-v1/src/CMakeLists.txt
+++ b/boards/px4/esc-v1/src/CMakeLists.txt
@@ -39,7 +39,6 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		drivers__led # drv_led_start
-		parameters # param_init
+		px4_layer
 	)
diff --git a/boards/px4/esc-v1/src/init.c b/boards/px4/esc-v1/src/init.c
index b55c9aee02b5a519fecd0771cd68986dcc8b515d..da4be3572f789e91605edf18922cad4f564a1091 100644
--- a/boards/px4/esc-v1/src/init.c
+++ b/boards/px4/esc-v1/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -68,8 +67,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 #endif
@@ -156,24 +154,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 
 	int result = OK;
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
 
-	param_init();
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/px4/fmu-v2/src/CMakeLists.txt b/boards/px4/fmu-v2/src/CMakeLists.txt
index d482115f8edb35fd111ff3d0c312d92cce657bd6..5af6af5d81e52f2455e5038af031c3c991a3cc54 100644
--- a/boards/px4/fmu-v2/src/CMakeLists.txt
+++ b/boards/px4/fmu-v2/src/CMakeLists.txt
@@ -45,8 +45,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/px4/fmu-v2/src/init.c b/boards/px4/fmu-v2/src/init.c
index 4ddf6bf3848c745bea2ce66321ad1e8dfbf3c2bd..c61a6467e503736ef9946f37a4a85bff207fe4e1 100644
--- a/boards/px4/fmu-v2/src/init.c
+++ b/boards/px4/fmu-v2/src/init.c
@@ -55,7 +55,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -73,11 +72,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -385,14 +381,6 @@ static struct sdio_dev_s *sdio;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-	/* run C++ ctors before we go any further */
-	up_cxxinitialize();
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
 	/* Ensure the power is on 1 ms before we drive the GPIO pins */
 	px4_usleep(1000);
 
@@ -454,10 +442,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 	/* configure SPI interfaces */
 	stm32_spiinitialize();
 
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -465,11 +450,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/fmu-v3/src/CMakeLists.txt b/boards/px4/fmu-v3/src/CMakeLists.txt
index d482115f8edb35fd111ff3d0c312d92cce657bd6..5af6af5d81e52f2455e5038af031c3c991a3cc54 100644
--- a/boards/px4/fmu-v3/src/CMakeLists.txt
+++ b/boards/px4/fmu-v3/src/CMakeLists.txt
@@ -45,8 +45,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/px4/fmu-v3/src/init.c b/boards/px4/fmu-v3/src/init.c
index 49c37cc398cb52a663e2e6abab08a11d874ba1cb..f39dd09a3e68e5827b066839e7d38ab386ee933a 100644
--- a/boards/px4/fmu-v3/src/init.c
+++ b/boards/px4/fmu-v3/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -72,11 +71,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -384,14 +380,6 @@ static struct sdio_dev_s *sdio;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-	/* run C++ ctors before we go any further */
-	up_cxxinitialize();
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
 	/* Ensure the power is on 1 ms before we drive the GPIO pins */
 	usleep(1000);
 
@@ -453,10 +441,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 	/* configure SPI interfaces */
 	stm32_spiinitialize();
 
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -464,11 +449,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/fmu-v4/src/CMakeLists.txt b/boards/px4/fmu-v4/src/CMakeLists.txt
index 80cdd8bd7a5389e1b695be615d9802cb2dca7bad..4fbd7b3f50559960c2f3a4498ac9b73bddb820bd 100644
--- a/boards/px4/fmu-v4/src/CMakeLists.txt
+++ b/boards/px4/fmu-v4/src/CMakeLists.txt
@@ -43,8 +43,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/px4/fmu-v4/src/init.c b/boards/px4/fmu-v4/src/init.c
index 977b19b6c736e9089622b9a60e3b339d2607f46c..a1c35cc268d67313c6479e31291b6c816bb03ab9 100644
--- a/boards/px4/fmu-v4/src/init.c
+++ b/boards/px4/fmu-v4/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -73,11 +72,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -271,35 +267,13 @@ static struct sdio_dev_s *sdio;
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	// Run C++ ctors before we go any further.
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	// Configure the high-resolution time/callout interface.
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	// Configure the DMA allocator.
 	if (board_dma_alloc_init() < 0) {
 		message("DMA alloc FAILED");
 	}
 
-	// Configure CPU load estimation.
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	// Set up the serial DMA polling.
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/fmu-v4pro/src/CMakeLists.txt b/boards/px4/fmu-v4pro/src/CMakeLists.txt
index 93fb657702dea5061bcf7b79d1fe87df566bb3a6..81a1b344af9120feb3eb32d4438e5ca3b3718b2f 100644
--- a/boards/px4/fmu-v4pro/src/CMakeLists.txt
+++ b/boards/px4/fmu-v4pro/src/CMakeLists.txt
@@ -42,8 +42,7 @@ px4_add_library(drivers_board
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/px4/fmu-v4pro/src/init.c b/boards/px4/fmu-v4pro/src/init.c
index 33021963fe4c99a17b783c9ce55c24522eafcbed..104f1abc43f31bd53dd01ae8afad9cbef9d5e87a 100644
--- a/boards/px4/fmu-v4pro/src/init.c
+++ b/boards/px4/fmu-v4pro/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -73,11 +72,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -296,19 +292,6 @@ static struct sdio_dev_s *sdio;
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
 
 	/* Bring up the Sensor power */
 
@@ -319,10 +302,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 
 	stm32_spiinitialize();
 
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -330,11 +310,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/fmu-v5/src/CMakeLists.txt b/boards/px4/fmu-v5/src/CMakeLists.txt
index d5321b2ab2ab5b6489e3dbaed956b0e3c1fbd0ed..517ef77f1b27d80e7719ac228076b1940f5e6b80 100644
--- a/boards/px4/fmu-v5/src/CMakeLists.txt
+++ b/boards/px4/fmu-v5/src/CMakeLists.txt
@@ -35,17 +35,17 @@ px4_add_library(drivers_board
 	#stm32_can.c # WIP
 	init.c
 	led.c
+	manifest.c
 	sdio.c
 	spi.c
 	timer_config.c
 	usb.c
-	manifest.c
 )
+
 target_link_libraries(drivers_board
 	PRIVATE
 		drivers__led # drv_led_start
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
-		parameters # param_init
+		px4_layer
 )
diff --git a/boards/px4/fmu-v5/src/init.c b/boards/px4/fmu-v5/src/init.c
index 50220b3d630949fca2be067da2f509b014ca6840..eda68ebda947b4456363163cbb83c58ccf6159c6 100644
--- a/boards/px4/fmu-v5/src/init.c
+++ b/boards/px4/fmu-v5/src/init.c
@@ -55,7 +55,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -75,11 +74,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #include "up_internal.h"
 /****************************************************************************
@@ -273,22 +269,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 	VDD_5V_RC_EN(true);
 	VDD_5V_WIFI_EN(true);
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
 
 	if (OK == board_determine_hw_info()) {
 		PX4_INFO("Rev 0x%1x : Ver 0x%1x %s", board_get_hw_revision(), board_get_hw_version(), board_get_hw_type_name());
@@ -297,7 +277,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		PX4_ERR("Failed to read HW revision and version");
 	}
 
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -305,11 +285,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		PX4_ERR("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/px4/io-v2/src/init.c b/boards/px4/io-v2/src/init.c
index 133cdb561948bbfff9e1c12bf49511030bfa0896..12c0db3fc62f5572e2bd17830713903bf4b6bb32 100644
--- a/boards/px4/io-v2/src/init.c
+++ b/boards/px4/io-v2/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 
 #include <stm32.h>
diff --git a/boards/stm/32f4discovery/src/CMakeLists.txt b/boards/stm/32f4discovery/src/CMakeLists.txt
index f7a0fb79912a429de7879e3af331d1afcfa3968d..166d048abb1c1a3d4ecd5c1acf535ae834c0656b 100644
--- a/boards/stm/32f4discovery/src/CMakeLists.txt
+++ b/boards/stm/32f4discovery/src/CMakeLists.txt
@@ -40,9 +40,8 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
 		drivers__led # drv_led_start
-		parameters # param_init
+		px4_layer
 	)
diff --git a/boards/stm/32f4discovery/src/init.c b/boards/stm/32f4discovery/src/init.c
index 62234feb41d34a629996fc31f602af0d07394ddc..e84b102581ebc90481445488502739ab4e09698d 100644
--- a/boards/stm/32f4discovery/src/init.c
+++ b/boards/stm/32f4discovery/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -70,9 +69,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 /****************************************************************************
  * Pre-Processor Definitions
@@ -148,30 +145,7 @@ stm32_boardinitialize(void)
 
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
-
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#       if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#               error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#       endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
-
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/boards/stm/nucleo-F767ZI/src/CMakeLists.txt b/boards/stm/nucleo-F767ZI/src/CMakeLists.txt
index 23cd00ee46bb51274fcd5b55663a7af216c7649e..ae672f0e5f73b7e5468a0e23c27332f997def1ce 100644
--- a/boards/stm/nucleo-F767ZI/src/CMakeLists.txt
+++ b/boards/stm/nucleo-F767ZI/src/CMakeLists.txt
@@ -43,9 +43,8 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		nuttx_arch # sdio
 		nuttx_drivers # sdio
 		drivers__led # drv_led_start
-		parameters # param_init
+		px4_layer
 	)
diff --git a/boards/stm/nucleo-F767ZI/src/init.c b/boards/stm/nucleo-F767ZI/src/init.c
index e35da860eb799c0cada9c6c1e0f860f79fe2a9dc..8f43bd5717405675652fe299b1481506249e9b46 100644
--- a/boards/stm/nucleo-F767ZI/src/init.c
+++ b/boards/stm/nucleo-F767ZI/src/init.c
@@ -54,7 +54,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -73,11 +72,8 @@
 #include <drivers/drv_board_led.h>
 
 #include <systemlib/px4_macros.h>
-#include <systemlib/cpuload.h>
-#include <perf/perf_counter.h>
-#include <systemlib/err.h>
 
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #include "up_internal.h"
 /****************************************************************************
@@ -236,24 +232,8 @@ stm32_boardinitialize(void)
 __EXPORT int board_app_initialize(uintptr_t arg)
 {
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
-
-	param_init();
+	px4_platform_init();
 
 	/* configure the DMA allocator */
 
@@ -261,11 +241,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 		message("DMA alloc FAILED");
 	}
 
-	/* configure CPU load estimation */
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-	cpuload_initialize_once();
-#endif
-
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
 	struct timespec ts;
diff --git a/boards/thiemar/s2740vc-v1/src/CMakeLists.txt b/boards/thiemar/s2740vc-v1/src/CMakeLists.txt
index a2010e27edd39e9fcb35f87e8695113657bdd8c5..bd2575a187ee95576e082bc3e8fb0dadbe0f539c 100644
--- a/boards/thiemar/s2740vc-v1/src/CMakeLists.txt
+++ b/boards/thiemar/s2740vc-v1/src/CMakeLists.txt
@@ -42,6 +42,5 @@ px4_add_library(drivers_board
 
 target_link_libraries(drivers_board
 	PRIVATE
-		nuttx_apps # up_cxxinitialize
 		drivers_arch
 )
diff --git a/boards/thiemar/s2740vc-v1/src/init.c b/boards/thiemar/s2740vc-v1/src/init.c
index 80d83a74834103a74196c07a8275a2cbc5173059..aa22cf5074f8751df0389970ede79eb36e48424e 100644
--- a/boards/thiemar/s2740vc-v1/src/init.c
+++ b/boards/thiemar/s2740vc-v1/src/init.c
@@ -52,7 +52,6 @@
 #include <debug.h>
 #include <errno.h>
 
-#include "platform/cxxinitialize.h"
 #include <nuttx/board.h>
 #include <nuttx/spi/spi.h>
 #include <nuttx/i2c/i2c_master.h>
@@ -68,8 +67,7 @@
 #include <drivers/drv_hrt.h>
 #include <drivers/drv_board_led.h>
 
-#include <systemlib/cpuload.h>
-#include <parameters/param.h>
+#include <px4_init.h>
 
 #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
 #endif
@@ -148,24 +146,8 @@ __EXPORT int board_app_initialize(uintptr_t arg)
 {
 	int result = OK;
 
-#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
-
-	/* run C++ ctors before we go any further */
-
-	up_cxxinitialize();
-
-#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
-#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
-#	endif
-
-#else
-#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
-#endif
-
-	/* configure the high-resolution time/callout interface */
-	hrt_init();
 
-	param_init();
+	px4_platform_init();
 
 	/* set up the serial DMA polling */
 	static struct hrt_call serial_dma_call;
diff --git a/cmake/px4_add_common_flags.cmake b/cmake/px4_add_common_flags.cmake
index 00ee547bf98a071d32bc98913bc38b028d183e52..0958b13465c77abed2be3ec5131dbb91df2964eb 100644
--- a/cmake/px4_add_common_flags.cmake
+++ b/cmake/px4_add_common_flags.cmake
@@ -176,6 +176,7 @@ function(px4_add_common_flags)
 		${PX4_SOURCE_DIR}/src/lib/matrix
 		${PX4_SOURCE_DIR}/src/modules
 		${PX4_SOURCE_DIR}/src/platforms
+		${PX4_SOURCE_DIR}/src/platforms/common
 		)
 
 	add_definitions(
diff --git a/cmake/px4_add_module.cmake b/cmake/px4_add_module.cmake
index 18f2a73c352eecdf789aab9654757236cc644023..88ca3f698b822ec6885265cc7ebaea8875ecbb22 100644
--- a/cmake/px4_add_module.cmake
+++ b/cmake/px4_add_module.cmake
@@ -152,7 +152,7 @@ function(px4_add_module)
 	add_dependencies(${MODULE} uorb_headers)
 
 	if(NOT DYNAMIC)
-		target_link_libraries(${MODULE} PRIVATE prebuild_targets parameters_interface platforms__common px4_layer systemlib)
+		target_link_libraries(${MODULE} PRIVATE prebuild_targets parameters_interface px4_layer px4_platform systemlib)
 		set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES ${MODULE})
 		set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR})
 	endif()
diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt
index d7af383a83cf41b01dcad3b8a7a0f53abff63d22..df3898dcf85bd16d26fdd36d885d18bf2384d038 100644
--- a/platforms/nuttx/CMakeLists.txt
+++ b/platforms/nuttx/CMakeLists.txt
@@ -96,6 +96,7 @@ target_link_libraries(px4 PRIVATE
 	-Wl,--gc-sections
 
 	-Wl,--start-group
+	drivers_boards_common_arch
 	${nuttx_libs}
 	-Wl,--end-group
 
diff --git a/platforms/nuttx/src/px4_layer/CMakeLists.txt b/platforms/nuttx/src/px4_layer/CMakeLists.txt
index f78535ba013b6c4047f85add95e9ba64bbe90d96..6771b9ba2793dfea77e537dfd69bee124609a17b 100644
--- a/platforms/nuttx/src/px4_layer/CMakeLists.txt
+++ b/platforms/nuttx/src/px4_layer/CMakeLists.txt
@@ -37,8 +37,14 @@ if (NOT ${PX4_BOARD} MATCHES "px4_io")
 	add_library(px4_layer
 		px4_nuttx_tasks.c
 		px4_nuttx_impl.cpp
+		px4_init.cpp
 	)
-	target_link_libraries(px4_layer PRIVATE nuttx_sched drivers_boards_common_arch)
+	target_link_libraries(px4_layer
+		PRIVATE
+			nuttx_apps # up_cxxinitialize
+			nuttx_sched
+			drivers_boards_common_arch
+		)
 else()
 	add_library(px4_layer ${PX4_SOURCE_DIR}/src/platforms/empty.c)
 endif()
diff --git a/platforms/nuttx/src/px4_layer/px4_init.cpp b/platforms/nuttx/src/px4_layer/px4_init.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8be6af0a68ef6b5de41fbaf487866cc9fb48c14b
--- /dev/null
+++ b/platforms/nuttx/src/px4_layer/px4_init.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+ *
+ *   Copyright (c) 2019 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#include "px4_init.h"
+
+#include <px4_config.h>
+#include <px4_defines.h>
+#include <drivers/drv_hrt.h>
+#include <lib/parameters/param.h>
+#include <systemlib/cpuload.h>
+
+#include "platform/cxxinitialize.h"
+
+int px4_platform_init(void)
+{
+
+#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
+	/* run C++ ctors before we go any further */
+	up_cxxinitialize();
+
+#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
+#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
+#	endif
+
+#else
+#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
+#endif
+
+	hrt_init();
+
+	param_init();
+
+	/* configure CPU load estimation */
+#ifdef CONFIG_SCHED_INSTRUMENTATION
+	cpuload_initialize_once();
+#endif
+
+	return PX4_OK;
+}
diff --git a/platforms/posix/CMakeLists.txt b/platforms/posix/CMakeLists.txt
index fc32b9125c7ba7faac887e9bf9c0983482a07b1a..963c3639bd91e23d5a141c5a2511536e80804af0 100644
--- a/platforms/posix/CMakeLists.txt
+++ b/platforms/posix/CMakeLists.txt
@@ -62,6 +62,10 @@ else()
 			${df_driver_libs}
 			df_driver_framework
 			pthread m
+			
+			# horrible circular dependencies that need to be teased apart
+			px4_layer
+			px4_platform
 	)
 
 	if (NOT APPLE)
diff --git a/platforms/posix/src/px4_layer/CMakeLists.txt b/platforms/posix/src/px4_layer/CMakeLists.txt
index 000706bc5739ca0ad2dcac4eb155b984b0eaf9f3..4df54c15453e013d53d96b1987315c8eb8b0e7d1 100644
--- a/platforms/posix/src/px4_layer/CMakeLists.txt
+++ b/platforms/posix/src/px4_layer/CMakeLists.txt
@@ -48,6 +48,7 @@ add_library(px4_layer
 	px4_posix_impl.cpp
 	px4_posix_tasks.cpp
 	px4_sem.cpp
+	px4_init.cpp
 	lib_crc32.c
 	drv_hrt.cpp
 	${SHMEM_SRCS}
diff --git a/platforms/posix/src/px4_layer/px4_init.cpp b/platforms/posix/src/px4_layer/px4_init.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6689420fec059f4f8298b69d3097b48b58182645
--- /dev/null
+++ b/platforms/posix/src/px4_layer/px4_init.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+ *
+ *   Copyright (c) 2019 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#include "px4_init.h"
+
+#include <px4_config.h>
+#include <px4_defines.h>
+#include <drivers/drv_hrt.h>
+#include <lib/parameters/param.h>
+
+int px4_platform_init(void)
+{
+	hrt_init();
+
+	param_init();
+
+	return PX4_OK;
+}
diff --git a/platforms/posix/src/px4_layer/px4_posix_impl.cpp b/platforms/posix/src/px4_layer/px4_posix_impl.cpp
index 199626b7e9ef567f4bc492b2d2e74649d0d2fb13..9c1cf6504214caeaeef1f0677c8e8621b59c5abb 100644
--- a/platforms/posix/src/px4_layer/px4_posix_impl.cpp
+++ b/platforms/posix/src/px4_layer/px4_posix_impl.cpp
@@ -51,6 +51,7 @@
 #include <drivers/drv_hrt.h>
 #include "px4_time.h"
 #include <pthread.h>
+#include <px4_init.h>
 
 extern pthread_t _shell_task_id;
 
@@ -69,10 +70,11 @@ void init_once()
 {
 	_shell_task_id = pthread_self();
 	//printf("[init] shell id: %lu\n", (unsigned long)_shell_task_id);
+
 	work_queues_init();
 	hrt_work_queue_init();
-	hrt_init();
-	param_init();
+
+	px4_platform_init();
 }
 
 void init(int argc, char *argv[], const char *app_name)
diff --git a/platforms/qurt/src/px4_layer/CMakeLists.txt b/platforms/qurt/src/px4_layer/CMakeLists.txt
index c9a4dac89353c0501e7c95c7db73f4c038e805e0..892a6e668474dace255d9a699b521d108da80887 100644
--- a/platforms/qurt/src/px4_layer/CMakeLists.txt
+++ b/platforms/qurt/src/px4_layer/CMakeLists.txt
@@ -44,6 +44,7 @@ set(QURT_LAYER_SRCS
 	qurt_stubs.c
 	main.cpp
 	shmem_qurt.cpp
+	px4_init.cpp
 	)
 
 if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
diff --git a/platforms/qurt/src/px4_layer/px4_init.cpp b/platforms/qurt/src/px4_layer/px4_init.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6689420fec059f4f8298b69d3097b48b58182645
--- /dev/null
+++ b/platforms/qurt/src/px4_layer/px4_init.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+ *
+ *   Copyright (c) 2019 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#include "px4_init.h"
+
+#include <px4_config.h>
+#include <px4_defines.h>
+#include <drivers/drv_hrt.h>
+#include <lib/parameters/param.h>
+
+int px4_platform_init(void)
+{
+	hrt_init();
+
+	param_init();
+
+	return PX4_OK;
+}
diff --git a/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp b/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp
index 56515da2b1bb66c13e0bcb47cc861c291f14bbac..699f0c9ee506ab39b788130a2d121946a7db8464 100644
--- a/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp
+++ b/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp
@@ -51,7 +51,7 @@
 #include <parameters/param.h>
 #include "hrt_work.h"
 #include "px4_log.h"
-
+#include <px4_init.h>
 
 //extern pthread_t _shell_task_id;
 
@@ -105,8 +105,8 @@ void init_once(void)
 
 	work_queues_init();
 	hrt_work_queue_init();
-	hrt_init();
-	param_init();
+
+	px4_platform_init();
 }
 
 void init(int argc, char *argv[], const char *app_name)
diff --git a/src/drivers/heater/CMakeLists.txt b/src/drivers/heater/CMakeLists.txt
index 19cce63461745dd1075ba887046e697a9dcd2255..a81d51ee0bc5bd1c1d93e237b678eabcf89bc31e 100644
--- a/src/drivers/heater/CMakeLists.txt
+++ b/src/drivers/heater/CMakeLists.txt
@@ -37,7 +37,4 @@ px4_add_module(
 	COMPILE_FLAGS
 	SRCS
 		heater.cpp
-	DEPENDS
-		platforms__common
-		modules__uORB
 	)
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index c0734c41019d2cf7dd65d1ff1e9d4d6bbc2964f7..24d7ec156aec013e369b67b41f308b7cf298060d 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -39,6 +39,7 @@ add_subdirectory(battery)
 add_subdirectory(bezier)
 add_subdirectory(cdev)
 add_subdirectory(circuit_breaker)
+add_subdirectory(CollisionPrevention)
 add_subdirectory(controllib)
 add_subdirectory(conversion)
 add_subdirectory(drivers)
@@ -56,4 +57,3 @@ add_subdirectory(terrain_estimation)
 add_subdirectory(tunes)
 add_subdirectory(version)
 add_subdirectory(WeatherVane)
-add_subdirectory(CollisionPrevention)
diff --git a/src/platforms/CMakeLists.txt b/src/platforms/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a2a39344fc7560002e4598c729669e083c18ceeb
--- /dev/null
+++ b/src/platforms/CMakeLists.txt
@@ -0,0 +1,34 @@
+############################################################################
+#
+#   Copyright (c) 2019 PX4 Development Team. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. Neither the name PX4 nor the names of its contributors may be
+#    used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+add_subdirectory(common)
diff --git a/src/platforms/common/CMakeLists.txt b/src/platforms/common/CMakeLists.txt
index 5639e5b91591a719d99573b8e16d56aa78d29dd1..c7547e7be789b4f60fd4aeb98cd52cc01e5b9688 100644
--- a/src/platforms/common/CMakeLists.txt
+++ b/src/platforms/common/CMakeLists.txt
@@ -39,12 +39,12 @@ if (NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2")
 		)
 endif()
 
-px4_add_library(platforms__common
+px4_add_library(px4_platform
 	module.cpp
 	px4_getopt.c
 	px4_cli.cpp
 	shutdown.cpp
 	${SRCS}
 	)
-	
+
 add_subdirectory(work_queue)
diff --git a/src/platforms/px4_init.h b/src/platforms/px4_init.h
new file mode 100644
index 0000000000000000000000000000000000000000..77cebfadf45d014f3dcd9b6c9ac2ac92caeac994
--- /dev/null
+++ b/src/platforms/px4_init.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ *
+ *   Copyright (c) 2019 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+__BEGIN_DECLS
+
+int px4_platform_init(void);
+
+__END_DECLS
diff --git a/src/platforms/qurt/fc_addon/rc_receiver/CMakeLists.txt b/src/platforms/qurt/fc_addon/rc_receiver/CMakeLists.txt
index 56425db054f34a713c485804af4712b9e51f4df6..3ef6cec84a1e8662fcd86335e85fd5f839c95d73 100644
--- a/src/platforms/qurt/fc_addon/rc_receiver/CMakeLists.txt
+++ b/src/platforms/qurt/fc_addon/rc_receiver/CMakeLists.txt
@@ -53,7 +53,5 @@ px4_add_module(
         SRCS
                 rc_receiver_main.cpp
 		rc_receiver_params.c
-        DEPENDS
-                platforms__common
         )
 target_link_libraries(platforms__qurt__fc_addon__rc_receiver PRIVATE rc_receiver)
diff --git a/src/systemcmds/motor_ramp/CMakeLists.txt b/src/systemcmds/motor_ramp/CMakeLists.txt
index cf816ff1ef57d75060145016ce315a8c58634952..da92a7bf5a40bee47ae3737d9c0b27f1095ecb9b 100644
--- a/src/systemcmds/motor_ramp/CMakeLists.txt
+++ b/src/systemcmds/motor_ramp/CMakeLists.txt
@@ -38,6 +38,4 @@ px4_add_module(
         -Wno-write-strings
     SRCS
         motor_ramp.cpp
-    DEPENDS
-        platforms__common
     )
diff --git a/src/systemcmds/shutdown/CMakeLists.txt b/src/systemcmds/shutdown/CMakeLists.txt
index 5db004e76b6b539b34390ad6536a6c64bc3e3515..7f791b80c21608d29c30f1583038088927f707ea 100644
--- a/src/systemcmds/shutdown/CMakeLists.txt
+++ b/src/systemcmds/shutdown/CMakeLists.txt
@@ -37,7 +37,4 @@ px4_add_module(
 	COMPILE_FLAGS
 	SRCS
 		shutdown.c
-	DEPENDS
-		platforms__common
 	)
-# vim: set noet ft=cmake fenc=utf-8 ff=unix :