NuttX upgrade cmake wrapper (#7873)

* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
This commit is contained in:
Daniel Agar
2017-09-29 10:13:51 -04:00
parent 11e518f494
commit 01b3e6fd25
159 changed files with 3220 additions and 4256 deletions
@@ -33,88 +33,87 @@
if(NOT GENERATE_RTPS_BRIDGE MATCHES "off")
find_program(FASTRTPSGEN fastrtpsgen
PATHS $ENV{FASTRTPSGEN_DIR})
if(NOT FASTRTPSGEN)
message(WARNING "WARNING: Unable to find fastrtpsgen. Building PX4 without RTPS bridge support")
px4_add_module(
MODULE modules__micrortps_bridge__micrortps_client
MAIN micrortps_client
SRCS
microRTPS_client_dummy.cpp
DEPENDS
platforms__common
)
return()
endif()
find_program(FASTRTPSGEN fastrtpsgen PATHS $ENV{FASTRTPSGEN_DIR})
if(NOT FASTRTPSGEN)
message(STATUS "WARNING: Unable to find fastrtpsgen. Building PX4 without RTPS bridge support")
px4_add_module(
MODULE modules__micrortps_bridge__micrortps_client
MAIN micrortps_client
SRCS
microRTPS_client_dummy.cpp
DEPENDS
platforms__common
)
return()
endif()
include_directories(.)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(.)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${PX4_SOURCE_DIR}/src/lib/micro-CDR/include)
include_directories(${PX4_BINARY_DIR}/src/lib/micro-CDR/include/microcdr)
# Do not delete everything in the current dir
set(msg_out_path ${CMAKE_CURRENT_BINARY_DIR})
set(topic_msg_path ${PX4_SOURCE_DIR}/msg)
# Do not delete everything in the current dir
set(msg_out_path ${CMAKE_CURRENT_BINARY_DIR})
set(topic_msg_path ${PX4_SOURCE_DIR}/msg)
set(send_topic_files)
foreach(topic ${config_rtps_send_topics})
list(APPEND send_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)
endforeach()
set(send_topic_files)
foreach(topic ${config_rtps_send_topics})
list(APPEND send_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)
endforeach()
set(receive_topic_files)
foreach(topic ${config_rtps_receive_topics})
list(APPEND receive_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)
endforeach()
set(receive_topic_files)
foreach(topic ${config_rtps_receive_topics})
list(APPEND receive_topic_files ${PX4_SOURCE_DIR}/msg/${topic}.msg)
endforeach()
foreach(topic ${config_rtps_send_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.h)
endforeach()
foreach(topic ${config_rtps_send_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.h)
endforeach()
foreach(topic ${config_rtps_receive_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.h)
endforeach()
foreach(topic ${config_rtps_receive_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.h)
endforeach()
if (NOT "${config_rtps_send_topics}" STREQUAL "" OR NOT "${config_rtps_receive_topics}" STREQUAL "")
set(topic_bridge_files_out microRTPS_client.cpp microRTPS_transport.cpp microRTPS_transport.h)
set(topic_bridge_files_out microRTPS_client.cpp microRTPS_transport.cpp microRTPS_transport.h)
set(send_topic_files_opt)
if (NOT "${send_topic_files}" STREQUAL "")
set(send_topic_opt "-s")
endif()
set(send_topic_files_opt)
if (NOT "${send_topic_files}" STREQUAL "")
set(send_topic_opt "-s")
endif()
set(receive_topic_files_opt)
if (NOT "${receive_topic_files}" STREQUAL "")
set(receive_topic_opt "-r")
endif()
set(receive_topic_files_opt)
if (NOT "${receive_topic_files}" STREQUAL "")
set(receive_topic_opt "-r")
endif()
add_custom_command(OUTPUT ${topic_bridge_files_out}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/generate_microRTPS_bridge.py
-f $ENV{FASTRTPSGEN_DIR}
${send_topic_opt} ${send_topic_files}
${receive_topic_opt} ${receive_topic_files}
-t ${topic_msg_path}
-u ${msg_out_path}
DEPENDS ${DEPENDS} ${send_topic_files} ${receive_topic_files}
COMMENT "Generating RTPS topic bridge"
VERBATIM
)
add_custom_command(OUTPUT ${topic_bridge_files_out}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/generate_microRTPS_bridge.py
-f $ENV{FASTRTPSGEN_DIR}
${send_topic_opt} ${send_topic_files}
${receive_topic_opt} ${receive_topic_files}
-t ${topic_msg_path}
-u ${msg_out_path}
DEPENDS ${DEPENDS} ${send_topic_files} ${receive_topic_files}
COMMENT "Generating RTPS topic bridge"
VERBATIM
)
add_custom_target(topic_bridge_files DEPENDS ${topic_bridge_files_out})
px4_add_module(
MODULE modules__micrortps_bridge__micrortps_client
MAIN micrortps_client
STACK_MAIN 4096
SRCS
${msg_out_path}/microRTPS_transport.cpp
${msg_out_path}/microRTPS_client.cpp
microRTPS_client_main.cpp
DEPENDS
platforms__common
topic_bridge_files
)
endif()
endif()
px4_add_module(
MODULE modules__micrortps_bridge__micrortps_client
MAIN micrortps_client
STACK_MAIN 4096
SRCS
microRTPS_transport.cpp
microRTPS_client.cpp
microRTPS_client.h
microRTPS_client_main.cpp
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
endif()
@@ -35,15 +35,16 @@
#include <cinttypes>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <termios.h>
#include <px4_config.h>
#include <px4_getopt.h>
#include <px4_module.h>
#include <px4_posix.h>
#include <px4_tasks.h>
#include <px4_time.h>
#include <px4_module.h>
extern "C" __EXPORT int micrortps_client_main(int argc, char *argv[]);