diff --git a/examples/build_system/cmake/multi_config/README.md b/examples/build_system/cmake/multi_config/README.md index 31a6dcb18f..7787d39d81 100644 --- a/examples/build_system/cmake/multi_config/README.md +++ b/examples/build_system/cmake/multi_config/README.md @@ -82,19 +82,10 @@ This way the common options do not need to be repeated in each of `sdkconfig.pro ### Create configuration profile files via @filename -You can further enhance your build process by using configuration profile files. These profile files contain arguments that streamline the build process for specific scenarios. For example, let's have the following profile files: +You can further enhance your build process by using configuration profile files. These profile files contain arguments that streamline the build process for specific scenarios. Let's have our example profile files: -`profiles/prod`: - -```bash --B build-production -DSDKCONFIG=build-production/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.prod" -``` - -`profiles/debug`: - -```bash --B build-debug -DSDKCONFIG=build-debug/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug" -``` +- [profiles/prod](profiles/prod) +- [profiles/debug](profiles/debug) You can use these profile files to quickly set up the build environment with specific configurations. @@ -105,15 +96,8 @@ This approach simplifies the process of specifying complex command-line argument Moreover, you can combine arguments from a profile file with additional command line arguments. Anywhere on the idf.py command line, you can specify a file as @filename.txt to read one or more arguments from the text file. Arguments in the file can be separated by newlines or spaces and are expanded exactly as if they had appeared in that order on the idf.py command line. -For example, you can create a file named custom_flash.txt: +For example using [cutom_flash.txt](custom_flash.txt), you can expand the command: `idf.py -B build_production @custom_flash.txt monitor` -`custom_flash.txt`: - -```bash --p PORT flash -``` - -Then, you can expand the command: `idf.py -B build_production @filename.txt monitor` ### Generated `sdkconfig` file In this example, `sdkconfig` file is placed into the build directory, instead of the project root directory as it is done by default. This allows development and production builds to exist side by side. The location of `sdkconfig` file is set using `SDKCONFIG` variable in [project CMakeLists.txt](CMakeLists.txt) file. diff --git a/examples/build_system/cmake/multi_config/custom_flash.txt b/examples/build_system/cmake/multi_config/custom_flash.txt new file mode 100644 index 0000000000..468a9cc0d1 --- /dev/null +++ b/examples/build_system/cmake/multi_config/custom_flash.txt @@ -0,0 +1 @@ +-p PORT flash diff --git a/examples/build_system/cmake/multi_config/profiles/debug b/examples/build_system/cmake/multi_config/profiles/debug new file mode 100644 index 0000000000..0981c41961 --- /dev/null +++ b/examples/build_system/cmake/multi_config/profiles/debug @@ -0,0 +1 @@ +-B build-debug -DSDKCONFIG=build-debug/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug" diff --git a/examples/build_system/cmake/multi_config/profiles/prod b/examples/build_system/cmake/multi_config/profiles/prod new file mode 100644 index 0000000000..49ebc1cb97 --- /dev/null +++ b/examples/build_system/cmake/multi_config/profiles/prod @@ -0,0 +1 @@ +-B build-production -DSDKCONFIG=build-production/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.prod" diff --git a/tools/test_build_system/test_common.py b/tools/test_build_system/test_common.py index 8a4b8131a0..cc55c5df35 100644 --- a/tools/test_build_system/test_common.py +++ b/tools/test_build_system/test_common.py @@ -237,6 +237,7 @@ def test_create_project(idf_py: IdfPyFunc, idf_copy: Path) -> None: assert ret.returncode == 4, 'Command create-project exit value is wrong.' +@pytest.mark.skipif(sys.platform == 'darwin', reason='macos runner is a shell executor, it would break the file system') def test_create_project_with_idf_readonly(idf_copy: Path) -> None: def change_to_readonly(src: Path) -> None: for root, dirs, files in os.walk(src):