comejv commented on issue #16689:
URL: https://github.com/apache/nuttx/issues/16689#issuecomment-3058707748

   I figured it out! From my tests the best way to do it is to create new 
configs in the nuttx sources, with CMake targets In the end here are the two 
targets I'm using:
   ```cmake
   add_custom_target(install_custom_defconfig
     COMMAND ${CMAKE_COMMAND} -E make_directory
             
"${NUTTX_SOURCE_DIR}/boards/arm/stm32h7/nucleo-h743zi/configs/${NUTTX_CONFIG_NAME}"
     COMMAND ${CMAKE_COMMAND} -E copy_if_different
             
"${CMAKE_CURRENT_SOURCE_DIR}/nuttx-configs/${NUTTX_CONFIG_NAME}.defconfig"
             
"${NUTTX_SOURCE_DIR}/boards/arm/stm32h7/nucleo-h743zi/configs/${NUTTX_CONFIG_NAME}/defconfig"
     COMMENT "Installing custom defconfig as board configuration: 
${NUTTX_CONFIG_NAME}"
   )
   
   add_dependencies(install_custom_defconfig symlink_nuttx_apps 
patch_nuttx_kconfig)
   
   add_custom_target(save_nuttx_config
     COMMAND ${CMAKE_COMMAND} --build "${NUTTX_BUILD_DIR}" --target 
savedefconfig
     COMMAND ${CMAKE_COMMAND} -E copy_if_different 
"${NUTTX_BUILD_DIR}/defconfig" 
"${CMAKE_CURRENT_SOURCE_DIR}/nuttx-configs/${NUTTX_CONFIG_NAME}.defconfig"
     COMMENT "Saving NuttX defconfig to 
${CMAKE_CURRENT_SOURCE_DIR}/nuttx-configs/${NUTTX_CONFIG_NAME}.defconfig"
   )
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to