mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 00:23:34 +08:00
QuRT: toolchain changes
Reworking toolchain and main.cpp for QuRT to a final link can be done and the apps.h file is autogenerated. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -35,6 +35,15 @@
|
||||
# NuttX / uORB adapter library
|
||||
#
|
||||
|
||||
SRCDIR=$(dir $(MODULE_MK))
|
||||
|
||||
apps.h: $(PX4_BASE)/Tools/qurt_apps.py
|
||||
$(PX4_BASE)/Tools/qurt_apps.py > $@
|
||||
|
||||
# Force creation of apps.h
|
||||
main_.cpp: $(SRCDIR)/../main.cpp apps.h
|
||||
cp $(SRCDIR)/../main.cpp $@
|
||||
|
||||
SRCS = \
|
||||
px4_qurt_impl.cpp \
|
||||
px4_qurt_tasks.cpp \
|
||||
@@ -49,6 +58,7 @@ SRCS = \
|
||||
sq_addlast.c \
|
||||
sq_remfirst.c \
|
||||
sq_addafter.c \
|
||||
dq_rem.c
|
||||
dq_rem.c \
|
||||
main_.cpp
|
||||
|
||||
MAXOPTIMIZATION = -Os
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
#include "systemlib/param/param.h"
|
||||
#include <hexagon_standalone.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -58,6 +60,14 @@ unsigned int sleep(unsigned int sec) { return 0; }
|
||||
|
||||
extern void hrt_init(void);
|
||||
|
||||
void qurt_log(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
printf(fmt, args);
|
||||
printf("n");
|
||||
}
|
||||
|
||||
__END_DECLS
|
||||
|
||||
extern struct wqueue_s gwork[NWORKERS];
|
||||
@@ -71,12 +81,7 @@ void init_once(void)
|
||||
{
|
||||
work_queues_init();
|
||||
hrt_init();
|
||||
}
|
||||
|
||||
void init(int argc, char *argv[], const char *app_name)
|
||||
{
|
||||
printf("App name: %s\n", app_name);
|
||||
|
||||
|
||||
// Create high priority worker thread
|
||||
g_work[HPWORK].pid = px4_task_spawn_cmd("wkr_high",
|
||||
SCHED_DEFAULT,
|
||||
@@ -95,6 +100,11 @@ void init(int argc, char *argv[], const char *app_name)
|
||||
|
||||
}
|
||||
|
||||
void init(int argc, char *argv[], const char *app_name)
|
||||
{
|
||||
PX4_DEBUG("App name: %s\n", app_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Retrieve from the data manager store */
|
||||
@@ -131,12 +141,3 @@ size_t strnlen(const char *s, size_t maxlen)
|
||||
return i;
|
||||
}
|
||||
|
||||
void qurt_log(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
vprintf(fmt, args);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user