diff --git a/boards/aerotenna/ocpoc/src/CMakeLists.txt b/boards/aerotenna/ocpoc/src/CMakeLists.txt index 0b4ba0d6ac..04927ce895 100644 --- a/boards/aerotenna/ocpoc/src/CMakeLists.txt +++ b/boards/aerotenna/ocpoc/src/CMakeLists.txt @@ -31,6 +31,6 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ) diff --git a/boards/airmind/mindpx-v2/src/CMakeLists.txt b/boards/airmind/mindpx-v2/src/CMakeLists.txt index 4fbd7b3f50..f0500a3369 100644 --- a/boards/airmind/mindpx-v2/src/CMakeLists.txt +++ b/boards/airmind/mindpx-v2/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c init.c led.c diff --git a/boards/atlflight/eagle/src/CMakeLists.txt b/boards/atlflight/eagle/src/CMakeLists.txt index 03d93f29ec..2d765ef150 100644 --- a/boards/atlflight/eagle/src/CMakeLists.txt +++ b/boards/atlflight/eagle/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed sitl_led.c ) diff --git a/boards/auav/esc35-v1/src/CMakeLists.txt b/boards/auav/esc35-v1/src/CMakeLists.txt index db702078c8..48721c0896 100644 --- a/boards/auav/esc35-v1/src/CMakeLists.txt +++ b/boards/auav/esc35-v1/src/CMakeLists.txt @@ -35,7 +35,7 @@ message(WARNING "Configuraton is incomplete") message(WARNING "DO NOT RUN THIS ON HW") message(WARNING "IT IS NOT PINED OUT TO HW") -px4_add_library(drivers_board +add_library(drivers_board init.c led.c usb.c diff --git a/boards/auav/x21/src/CMakeLists.txt b/boards/auav/x21/src/CMakeLists.txt index 81a1b344af..a505a31a35 100644 --- a/boards/auav/x21/src/CMakeLists.txt +++ b/boards/auav/x21/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c init.c led.c diff --git a/boards/av/x-v1/src/CMakeLists.txt b/boards/av/x-v1/src/CMakeLists.txt index c72373d5b3..85968ef8f1 100644 --- a/boards/av/x-v1/src/CMakeLists.txt +++ b/boards/av/x-v1/src/CMakeLists.txt @@ -31,17 +31,18 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c manifest.c sdio.c spi.cpp timer_config.c ) + target_link_libraries(drivers_board PRIVATE drivers__led # drv_led_start nuttx_arch # sdio nuttx_drivers # sdio px4_layer -) \ No newline at end of file +) diff --git a/boards/beaglebone/blue/src/CMakeLists.txt b/boards/beaglebone/blue/src/CMakeLists.txt index 5ee92a9916..02461f039e 100644 --- a/boards/beaglebone/blue/src/CMakeLists.txt +++ b/boards/beaglebone/blue/src/CMakeLists.txt @@ -33,7 +33,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error") -px4_add_library(drivers_board +add_library(drivers_board init.c ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ) diff --git a/boards/bitcraze/crazyflie/src/CMakeLists.txt b/boards/bitcraze/crazyflie/src/CMakeLists.txt index 4e1d54ac1e..479009586a 100644 --- a/boards/bitcraze/crazyflie/src/CMakeLists.txt +++ b/boards/bitcraze/crazyflie/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c led.c spi.c diff --git a/boards/bitcraze/crazyflie/src/spi.c b/boards/bitcraze/crazyflie/src/spi.c index 1be0660c99..60d75c8455 100644 --- a/boards/bitcraze/crazyflie/src/spi.c +++ b/boards/bitcraze/crazyflie/src/spi.c @@ -3,7 +3,6 @@ ************************************************************************************/ #include -#include #include #include @@ -69,7 +68,7 @@ __EXPORT int stm32_spi_bus_initialize(void) spi_expansion = stm32_spibus_initialize(PX4_SPI_BUS_EXPANSION); if (!spi_expansion) { - PX4_ERR("[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_EXPANSION); + syslog(LOG_ERR, "[boot] FAILED to initialize SPI port %d\n", PX4_SPI_BUS_EXPANSION); return -ENODEV; } @@ -77,7 +76,7 @@ __EXPORT int stm32_spi_bus_initialize(void) int ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi_expansion); if (ret != OK) { - PX4_ERR("[boot] FAILED to bind SPI port 1 to the MMCSD driver\n"); + syslog(LOG_ERR, "[boot] FAILED to bind SPI port 1 to the MMCSD driver\n"); return -ENODEV; } diff --git a/boards/emlid/navio2/src/CMakeLists.txt b/boards/emlid/navio2/src/CMakeLists.txt index 0b4ba0d6ac..04927ce895 100644 --- a/boards/emlid/navio2/src/CMakeLists.txt +++ b/boards/emlid/navio2/src/CMakeLists.txt @@ -31,6 +31,6 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ) diff --git a/boards/intel/aerofc-v1/src/CMakeLists.txt b/boards/intel/aerofc-v1/src/CMakeLists.txt index f1e4250994..30d6d19249 100644 --- a/boards/intel/aerofc-v1/src/CMakeLists.txt +++ b/boards/intel/aerofc-v1/src/CMakeLists.txt @@ -32,7 +32,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c led.c spi.c diff --git a/boards/nxp/fmuk66-v3/src/CMakeLists.txt b/boards/nxp/fmuk66-v3/src/CMakeLists.txt index c559f9b9ad..c30ab5972b 100644 --- a/boards/nxp/fmuk66-v3/src/CMakeLists.txt +++ b/boards/nxp/fmuk66-v3/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board autoleds.c automount.c can.c @@ -49,4 +49,4 @@ target_link_libraries(drivers_board nuttx_drivers # sdio drivers__led # drv_led_start px4_layer - ) \ No newline at end of file + ) diff --git a/boards/omnibus/f4sd/src/CMakeLists.txt b/boards/omnibus/f4sd/src/CMakeLists.txt index bf72b7efcd..63f010ad0e 100644 --- a/boards/omnibus/f4sd/src/CMakeLists.txt +++ b/boards/omnibus/f4sd/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c led.c spi.c diff --git a/boards/parrot/bebop/src/CMakeLists.txt b/boards/parrot/bebop/src/CMakeLists.txt index 0b4ba0d6ac..04927ce895 100644 --- a/boards/parrot/bebop/src/CMakeLists.txt +++ b/boards/parrot/bebop/src/CMakeLists.txt @@ -31,6 +31,6 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ) diff --git a/boards/px4/cannode-v1/src/CMakeLists.txt b/boards/px4/cannode-v1/src/CMakeLists.txt index f449efe9e0..e3b8c3db75 100644 --- a/boards/px4/cannode-v1/src/CMakeLists.txt +++ b/boards/px4/cannode-v1/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board buttons.c can.c init.c diff --git a/boards/px4/esc-v1/src/CMakeLists.txt b/boards/px4/esc-v1/src/CMakeLists.txt index 43bb52f158..c8b0bf013e 100644 --- a/boards/px4/esc-v1/src/CMakeLists.txt +++ b/boards/px4/esc-v1/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c led.c usb.c diff --git a/boards/px4/fmu-v2/src/CMakeLists.txt b/boards/px4/fmu-v2/src/CMakeLists.txt index 5af6af5d81..cd2ab00c64 100644 --- a/boards/px4/fmu-v2/src/CMakeLists.txt +++ b/boards/px4/fmu-v2/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c i2c.c init.c diff --git a/boards/px4/fmu-v2/src/manifest.c b/boards/px4/fmu-v2/src/manifest.c index 7639b59cd3..e93a7bbeba 100644 --- a/boards/px4/fmu-v2/src/manifest.c +++ b/boards/px4/fmu-v2/src/manifest.c @@ -47,10 +47,12 @@ * Included Files ****************************************************************************/ -#include +#include +#include + #include + #include "systemlib/px4_macros.h" -#include "px4_log.h" /**************************************************************************** * Pre-Processor Definitions @@ -134,7 +136,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id) } if (boards_manifest == px4_hw_mft_list_uninitialized) { - PX4_ERR("Board %4x is not supported!", ver_rev); + syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev); } } diff --git a/boards/px4/fmu-v3/src/CMakeLists.txt b/boards/px4/fmu-v3/src/CMakeLists.txt index 5af6af5d81..cd2ab00c64 100644 --- a/boards/px4/fmu-v3/src/CMakeLists.txt +++ b/boards/px4/fmu-v3/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c i2c.c init.c diff --git a/boards/px4/fmu-v3/src/manifest.c b/boards/px4/fmu-v3/src/manifest.c index 7639b59cd3..e93a7bbeba 100644 --- a/boards/px4/fmu-v3/src/manifest.c +++ b/boards/px4/fmu-v3/src/manifest.c @@ -47,10 +47,12 @@ * Included Files ****************************************************************************/ -#include +#include +#include + #include + #include "systemlib/px4_macros.h" -#include "px4_log.h" /**************************************************************************** * Pre-Processor Definitions @@ -134,7 +136,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id) } if (boards_manifest == px4_hw_mft_list_uninitialized) { - PX4_ERR("Board %4x is not supported!", ver_rev); + syslog(LOG_ERR, "[boot] Board %4x is not supported!\n", ver_rev); } } diff --git a/boards/px4/fmu-v4/src/CMakeLists.txt b/boards/px4/fmu-v4/src/CMakeLists.txt index 4fbd7b3f50..f0500a3369 100644 --- a/boards/px4/fmu-v4/src/CMakeLists.txt +++ b/boards/px4/fmu-v4/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c init.c led.c diff --git a/boards/px4/fmu-v4pro/src/CMakeLists.txt b/boards/px4/fmu-v4pro/src/CMakeLists.txt index 81a1b344af..a505a31a35 100644 --- a/boards/px4/fmu-v4pro/src/CMakeLists.txt +++ b/boards/px4/fmu-v4pro/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board can.c init.c led.c diff --git a/boards/px4/io-v2/src/CMakeLists.txt b/boards/px4/io-v2/src/CMakeLists.txt index 54117f23f4..6816238e30 100644 --- a/boards/px4/io-v2/src/CMakeLists.txt +++ b/boards/px4/io-v2/src/CMakeLists.txt @@ -31,7 +31,12 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board init.c timer_config.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_arch +) diff --git a/boards/px4/raspberrypi/src/CMakeLists.txt b/boards/px4/raspberrypi/src/CMakeLists.txt index 0b4ba0d6ac..04927ce895 100644 --- a/boards/px4/raspberrypi/src/CMakeLists.txt +++ b/boards/px4/raspberrypi/src/CMakeLists.txt @@ -31,6 +31,6 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ) diff --git a/boards/px4/sitl/src/CMakeLists.txt b/boards/px4/sitl/src/CMakeLists.txt index 68f78c4ad7..0e81fc2b7b 100644 --- a/boards/px4/sitl/src/CMakeLists.txt +++ b/boards/px4/sitl/src/CMakeLists.txt @@ -31,7 +31,7 @@ # ############################################################################ -px4_add_library(drivers_board +add_library(drivers_board ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed sitl_led.c ) diff --git a/boards/thiemar/s2740vc-v1/src/CMakeLists.txt b/boards/thiemar/s2740vc-v1/src/CMakeLists.txt index bd2575a187..1f19644ff9 100644 --- a/boards/thiemar/s2740vc-v1/src/CMakeLists.txt +++ b/boards/thiemar/s2740vc-v1/src/CMakeLists.txt @@ -35,7 +35,7 @@ message(WARNING "Configuraton is incomplete") message(WARNING "DO NOT RUN THIS ON HW") message(WARNING "IT IS NOT PINED OUT TO HW") -px4_add_library(drivers_board +add_library(drivers_board can.c init.c )