NuttX use toolchain math.h and avoid empty drivers/Kconfig

This commit is contained in:
Daniel Agar
2019-11-09 14:00:05 -05:00
committed by Lorenz Meier
parent a8e7ddd44e
commit 99aae8b891
80 changed files with 15 additions and 723 deletions

View File

@@ -110,12 +110,17 @@ execute_process(
)
# NuttX extra files
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_SRC_DIR}/math.h ${NUTTX_DIR}/arch/arm/include/math.h) # copy arm math.h into NuttX source
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_SRC_DIR}/nsh_romfsimg.h ${PX4_BINARY_DIR}/NuttX/nuttx-config/include/nsh_romfsimg.h)
# copy defconfig
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_DEFCONFIG} ${NUTTX_DIR}/.config)
# create empty drivers/Kconfig
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/NuttX/nuttx-config/drivers
COMMAND ${CMAKE_COMMAND} -E touch ${PX4_BINARY_DIR}/NuttX/nuttx-config/drivers/Kconfig
)
# copy PX4 board config into nuttx
file(STRINGS ${NUTTX_DEFCONFIG} config_expanded REGEX "# Automatically generated file; DO NOT EDIT.")
if (NOT config_expanded)

View File

@@ -71,6 +71,9 @@ function(px4_os_add_flags)
add_definitions(
-D__PX4_NUTTX
-D__DF_NUTTX
-D_SYS_CDEFS_H_ # skip toolchain's <sys/cdefs.h>
-D_SYS_REENT_H_ # skip toolchain's <sys/reent.h>
)
if("${CONFIG_ARMV7M_STACKCHECK}" STREQUAL "y")