mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 01:43:34 +08:00
NuttX cmake support optional compressed defconfigs
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
# common board drivers (currently only for nuttx fmu boards)
|
||||
if ((${PX4_PLATFORM} MATCHES "nuttx") AND NOT ${PX4_BOARD} MATCHES "io")
|
||||
|
||||
px4_add_library(drivers_boards_common
|
||||
add_library(drivers_boards_common
|
||||
board_crashdump.c
|
||||
board_dma_alloc.c
|
||||
board_gpio_init.c
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
@@ -67,8 +65,8 @@ int board_hardfault_init(int display_to_console, bool allow_prompt)
|
||||
|
||||
if (hadCrash == OK) {
|
||||
|
||||
PX4_ERR("[boot] There is a hard fault logged. Hold down the SPACE BAR," \
|
||||
" while booting to review!\n");
|
||||
syslog(LOG_ERR, "[boot] There is a hard fault logged. Hold down the SPACE BAR," \
|
||||
" while booting to review!\n");
|
||||
|
||||
/* Yes. So add one to the boot count - this will be reset after a successful
|
||||
* commit to SD
|
||||
@@ -104,9 +102,9 @@ int board_hardfault_init(int display_to_console, bool allow_prompt)
|
||||
hardfault_write("boot", fileno(stdout), HARDFAULT_DISPLAY_FORMAT, false);
|
||||
}
|
||||
|
||||
PX4_ERR("[boot] There were %d reboots with Hard fault that were not committed to disk%s\n",
|
||||
reboots,
|
||||
(bytesWaiting == 0 ? "" : " - Boot halted Due to Key Press\n"));
|
||||
syslog(LOG_ERR, "[boot] There were %d reboots with Hard fault that were not committed to disk%s\n",
|
||||
reboots,
|
||||
(bytesWaiting == 0 ? "" : " - Boot halted Due to Key Press\n"));
|
||||
|
||||
|
||||
/* For those of you with a debugger set a break point on up_assert and
|
||||
@@ -155,9 +153,9 @@ int board_hardfault_init(int display_to_console, bool allow_prompt)
|
||||
break;
|
||||
} // Inner Switch
|
||||
|
||||
PX4_INFO("\nEnter B - Continue booting\n" \
|
||||
"Enter C - Clear the fault log\n" \
|
||||
"Enter D - Dump fault log\n\n?>");
|
||||
syslog(LOG_INFO, "\nEnter B - Continue booting\n" \
|
||||
"Enter C - Clear the fault log\n" \
|
||||
"Enter D - Dump fault log\n\n?>");
|
||||
fflush(stdout);
|
||||
|
||||
read:
|
||||
|
||||
@@ -55,7 +55,7 @@ CDev::CDev(const char *devname) :
|
||||
int ret = px4_sem_init(&_lock, 0, 1);
|
||||
|
||||
if (ret != 0) {
|
||||
PX4_ERR("SEM INIT FAIL: ret %d", ret);
|
||||
PX4_DEBUG("SEM INIT FAIL: ret %d", ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,26 +31,30 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# this includes the generated topics directory
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__uORB
|
||||
MAIN uorb
|
||||
STACK_MAIN 2100
|
||||
SRCS
|
||||
Publication.cpp
|
||||
Subscription.cpp
|
||||
uORB.cpp
|
||||
uORBDeviceMaster.cpp
|
||||
uORBDeviceNode.cpp
|
||||
uORBMain.cpp
|
||||
uORBManager.cpp
|
||||
uORBUtils.cpp
|
||||
DEPENDS
|
||||
uorb_msgs
|
||||
)
|
||||
|
||||
if(PX4_TESTING)
|
||||
add_subdirectory(uORB_tests)
|
||||
if(NOT "${PX4_BOARD}" MATCHES "px4_io") # TODO: fix this hack (move uORB to platform layer)
|
||||
|
||||
# this includes the generated topics directory
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__uORB
|
||||
MAIN uorb
|
||||
STACK_MAIN 2100
|
||||
SRCS
|
||||
Publication.cpp
|
||||
Subscription.cpp
|
||||
uORB.cpp
|
||||
uORBDeviceMaster.cpp
|
||||
uORBDeviceNode.cpp
|
||||
uORBMain.cpp
|
||||
uORBManager.cpp
|
||||
uORBUtils.cpp
|
||||
DEPENDS
|
||||
cdev
|
||||
uorb_msgs
|
||||
)
|
||||
|
||||
if(PX4_TESTING)
|
||||
add_subdirectory(uORB_tests)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -39,12 +39,17 @@ if (NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2")
|
||||
)
|
||||
endif()
|
||||
|
||||
px4_add_library(px4_platform
|
||||
add_library(px4_platform
|
||||
module.cpp
|
||||
px4_getopt.c
|
||||
px4_cli.cpp
|
||||
shutdown.cpp
|
||||
${SRCS}
|
||||
)
|
||||
add_dependencies(px4_platform prebuild_targets)
|
||||
|
||||
if (NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2")
|
||||
target_link_libraries(px4_platform PRIVATE modules__uORB) # px4_log awkward dependency with uORB, TODO: orb should part of the platform layer
|
||||
endif()
|
||||
|
||||
add_subdirectory(work_queue)
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
* Implementation of the API declared in px4_module.h.
|
||||
*/
|
||||
|
||||
#ifndef MODULE_NAME
|
||||
#define MODULE_NAME "module"
|
||||
#endif
|
||||
|
||||
#include <px4_module.h>
|
||||
#include <px4_log.h>
|
||||
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
|
||||
#include <parameters/param.h>
|
||||
#include <px4_cli.h>
|
||||
|
||||
#ifndef MODULE_NAME
|
||||
#define MODULE_NAME "cli"
|
||||
#endif
|
||||
|
||||
#include <px4_log.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef MODULE_NAME
|
||||
#define MODULE_NAME "log"
|
||||
#endif
|
||||
|
||||
#include <px4_log.h>
|
||||
#if defined(__PX4_POSIX)
|
||||
#if !defined(__PX4_CYGWIN)
|
||||
|
||||
@@ -37,10 +37,17 @@
|
||||
*/
|
||||
|
||||
#include <board_config.h>
|
||||
#include <px4_log.h>
|
||||
|
||||
#include <px4_workqueue.h>
|
||||
#include <px4_shutdown.h>
|
||||
#include <px4_tasks.h>
|
||||
|
||||
#ifndef MODULE_NAME
|
||||
#define MODULE_NAME "shutdown"
|
||||
#endif
|
||||
|
||||
#include <px4_log.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
Reference in New Issue
Block a user