anchao commented on code in PR #8449: URL: https://github.com/apache/nuttx/pull/8449#discussion_r1098677197
########## Kconfig: ########## @@ -2124,7 +2132,7 @@ source "openamp/Kconfig" endmenu menu "Application Configuration" -source "$APPSDIR/Kconfig" +source "$APPSBINDIR/Kconfig" Review Comment: NuttX's kconfig system is different from other RTOS. Some Kconfigs are dynamically generated through different configurations of the system. For example: https://github.com/apache/nuttx/blob/1cb11968b7b207806cbfef9012943efae9819258/Kconfig#L2127 https://github.com/apache/nuttx/blob/1cb11968b7b207806cbfef9012943efae9819258/arch/Kconfig#L232 In the latest cmake environment, we will support out-of-tree build, which means that the "out" directory can be specified through compilation parameters, and multiple configurations can be built with same code base: ```bash cmake -B nsh -DBOARD_CONFIG=sim/nsh -GNinja cmake -B nsh2 -DBOARD_CONFIG=sim/nsh2 -GNinja ``` cmake can help us solve the source code out-of-tree support, but the kconfig system does not work, so we optimize the dynamically created Kconfig to a version with configurable paths, so that when compiling different configurations, only the "out" directory generate a temporary Kconfig, To achieve the purpose of decoupling temporary files and nuttx directories: ```bash nuttx/out/nsh/apps$ ls audioutils crypto graphics _home_archer_code_nuttx_n8_apps_fsutils_Kconfig _home_archer_code_nuttx_n8_apps_math_Kconfig include mlearning testing boot dummy.c _home_archer_code_nuttx_n8_apps_audioutils_Kconfig _home_archer_code_nuttx_n8_apps_games_Kconfig _home_archer_code_nuttx_n8_apps_mlearning_Kconfig industry modbus wireless builtin examples _home_archer_code_nuttx_n8_apps_boot_Kconfig _home_archer_code_nuttx_n8_apps_gpsutils_Kconfig _home_archer_code_nuttx_n8_apps_netutils_Kconfig interpreters netutils canutils fsutils _home_archer_code_nuttx_n8_apps_canutils_Kconfig _home_archer_code_nuttx_n8_apps_graphics_Kconfig _home_archer_code_nuttx_n8_apps_system_Kconfig Kconfig nshlib CMakeFiles games _home_archer_code_nuttx_n8_apps_crypto_Kconfig _home_archer_code_nuttx_n8_apps_industry_Kconfig _home_archer_code_nuttx_n8_apps_testing_Kconfig libapps.a platform cmake_install.cmake gpsutils _home_archer_code_nuttx_n8_apps_examples_Kconfig _home_archer_code_nuttx_n8_apps_interpreters_Kconfig _home_archer_code_nuttx_n8_apps_wireless_Kconfig math system ``` Of course, if you are not familiar with kconfig, you can try PR https://github.com/apache/nuttx/pull/6718 to experience it. In addition, this change will not break ./tools/configure.sh, you can see that ci can pass normally, so if you don't use cmake, you don't need to care about this PR. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
