mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-26 16:28:06 +08:00
NuttX use toolchain math.h and avoid empty drivers/Kconfig
This commit is contained in:
committed by
Lorenz Meier
parent
a8e7ddd44e
commit
99aae8b891
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user