Integrated cmake_hexagon for qurt build

Still a WIP since the IDL file needs to be replace with the
muorb IDL file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2016-01-10 20:54:26 +01:00
committed by Lorenz Meier
parent 4b659f1995
commit f22c574b87
10 changed files with 32 additions and 44 deletions
+13 -16
View File
@@ -1,32 +1,29 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes")
px4_qurt_generate_builtin_commands(
OUT ${CMAKE_BINARY_DIR}/apps.h
MODULE_LIST ${module_libraries})
# Clear -rdynamic flag which fails for hexagon
# this change is scoped in this directory and below
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
# Enable build without HexagonSDK to check link dependencies
if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
add_executable(mainapp
${CMAKE_SOURCE_DIR}/src/platforms/qurt/dspal/dspal_stub.c
${CMAKE_BINARY_DIR}/apps.h)
else()
add_library(mainapp
QURT_BUNDLE(APP_NAME
mainapp
DSP_SOURCES
${CMAKE_SOURCE_DIR}/src/platforms/qurt/dspal/dspal_stub.c
${CMAKE_BINARY_DIR}/apps.h)
${CMAKE_BINARY_DIR}/apps.h
DSP_LINK_LIBS
${module_libraries}
${target_libraries}
df_driver_framework
m
)
endif()
target_link_libraries(mainapp
-Wl,--whole-archive
${module_libraries}
${target_libraries}
df_driver_framework
m
-Wl,--no-whole-archive
-Wl,${TOOLSLIB}/pic/libstdc++.a)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -74,12 +74,17 @@ static uint64_t IMUusec = 0;
static constexpr float rc = 10.0f; // RC time constant of 1st order LPF in seconds
static constexpr uint64_t FILTER_INIT_DELAY = 1 * 1000 * 1000; ///< units: microseconds
static constexpr float POS_RESET_THRESHOLD = 5.0f; ///< Seconds before we signal a total GPS failure
// These are unused
#if 0
static constexpr unsigned MAG_SWITCH_HYSTERESIS =
10; ///< Ignore the first few mag failures (which amounts to a few milliseconds)
static constexpr unsigned GYRO_SWITCH_HYSTERESIS =
5; ///< Ignore the first few gyro failures (which amounts to a few milliseconds)
static constexpr unsigned ACCEL_SWITCH_HYSTERESIS =
5; ///< Ignore the first few accel failures (which amounts to a few milliseconds)
#endif
static constexpr float EPH_LARGE_VALUE = 1000.0f;
static constexpr float EPV_LARGE_VALUE = 1000.0f;
@@ -291,12 +291,6 @@ private:
namespace mc_att_control
{
/* oddly, ERROR is not defined for c++ */
#ifdef ERROR
# undef ERROR
#endif
static const int ERROR = -1;
MulticopterAttitudeControl *g_control;
}
@@ -1025,4 +1019,4 @@ int mc_att_control_main(int argc, char *argv[])
warnx("unrecognized command");
return 1;
}
}
@@ -333,12 +333,6 @@ private:
namespace pos_control
{
/* oddly, ERROR is not defined for c++ */
#ifdef ERROR
# undef ERROR
#endif
static const int ERROR = -1;
MulticopterPositionControl *g_control;
}
@@ -38,7 +38,6 @@
// static intialization.
uORB::FastRpcChannel uORB::FastRpcChannel::_Instance;
static hrt_abstime _check_time;
static unsigned long _dropped_pkts;
static unsigned long _get_min = 0xFFFFFF;
static unsigned long _get_max = 0;
@@ -136,7 +135,6 @@ int16_t uORB::FastRpcChannel::send_message(const char *messageName, int32_t leng
int16_t rc = 0;
hrt_abstime t1, t2;
static hrt_abstime check_time = 0;
int32_t initial_queue_size = 0;
if (_RemoteSubscribers.find(messageName) == _RemoteSubscribers.end()) {
//there is no-remote subscriber. So do not queue the message.
@@ -280,7 +278,7 @@ int16_t uORB::FastRpcChannel::get_data
static hrt_abstime check_time = 0;
hrt_abstime t1 = hrt_absolute_time();
_DataAvailableSemaphore.wait();
hrt_abstime t2 = hrt_absolute_time();
// hrt_abstime t2 = hrt_absolute_time();
_QueueMutex.lock();
if (DataQSize() != 0 || ControlQSize() != 0) {
@@ -395,7 +393,7 @@ int16_t uORB::FastRpcChannel::get_bulk_data
static hrt_abstime check_time = 0;
hrt_abstime t1 = hrt_absolute_time();
_DataAvailableSemaphore.wait();
hrt_abstime t2 = hrt_absolute_time();
//hrt_abstime t2 = hrt_absolute_time();
_QueueMutex.lock();
-1
View File
@@ -102,7 +102,6 @@ static void process_commands(map<string, px4_main_t> &apps, const char *cmds)
vector<string> appargs;
int i = 0;
const char *b = cmds;
bool found_first_char = false;
char arg[256];
// Eat leading whitespace
@@ -363,7 +363,6 @@ static void timer_cb(void *data)
int px4_sem_timedwait(px4_sem_t *sem, const struct timespec *ts)
{
void *result;
work_s _hpwork = {};
// Create a timer to unblock