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
+19 -3
View File
@@ -72,11 +72,27 @@ foreach(tool ddd)
endif()
endforeach()
set(LINKER_FLAGS "-Wl,-gc-sections")
set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
set(cpu_flags)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m7")
set(cpu_flags "-mcpu=cortex-m7 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m4")
set(cpu_flags "-mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m3")
set(cpu_flags "-mcpu=cortex-m3 -mthumb -march=armv7-m")
else ()
message(FATAL_ERROR "Processor not recognised in toolchain file")
endif()
set(c_flags "-fno-common -ffunction-sections -fdata-sections")
set(cxx_flags "-fno-common -ffunction-sections -fdata-sections")
set(CMAKE_C_FLAGS "${c_flags} ${cpu_flags}" CACHE INTERNAL "" FORCE)
set(CMAKE_CXX_FLAGS "${cxx_flags} ${cpu_flags}" CACHE INTERNAL "" FORCE)
set(CMAKE_ASM_FLAGS "${cpu_flags} -D__ASSEMBLY__ " CACHE INTERNAL "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${cpu_flags} -nodefaultlibs -nostdlib -Wl,--warn-common,--gc-sections" CACHE INTERNAL "" FORCE)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)