NuttX: fixes for NuttX build

In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.

uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.

px4_getopt was not exported and wasn't visible in NuttX build.

The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-05-15 12:56:18 -07:00
parent a3a0d0612c
commit 9f391b1867
12 changed files with 340 additions and 37 deletions
+1 -2
View File
@@ -121,7 +121,7 @@ static int reorder(int argc, char **argv, const char *options)
// Argv is changed to put all options and option args at the beginning,
// followed by non-options.
//
int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const char **myoptarg)
__EXPORT int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const char **myoptarg)
{
char *p;
char c;
@@ -149,4 +149,3 @@ int px4_getopt(int argc, char *argv[], const char *options, int *myoptind, const
}
return -1;
}
@@ -72,21 +72,6 @@ px4_systemreset(bool to_bootloader)
while(true);
}
static void kill_task(FAR struct tcb_s *tcb, FAR void *arg);
void px4_killall()
{
// printf("Sending SIGUSR1 to all processes now\n");
/* iterate through all tasks and send kill signal */
sched_foreach(kill_task, NULL);
}
static void kill_task(FAR struct tcb_s *tcb, FAR void *arg)
{
kill(tcb->pid, SIGUSR1);
}
int px4_task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, main_t entry, char * const argv[])
{
int pid;