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

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
)

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()
#=============================================================================

1
platforms/qurt/dspal Submodule

Submodule platforms/qurt/dspal added at 0322a4e345

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)

View File

@@ -1,3 +0,0 @@
#pragma once
#define _IO(x,y) (x+y)

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

View File

@@ -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"

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());