boards don't use px4_add_library for drivers_board

- this prevents low level board support from using PX4 logging, uORB, etc
This commit is contained in:
Daniel Agar 2019-05-31 21:30:37 -04:00
parent b54a43fccc
commit 321c2c0392
26 changed files with 43 additions and 34 deletions

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
) )

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
init.c init.c
led.c led.c

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
sitl_led.c sitl_led.c
) )

View File

@ -35,7 +35,7 @@ message(WARNING "Configuraton is incomplete")
message(WARNING "DO NOT RUN THIS ON HW") message(WARNING "DO NOT RUN THIS ON HW")
message(WARNING "IT IS NOT PINED OUT TO HW") message(WARNING "IT IS NOT PINED OUT TO HW")
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
led.c led.c
usb.c usb.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
init.c init.c
led.c led.c

View File

@ -31,13 +31,14 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
manifest.c manifest.c
sdio.c sdio.c
spi.cpp spi.cpp
timer_config.c timer_config.c
) )
target_link_libraries(drivers_board target_link_libraries(drivers_board
PRIVATE PRIVATE
drivers__led # drv_led_start drivers__led # drv_led_start

View File

@ -33,7 +33,7 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error")
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
) )

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
led.c led.c
spi.c spi.c

View File

@ -3,7 +3,6 @@
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_config.h>
#include <px4_log.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -69,7 +68,7 @@ __EXPORT int stm32_spi_bus_initialize(void)
spi_expansion = stm32_spibus_initialize(PX4_SPI_BUS_EXPANSION); spi_expansion = stm32_spibus_initialize(PX4_SPI_BUS_EXPANSION);
if (!spi_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; 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); int ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi_expansion);
if (ret != OK) { 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; return -ENODEV;
} }

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
) )

View File

@ -32,7 +32,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
led.c led.c
spi.c spi.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
autoleds.c autoleds.c
automount.c automount.c
can.c can.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
led.c led.c
spi.c spi.c

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
) )

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
buttons.c buttons.c
can.c can.c
init.c init.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
led.c led.c
usb.c usb.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
i2c.c i2c.c
init.c init.c

View File

@ -47,10 +47,12 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <nuttx/config.h>
#include <board_config.h>
#include <stdbool.h> #include <stdbool.h>
#include "systemlib/px4_macros.h" #include "systemlib/px4_macros.h"
#include "px4_log.h"
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * 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) { 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);
} }
} }

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
i2c.c i2c.c
init.c init.c

View File

@ -47,10 +47,12 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <nuttx/config.h>
#include <board_config.h>
#include <stdbool.h> #include <stdbool.h>
#include "systemlib/px4_macros.h" #include "systemlib/px4_macros.h"
#include "px4_log.h"
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * 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) { 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);
} }
} }

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
init.c init.c
led.c led.c

View File

@ -31,7 +31,7 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
init.c init.c
led.c led.c

View File

@ -31,7 +31,12 @@
# #
############################################################################ ############################################################################
px4_add_library(drivers_board add_library(drivers_board
init.c init.c
timer_config.c timer_config.c
) )
target_link_libraries(drivers_board
PRIVATE
nuttx_arch
)

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
) )

View File

@ -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 ${PX4_SOURCE_DIR}/src/drivers/boards/common/board_identity.c # TODO: this is horrible and should be fixed
sitl_led.c sitl_led.c
) )

View File

@ -35,7 +35,7 @@ message(WARNING "Configuraton is incomplete")
message(WARNING "DO NOT RUN THIS ON HW") message(WARNING "DO NOT RUN THIS ON HW")
message(WARNING "IT IS NOT PINED OUT TO HW") message(WARNING "IT IS NOT PINED OUT TO HW")
px4_add_library(drivers_board add_library(drivers_board
can.c can.c
init.c init.c
) )