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
@@ -361,7 +361,7 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta
return ret;
}
#ifdef PX4_NUTTX
#ifdef __PX4_NUTTX
static transition_result_t disable_publication(const int mavlink_fd)
{
transition_result_t ret;
+1
View File
@@ -41,6 +41,7 @@ MODULE_STACKSIZE = 2048
ifeq ($(PX4_TARGET_OS),nuttx)
SRCS = uORBDevices_nuttx.cpp \
uORBTest_UnitTest.cpp \
uORBManager_nuttx.cpp
else
+1
View File
@@ -35,6 +35,7 @@
#include "uORBCommon.hpp"
#include <px4_config.h>
#include <px4_time.h>
#include <stdio.h>
uORBTest::UnitTest &uORBTest::UnitTest::instance()
{