mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
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:
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -31,17 +31,18 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
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
|
||||||
nuttx_arch # sdio
|
nuttx_arch # sdio
|
||||||
nuttx_drivers # sdio
|
nuttx_drivers # sdio
|
||||||
px4_layer
|
px4_layer
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -49,4 +49,4 @@ target_link_libraries(drivers_board
|
|||||||
nuttx_drivers # sdio
|
nuttx_drivers # sdio
|
||||||
drivers__led # drv_led_start
|
drivers__led # drv_led_start
|
||||||
px4_layer
|
px4_layer
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user