mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 00:33:34 +08:00
QuRT: Hello world app for QuRT
DSPAL for QuRT is still missing the pthreads exports and there is no exported sleep function. These functions are stubbed out for the time being. This is based on the 6.4.05 version of the Hexagon tools. The Hexagon tools and DSPAL are needed to build the qurt target. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -44,20 +44,21 @@
|
||||
#include <string.h>
|
||||
#include <sched.h>
|
||||
|
||||
#define SCHED_DEFAULT SCHED_FIFO
|
||||
#define SCHED_PRIORITY_MAX sched_get_priority_max(SCHED_FIFO)
|
||||
#define SCHED_PRIORITY_DEFAULT sched_get_priority_max(SCHED_FIFO)
|
||||
|
||||
static int daemon_task; /* Handle of deamon task / thread */
|
||||
|
||||
//using namespace px4;
|
||||
|
||||
extern "C" __EXPORT int hello_main(int argc, char *argv[]);
|
||||
|
||||
static void usage()
|
||||
{
|
||||
printf("usage: hello {start|stop|status}\n");
|
||||
}
|
||||
int hello_main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
printf("argc = %d %s %s\n", argc, argv[0], argv[1]);
|
||||
if (argc < 2) {
|
||||
printf("usage: hello {start|stop|status}\n");
|
||||
usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -74,7 +75,7 @@ int hello_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 5,
|
||||
2000,
|
||||
PX4_MAIN,
|
||||
(argv) ? (char* const*)&argv[2] : (char* const*)NULL);
|
||||
(char* const*)argv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -95,6 +96,6 @@ int hello_main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("usage: hello_main {start|stop|status}\n");
|
||||
usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user