Skip to content

Commit

Permalink
Use tool to restore defconfig sections after make [old|menu]config
Browse files Browse the repository at this point in the history
   invocation:
      make px4fmu-v2_default oldconfig_px4fmu-v2
      make px4fmu-v2_default menuconfig_px4fmu-v2
  • Loading branch information
David Sidrane committed Jan 27, 2017
1 parent 0596932 commit 9f357c4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmake/nuttx/px4_impl_nuttx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,23 @@ function(px4_nuttx_add_export)
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "Configuring NuttX for ${CONFIG} with ${config_nuttx_config}")

# manual reconfigure helper
add_custom_target(reconfigure_nuttx_${CONFIG}
# manual reconfigure helpers
add_custom_target(oldconfig_${CONFIG}
COMMAND cd ${nuttx_src}/nuttx
COMMAND ${MAKE} -C ${nuttx_src}/nuttx CONFIG_ARCH_BOARD=${CONFIG} oldconfig
COMMAND ${CP} ${nuttx_src}/nuttx/.config ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/${config_nuttx_config}/defconfig
COMMAND ${PX4_SOURCE_DIR}/Tools/nuttx_defconf_tool.sh ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/${config_nuttx_config}/defconfig
DEPENDS ${nuttx_src}/nuttx/.config
COMMENT "Running NuttX make oldconfig for ${CONFIG} with ${config_nuttx_config}"
USES_TERMINAL)

add_custom_target(menuconfig_${CONFIG}
COMMAND cd ${nuttx_src}/nuttx
COMMAND ${MAKE} -C ${nuttx_src}/nuttx CONFIG_ARCH_BOARD=${CONFIG} menuconfig
COMMAND ${CP} ${nuttx_src}/nuttx/.config ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/${config_nuttx_config}/defconfig
COMMAND ${PX4_SOURCE_DIR}/Tools/nuttx_defconf_tool.sh ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/${config_nuttx_config}/defconfig
DEPENDS ${nuttx_src}/nuttx/.config
COMMENT "Reconfiguring NuttX for ${CONFIG} with ${config_nuttx_config}"
COMMENT "Running NuttX make menuconfig for ${CONFIG} with ${config_nuttx_config}"
USES_TERMINAL)

# build and export
Expand Down

0 comments on commit 9f357c4

Please sign in to comment.