purge broken qurt support and atlflight boards

This commit is contained in:
Daniel Agar
2021-07-15 13:17:15 -04:00
parent 4a0fa08953
commit 65745a3676
116 changed files with 58 additions and 11410 deletions
@@ -36,17 +36,6 @@ add_subdirectory(px4_daemon)
add_subdirectory(lockstep_scheduler)
set(EXTRA_DEPENDS)
if("${CONFIG_SHMEM}" STREQUAL "1")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
include(hexagon_sdk)
include_directories(${HEXAGON_SDK_INCLUDES})
include_directories(${PX4_BINARY_DIR}/platforms/posix)
list(APPEND SHMEM_SRCS
shmem_posix.cpp
)
add_definitions(-DCONFIG_SHMEM=1)
set(EXTRA_DEPENDS generate_px4muorb_stubs)
endif()
add_library(px4_layer
px4_posix_impl.cpp
@@ -57,7 +46,6 @@ add_library(px4_layer
drv_hrt.cpp
cpuload.cpp
print_load.cpp
${SHMEM_SRCS}
)
target_compile_definitions(px4_layer PRIVATE MODULE_NAME="px4")
target_compile_options(px4_layer PRIVATE -Wno-cast-align) # TODO: fix and enable
+1 -13
View File
@@ -317,15 +317,6 @@ int main(int argc, char **argv)
pxh.run_pxh();
}
// When we exit, we need to stop muorb on Snapdragon.
#ifdef __PX4_POSIX_EAGLE
// Sending muorb stop is needed if it is running to exit cleanly.
// TODO: we should check with px4_task_is_running("muorb") before stopping it.
std::string muorb_stop_cmd("muorb stop");
px4_daemon::Pxh::process_line(muorb_stop_cmd, true);
#endif
std::string cmd("shutdown");
px4_daemon::Pxh::process_line(cmd, true);
@@ -451,10 +442,7 @@ void sig_int_handler(int sig_num)
void set_cpu_scaling()
{
#ifdef __PX4_POSIX_EAGLE
// On Snapdragon we miss updates in sdlog2 unless all 4 CPUs are run
// at the maximum frequency all the time.
// Interestingely, cpu0 and cpu3 set the scaling for all 4 CPUs on Snapdragon.
#if 0
system("echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor");
system("echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor");
@@ -73,19 +73,6 @@ FILE *get_stdout(bool *isatty_)
return stdout;
}
#ifdef __PX4_POSIX_EAGLE
// XXX FIXME: thread_data_ptr is set to 0x1 in the main thread on Snapdragon
// even though the pthread_key has been created.
// We can catch this using the check below but we have no clue why this happens.
if (thread_data_ptr == (void *)0x1) {
if (isatty_) { *isatty_ = isatty(1); }
return stdout;
}
#endif
if (thread_data_ptr->thread_stdout == nullptr) {
if (isatty_) { *isatty_ = isatty(1); }
@@ -1,125 +0,0 @@
/****************************************************************************
*
* Copyright (c) 2015 Vijay Venkatraman. All rights reserved.
*
* 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 PX4 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.
*
****************************************************************************/
#include <px4_platform_common/defines.h>
#include <px4_platform_common/posix.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <systemlib/err.h>
#include <errno.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <drivers/drv_hrt.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <parameters/param.h>
#include <px4_platform_common/shmem.h>
#include "px4muorb.h"
//#define SHMEM_DEBUG
static uint64_t update_from_shmem_prev_time = 0, update_from_shmem_current_time = 0;
extern unsigned char *adsp_changed_index;
struct param_wbuf_s {
union param_value_u val;
param_t param;
bool unsaved;
};
/*update value and param's change bit in shared memory*/
void update_to_shmem(param_t param, union param_value_u value)
{
if (px4muorb_param_update_to_shmem(param, (unsigned char *) &value, sizeof(value))) {
PX4_ERR("krait update param %u failed", param);
}
}
void update_index_from_shmem(void)
{
if (!adsp_changed_index) {
PX4_ERR("%s no param buffer", __FUNCTION__);
return;
}
px4muorb_param_update_index_from_shmem(adsp_changed_index, PARAM_BUFFER_SIZE);
}
static void update_value_from_shmem(param_t param, union param_value_u *value)
{
if (px4muorb_param_update_value_from_shmem(param, (unsigned char *) value, sizeof(union param_value_u))) {
PX4_ERR("%s get param failed", __FUNCTION__);
}
}
int update_from_shmem(param_t param, union param_value_u *value)
{
unsigned int byte_changed, bit_changed;
unsigned int retval = 0;
if (!adsp_changed_index) {
PX4_ERR("%s no param buffer", __FUNCTION__);
return 0;
}
update_from_shmem_current_time = hrt_absolute_time();
if ((update_from_shmem_current_time - update_from_shmem_prev_time)
> 1000000) { //update every 1 second
update_from_shmem_prev_time = update_from_shmem_current_time;
update_index_from_shmem();
}
byte_changed = param / 8;
bit_changed = 1 << param % 8;
if (adsp_changed_index[byte_changed] & bit_changed) {
update_value_from_shmem(param, value);
adsp_changed_index[byte_changed] &= ~bit_changed; //clear the bit
retval = 1;
}
//else {PX4_INFO("no change to param %s", param_name(param));}
PX4_DEBUG("%s %d bit on adsp index[%d]",
(retval) ? "cleared" : "unchanged", bit_changed, byte_changed);
return retval;
}