DriverFramework purge

The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
This commit is contained in:
Daniel Agar
2020-01-09 11:00:40 -05:00
parent 04ba05f5a0
commit de4f594937
165 changed files with 285 additions and 8108 deletions
+3 -4
View File
@@ -26,10 +26,6 @@
path = src/lib/matrix
url = https://github.com/PX4/Matrix.git
branch = master
[submodule "src/lib/DriverFramework"]
path = src/lib/DriverFramework
url = https://github.com/PX4/DriverFramework.git
branch = master
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
@@ -58,3 +54,6 @@
path = cmake/configs/uavcan_board_ident
url = https://github.com/PX4/uavcan_board_ident.git
branch = master
[submodule "platforms/qurt/dspal"]
path = platforms/qurt/dspal
url = https://github.com/ATLFlight/dspal.git
-20
View File
@@ -138,7 +138,6 @@ set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
include(px4_add_module)
set(config_module_list)
set(config_df_driver_list)
include(px4_config)
include(px4_add_board)
@@ -311,25 +310,6 @@ add_subdirectory(msg EXCLUDE_FROM_ALL)
px4_generate_airframes_xml(BOARD ${PX4_BOARD})
#=============================================================================
# DriverFramework
#
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
set(OS ${PX4_PLATFORM})
add_subdirectory(src/lib/DriverFramework/framework)
# List the DriverFramework drivers
if (DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()
set(df_driver_libs)
foreach(driver ${config_df_driver_list})
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
list(APPEND df_driver_libs df_${driver})
message("Adding DF driver: ${driver}")
endforeach()
#=============================================================================
# external projects
#
+1 -2
View File
@@ -828,8 +828,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = @CMAKE_SOURCE_DIR@/src/lib/DriverFramework \
@CMAKE_SOURCE_DIR@/src/modules/uavcan/libuavcan \
EXCLUDE = @CMAKE_SOURCE_DIR@/src/modules/uavcan/libuavcan \
@CMAKE_SOURCE_DIR@/src/modules/micrortps_bridge/micro-CDR \
@CMAKE_SOURCE_DIR@/src/examples \
@CMAKE_SOURCE_DIR@/src/templates
+1 -1
View File
@@ -10,9 +10,9 @@ fi
exec find boards msg src platforms \
-path msg/templates/urtps -prune -o \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/qurt/dspal -prune -o \
-path src/drivers/uavcan/libuavcan -prune -o \
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
-path src/lib/systemlib/uthash -prune -o \
+2 -4
View File
@@ -34,8 +34,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
mpu9250
MODULES
airspeed_selector
attitude_estimator_q
@@ -49,7 +47,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -77,7 +75,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+2 -5
View File
@@ -32,9 +32,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
add_definitions(
-D__PX4_POSIX_EAGLE
-D__PX4_LINUX
# For DriverFramework
-D__DF_LINUX
)
px4_add_board(
@@ -71,7 +68,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -108,7 +105,7 @@ px4_add_board(
sd_bench
shutdown
#tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+1 -6
View File
@@ -47,15 +47,10 @@ px4_add_board(
barometer/bmp280
gps
imu/mpu9250
magnetometer/hmc5883
#magnetometer/hmc5883
qshell/qurt
snapdragon_pwm_out
spektrum_rc
DF_DRIVERS
isl29501
ltc2946
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
+2 -5
View File
@@ -32,9 +32,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=gnu++11>)
add_definitions(
-D__PX4_POSIX_EXCELSIOR
-D__PX4_LINUX
# For DriverFramework
-D__DF_LINUX
)
px4_add_board(
@@ -71,7 +68,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -108,7 +105,7 @@ px4_add_board(
sd_bench
shutdown
#tests # tests and test runner
top
#top
topic_listener
tune_control
ver
-5
View File
@@ -51,11 +51,6 @@ px4_add_board(
qshell/qurt
snapdragon_pwm_out
spektrum_rc
DF_DRIVERS
isl29501
ltc2946
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
+2 -4
View File
@@ -26,8 +26,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
mpu9250
MODULES
airspeed_selector
attitude_estimator_q
@@ -41,7 +39,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -70,7 +68,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
-4
View File
@@ -49,7 +49,6 @@ int rc_init(void)
#ifdef __RC_V0_3
return rc_initialize();
#else
#ifdef __DF_BBBLUE
if (rc_get_state() == RUNNING) { return 0; }
@@ -111,7 +110,6 @@ int rc_init(void)
//i2c, barometer and mpu will be initialized later
rc_set_state(RUNNING);
#endif
return 0;
#endif
@@ -123,7 +121,6 @@ void rc_cleaning(void)
#ifdef __RC_V0_3
rc_cleanup(); return ;
#else
#ifdef __DF_BBBLUE
if (rc_get_state() == EXITING) { return; }
@@ -136,5 +133,4 @@ void rc_cleaning(void)
rc_remove_pid_file();
#endif
#endif
}
+1 -1
View File
@@ -31,7 +31,7 @@
#
############################################################################
if($ENV{AUTOPILOT_HOST})
if(DEFINED ENV{AUTOPILOT_HOST})
set(AUTOPILOT_HOST $ENV{AUTOPILOT_HOST})
else()
set(AUTOPILOT_HOST "navio")
+2 -7
View File
@@ -28,11 +28,6 @@ px4_add_board(
pwm_out_sim
rc_input
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
isl29501
lsm9ds1
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
@@ -46,7 +41,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -75,7 +70,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+2 -2
View File
@@ -39,7 +39,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -68,7 +68,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+2 -2
View File
@@ -31,7 +31,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -65,7 +65,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+2 -2
View File
@@ -32,7 +32,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -67,7 +67,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
+2 -2
View File
@@ -31,7 +31,7 @@ px4_add_board(
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
#load_mon
local_position_estimator
logger
mavlink
@@ -65,7 +65,7 @@ px4_add_board(
sd_bench
shutdown
tests # tests and test runner
top
#top
topic_listener
tune_control
ver
-16
View File
@@ -55,7 +55,6 @@
# [ SYSTEMCMDS <list> ]
# [ EXAMPLES <list> ]
# [ SERIAL_PORTS <list> ]
# [ DF_DRIVERS <list> ]
# [ CONSTRAINED_FLASH ]
# [ TESTING ]
# )
@@ -77,7 +76,6 @@
# SYSTEMCMDS : list of system commands to build for this board (relative to src/systemcmds)
# EXAMPLES : list of example modules to build for this board (relative to src/examples)
# SERIAL_PORTS : mapping of user configurable serial ports and param facing name
# DF_DRIVERS : list of DriverFramework device drivers (includes DriverFramework driver and wrapper)
# CONSTRAINED_FLASH : flag to enable constrained flash options (eg limit init script status text)
# TESTING : flag to enable automatic inclusion of PX4 testing modules
#
@@ -148,7 +146,6 @@ function(px4_add_board)
SYSTEMCMDS
EXAMPLES
SERIAL_PORTS
DF_DRIVERS
OPTIONS
BUILD_BOOTLOADER
CONSTRAINED_FLASH
@@ -264,19 +261,6 @@ function(px4_add_board)
endforeach()
endif()
# DriverFramework drivers
if(DF_DRIVERS)
set(config_df_driver_list)
foreach(driver ${DF_DRIVERS})
list(APPEND config_df_driver_list ${driver})
if(EXISTS "${PX4_SOURCE_DIR}/src/drivers/driver_framework_wrapper/df_${driver}_wrapper")
list(APPEND config_module_list drivers/driver_framework_wrapper/df_${driver}_wrapper)
endif()
endforeach()
set(config_df_driver_list ${config_df_driver_list} PARENT_SCOPE)
endif()
# add board config directory src to build modules
file(RELATIVE_PATH board_support_src_rel ${PX4_SOURCE_DIR}/src ${PX4_BOARD_DIR})
list(APPEND config_module_list ${board_support_src_rel}/src)
-1
View File
@@ -177,7 +177,6 @@ function(px4_add_common_flags)
${PX4_SOURCE_DIR}/src
${PX4_SOURCE_DIR}/src/include
${PX4_SOURCE_DIR}/src/lib
${PX4_SOURCE_DIR}/src/lib/DriverFramework/framework/include
${PX4_SOURCE_DIR}/src/lib/matrix
${PX4_SOURCE_DIR}/src/modules
)
+1 -1
View File
@@ -132,7 +132,7 @@ function(px4_add_module)
endforeach()
endif()
elseif(DYNAMIC AND MAIN AND (${OS} STREQUAL "posix"))
elseif(DYNAMIC AND MAIN AND (${PX4_PLATFORM} STREQUAL "posix"))
add_library(${MODULE} SHARED ${SRCS})
target_compile_definitions(${MODULE} PRIVATE ${MAIN}_main=px4_module_main)
set_target_properties(${MODULE} PROPERTIES
+1 -50
View File
@@ -19,25 +19,17 @@ ${builtin_apps_decl_string}
int shutdown_main(int argc, char *argv[]);
int list_tasks_main(int argc, char *argv[]);
int list_files_main(int argc, char *argv[]);
int list_devices_main(int argc, char *argv[]);
int list_topics_main(int argc, char *argv[]);
int sleep_main(int argc, char *argv[]);
int wait_for_topic(int argc, char *argv[]);
}
extern void px4_show_devices(void);
void init_app_map(apps_map_type &apps)
{
${builtin_apps_string}
${builtin_apps_string}
apps["shutdown"] = shutdown_main;
apps["list_tasks"] = list_tasks_main;
apps["list_files"] = list_files_main;
apps["list_devices"] = list_devices_main;
apps["list_topics"] = list_topics_main;
apps["sleep"] = sleep_main;
apps["wait_for_topic"] = wait_for_topic;
}
void list_builtins(apps_map_type &apps)
@@ -60,18 +52,6 @@ int list_tasks_main(int argc, char *argv[])
return 0;
}
int list_devices_main(int argc, char *argv[])
{
px4_show_devices();
return 0;
}
int list_topics_main(int argc, char *argv[])
{
px4_show_topics();
return 0;
}
int list_files_main(int argc, char *argv[])
{
px4_show_files();
@@ -90,32 +70,3 @@ int sleep_main(int argc, char *argv[])
px4_usleep(usecs);
return 0;
}
#include "uORB/uORB.h"
int wait_for_topic(int argc, char *argv[])
{
if (argc < 2 || argc > 3) {
printf("Usage: wait_for_topic <topic> [timeout_sec]\n");
return 1;
}
struct orb_metadata meta = { .o_name = argv[1],
.o_size = 0,
.o_size_no_padding = 0,
.o_fields = nullptr };
unsigned int timeout = (argc == 3) ? (unsigned int)atoi(argv[2]) : 0;
unsigned int elapsed = 0;
printf("Waiting for topic %s timeout %u\n", argv[1], timeout);
while (orb_exists(&meta, 0) != 0 && (timeout && (elapsed < timeout)))
{
px4_sleep(1);
elapsed += 1;
}
return 0;
}
@@ -54,19 +54,6 @@ constexpr bool PX4_ISFINITE(float x) { return __builtin_isfinite(x); }
constexpr bool PX4_ISFINITE(double x) { return __builtin_isfinite(x); }
#endif /* __cplusplus */
#if defined(__PX4_NUTTX) || defined(__PX4_POSIX)
/****************************************************************************
* Building for NuttX or POSIX.
****************************************************************************/
/* Main entry point */
#define PX4_MAIN_FUNCTION(_prefix) int _prefix##_task_main(int argc, char *argv[])
#else // defined(__PX4_NUTTX) || defined(__PX4_POSIX)
/****************************************************************************/
#error "No target OS defined"
#endif
#if defined(__PX4_NUTTX)
/****************************************************************************
* NuttX specific defines.
@@ -99,9 +86,6 @@ constexpr bool PX4_ISFINITE(double x) { return __builtin_isfinite(x); }
// NuttX _IOC is equivalent to Linux _IO
#define _PX4_IOC(x,y) _IO(x,y)
/* FIXME - Used to satisfy build */
#define getreg32(a) (*(volatile uint32_t *)(a))
#define USEC_PER_TICK (1000000/PX4_TICKS_PER_SEC)
#define USEC2TICK(x) (((x)+(USEC_PER_TICK/2))/USEC_PER_TICK)
@@ -111,7 +95,6 @@ constexpr bool PX4_ISFINITE(double x) { return __builtin_isfinite(x); }
# include "dspal_math.h"
# define PX4_ROOTFSDIR "."
# define PX4_TICKS_PER_SEC 1000L
# define SIOCDEVPRIVATE 999999
#else // __PX4_QURT
@@ -44,7 +44,6 @@
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
#include <stdint.h>
#if defined(__PX4_QURT)
@@ -60,7 +59,10 @@
#ifdef __PX4_NUTTX
#include <poll.h>
typedef struct pollfd px4_pollfd_struct_t;
typedef pollevent_t px4_pollevent_t;
#if defined(__cplusplus)
#define _GLOBAL ::
@@ -73,7 +75,6 @@ typedef struct pollfd px4_pollfd_struct_t;
#define px4_write _GLOBAL write
#define px4_read _GLOBAL read
#define px4_poll _GLOBAL poll
#define px4_fsync _GLOBAL fsync
#define px4_access _GLOBAL access
#define px4_getpid _GLOBAL getpid
@@ -83,34 +84,31 @@ typedef struct pollfd px4_pollfd_struct_t;
#define PX4_STACK_OVERHEAD (1024 * 11)
/**
* Terminates the calling process immediately.
* @return 0 on success, 1 on error
*/
#define px4_exit(status) ({return status;})
__BEGIN_DECLS
typedef short pollevent_t;
typedef short px4_pollevent_t;
typedef struct {
/* This part of the struct is POSIX-like */
int fd; /* The descriptor being polled */
pollevent_t events; /* The input event flags */
pollevent_t revents; /* The output event flags */
px4_pollevent_t events; /* The input event flags */
px4_pollevent_t revents; /* The output event flags */
/* Required for PX4 compatibility */
px4_sem_t *sem; /* Pointer to semaphore used to post output event */
void *priv; /* For use by drivers */
} px4_pollfd_struct_t;
#ifndef POLLIN
#define POLLIN (0x01)
#endif
__EXPORT int px4_open(const char *path, int flags, ...);
__EXPORT int px4_close(int fd);
__EXPORT ssize_t px4_read(int fd, void *buffer, size_t buflen);
__EXPORT ssize_t px4_write(int fd, const void *buffer, size_t buflen);
__EXPORT int px4_ioctl(int fd, int cmd, unsigned long arg);
__EXPORT int px4_poll(px4_pollfd_struct_t *fds, nfds_t nfds, int timeout);
__EXPORT int px4_fsync(int fd);
__EXPORT int px4_poll(px4_pollfd_struct_t *fds, unsigned int nfds, int timeout);
__EXPORT int px4_access(const char *pathname, int mode);
__EXPORT px4_task_t px4_getpid(void);
@@ -127,13 +125,7 @@ __END_DECLS
#define PX4_STACK_ADJUSTED(_s) (_s * (__SIZEOF_POINTER__ >> 2) + PX4_STACK_OVERHEAD)
__BEGIN_DECLS
extern int px4_errno;
__EXPORT void px4_show_devices(void);
__EXPORT void px4_show_files(void);
__EXPORT const char *px4_get_device_names(unsigned int *handle);
__EXPORT void px4_show_topics(void);
__EXPORT const char *px4_get_topic_names(unsigned int *handle);
__END_DECLS
+1
View File
@@ -94,6 +94,7 @@ int px4_register_shutdown_hook(shutdown_hook_t hook)
{
return -EINVAL;
}
int px4_unregister_shutdown_hook(shutdown_hook_t hook)
{
return -EINVAL;
-1
View File
@@ -69,7 +69,6 @@ function(px4_os_add_flags)
add_definitions(
-D__PX4_NUTTX
-D__DF_NUTTX
-D_SYS_CDEFS_H_ # skip toolchain's <sys/cdefs.h>
-D_SYS_REENT_H_ # skip toolchain's <sys/reent.h>
@@ -40,7 +40,7 @@ if (NOT ${PX4_BOARD} MATCHES "px4_io")
board_fat_dma_alloc.c
console_buffer.cpp
gpio.c
px4_nuttx_tasks.c
tasks.cpp
px4_nuttx_impl.cpp
px4_init.cpp
)
@@ -34,7 +34,6 @@
__BEGIN_DECLS
#include <nuttx/spi/spi.h>
/* For historical reasons (NuttX STM32 numbering) PX4 bus numbering is 1 based
* All PX4 code, including, board code is written to assuming 1 based numbering.
@@ -33,11 +33,13 @@
****************************************************************************/
/**
* @file px4_nuttx_tasks.c
* @file tasks.cpp
* Implementation of existing task API for NuttX
*/
#include <nuttx/config.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
#include <sys/wait.h>
#include <stdbool.h>
@@ -50,10 +52,6 @@
#include <errno.h>
#include <stdbool.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/tasks.h>
void
px4_systemreset(bool to_bootloader)
{
-5
View File
@@ -42,7 +42,6 @@ if (("${PX4_BOARD}" MATCHES "atlflight_eagle") OR ("${PX4_BOARD}" MATCHES "atlfl
px4_layer
parameters
${module_libraries}
${df_driver_libs}
${FASTRPC_ARM_LIBS}
pthread m rt
-Wl,--end-group
@@ -57,8 +56,6 @@ else()
target_link_libraries(px4
PRIVATE
${module_libraries}
${df_driver_libs}
df_driver_framework
pthread m
# horrible circular dependencies that need to be teased apart
@@ -109,8 +106,6 @@ endif()
if("${PX4_BOARD}" MATCHES "beaglebone_blue")
target_link_libraries(px4 PRIVATE robotics_cape)
add_dependencies(df_driver_framework librobotcontrol)
add_dependencies(df_mpu9250 librobotcontrol)
elseif("${PX4_BOARD}" MATCHES "emlid_navio2")
target_link_libraries(px4 PRIVATE atomic)
+4 -32
View File
@@ -223,10 +223,7 @@ function(px4_os_add_flags)
if ("${PX4_BOARD}" MATCHES "sitl")
if(UNIX AND APPLE)
add_definitions(
-D__PX4_DARWIN
-D__DF_DARWIN
)
add_definitions(-D__PX4_DARWIN)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
message(FATAL_ERROR "PX4 Firmware requires XCode 8 or newer on Mac OS. Version installed on this system: ${CMAKE_CXX_COMPILER_VERSION}")
@@ -251,46 +248,21 @@ function(px4_os_add_flags)
-U__CUSTOM_FILE_IO__
)
else()
add_definitions(
-D__PX4_LINUX
-D__DF_LINUX
)
add_definitions(-D__PX4_LINUX)
endif()
elseif (("${PX4_BOARD}" MATCHES "navio2") OR ("${PX4_BOARD}" MATCHES "raspberrypi"))
#TODO: move to board support
add_definitions(
-D__PX4_LINUX
# For DriverFramework
-D__DF_LINUX
-D__DF_RPI
)
add_definitions(-D__PX4_LINUX)
elseif ("${PX4_BOARD}" MATCHES "aerotenna_ocpoc")
#TODO: move to board support
add_definitions(
-D__PX4_LINUX
-D__PX4_POSIX_OCPOC # TODO: remove
# For DriverFramework
-D__DF_LINUX
-D__DF_OCPOC
)
add_definitions(-D__PX4_LINUX)
elseif ("${PX4_BOARD}" MATCHES "beaglebone_blue")
#TODO: move to board support
add_definitions(
-D__PX4_LINUX
-D__PX4_POSIX_BBBLUE # TODO: remove
# For DriverFramework
-D__DF_LINUX
-D__DF_BBBLUE
-DRC_AUTOPILOT_EXT # Enable extensions in Robotics Cape Library, TODO: remove
)
@@ -50,7 +50,7 @@ endif()
add_library(px4_layer
px4_posix_impl.cpp
px4_posix_tasks.cpp
tasks.cpp
px4_sem.cpp
px4_init.cpp
lib_crc32.c
-3
View File
@@ -71,7 +71,6 @@
#include <px4_platform_common/posix.h>
#include "apps.h"
#include "DriverFramework.hpp"
#include "px4_daemon/client.h"
#include "px4_daemon/server.h"
#include "px4_daemon/pxh.h"
@@ -281,8 +280,6 @@ int main(int argc, char **argv)
return ret;
}
DriverFramework::Framework::initialize();
px4::init_once();
px4::init(argc, argv, "px4");
@@ -68,7 +68,6 @@ void init_once();
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();
@@ -33,7 +33,6 @@
set(SRCS
stub_daemon.cpp
stub_devmgr.cpp
stub_parameter.cpp
)
@@ -1,10 +0,0 @@
#include "stub_devmgr.h"
namespace DriverFramework
{
int DevMgr::getNextDeviceName(unsigned int &index, const char **instancename)
{
return stub_getNextDeviceName_callback(index, instancename);
}
}
@@ -1,8 +0,0 @@
#pragma once
#include "DevMgr.hpp"
#include <functional>
std::function<int(unsigned int &, const char **)> stub_getNextDeviceName_callback = [](unsigned int &,
const char **) {return 0;};
+4 -4
View File
@@ -1,5 +1,7 @@
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
px4_add_git_submodule(TARGET git_dspal PATH "${PX4_SOURCE_DIR}/platforms/qurt/dspal")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/platforms/qurt/dspal/cmake_hexagon")
include(toolchain/Toolchain-qurt)
include(fastrpc)
include(qurt_lib)
@@ -33,7 +35,7 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
${PX4_BINARY_DIR}/platforms/qurt/px4muorb_skel.c
)
target_link_libraries(px4 PRIVATE ${module_libraries} ${df_driver_libs})
target_link_libraries(px4 PRIVATE ${module_libraries})
else()
# Generate the DSP lib and stubs but not the apps side executable
@@ -45,8 +47,6 @@ else()
LINK_LIBS
modules__muorb__adsp
${module_libraries}
${df_driver_libs}
df_driver_framework
m
)
+3 -9
View File
@@ -108,24 +108,20 @@ endfunction()
#
function(px4_os_add_flags)
set(DSPAL_ROOT src/lib/DriverFramework/dspal)
set(DSPAL_ROOT platforms/qurt/dspal)
include_directories(
${DSPAL_ROOT}/include
${DSPAL_ROOT}/mpu_spi/inc
${DSPAL_ROOT}/sys
${DSPAL_ROOT}/sys/sys
${DSPAL_ROOT}/uart_esc/inc
platforms/posix/include
platforms/qurt/include
)
)
add_definitions(
-D__PX4_POSIX
-D__PX4_QURT
-D__DF_QURT # For DriverFramework
)
)
add_compile_options(
-fPIC
@@ -139,8 +135,6 @@ function(px4_os_add_flags)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
set(DF_TARGET "qurt" CACHE STRING "DriverFramework target" FORCE)
endfunction()
#=============================================================================
-40
View File
@@ -1,40 +0,0 @@
/****************************************************************************
* include/poll.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 NuttX 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.
*
****************************************************************************/
#pragma once
typedef unsigned int nfds_t;
#define POLLIN (0x01)
-3
View File
@@ -1,3 +0,0 @@
#pragma once
#define _IO(x,y) (x+y)
+1 -1
View File
@@ -38,7 +38,7 @@ include_directories(${HEXAGON_8074_INCLUDES})
set(QURT_LAYER_SRCS
px4_qurt_impl.cpp
px4_qurt_tasks.cpp
tasks.cpp
lib_crc32.c
drv_hrt.cpp
qurt_stubs.c
@@ -93,10 +93,8 @@ const char *get_commands()
"param set MAV_TYPE 2\n"
"mixer load /dev/pwm_output0 /startup/quad_x.main.mix\n"
"list_devices\n"
"list_files\n"
"list_tasks\n"
"list_topics\n"
"sleep 10\n"
"list_tasks\n"
"sleep 10\n"
-2
View File
@@ -52,7 +52,6 @@
#include "get_commands.h"
#include "apps.h"
#include "DriverFramework.hpp"
#define MAX_ARGS 8 // max number of whitespace separated args after app name
@@ -196,7 +195,6 @@ int dspal_entry(int argc, char *argv[])
PX4_INFO("In dspal_entry");
apps_map_type apps;
init_app_map(apps);
DriverFramework::Framework::initialize();
px4::init_once();
px4::init(argc, (char **)argv, "px4");
process_commands(apps, get_commands());
+1 -1
View File
@@ -50,7 +50,7 @@ dataman start
bmp280 -I start
df_mpu9250_wrapper start
mpu9250 start
# options: -R rotation
gps start -d /dev/ttyS2 -s -p ubx
+1 -1
View File
@@ -50,7 +50,7 @@ dataman start
bmp280 -I start
df_mpu9250_wrapper start
mpu9250 start
# options: -R rotation
gps start -d /dev/ttyS2 -s -p ubx

Some files were not shown because too many files have changed in this diff Show More