Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何支持 ninja menuconfig #1

Closed
murphyzhao opened this issue Jul 14, 2022 · 5 comments
Closed

如何支持 ninja menuconfig #1

murphyzhao opened this issue Jul 14, 2022 · 5 comments

Comments

@murphyzhao
Copy link

请问,要支持 ninja menuconfig 的话,该从哪里入手呢?

@Neutree
Copy link
Owner

Neutree commented Jul 15, 2022

其实有预留参数的, 没暴露出来, 我测试下加上

gen_project_type = "Unix Makefiles"

@Neutree
Copy link
Owner

Neutree commented Jul 15, 2022

好了, 支持好了, 使用方法也写了: 更换工程生成器
提交详情: 9ed1455

@murphyzhao
Copy link
Author

murphyzhao commented Jul 18, 2022

Hi Neutree,
感谢您的及时修复,
我使用最新的代码遇到了问题,
使用 Ninja 生成器可以 build,
但是 menuconfig 失败。

作为对比,使用默认的 Unix 生成器,可以 menuconfig 。

操作环境:

Windows 10 和 Windows 10 WSL2 。

python project menuconfig 失败的日志

上图是 python project.py menuconfig 失败的日志,运行环境为 Windows10 WSL2 。

其他信息:

$ python --version
Python 3.10.5

$ cmake --version
cmake version 3.22.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ ninja --version
1.10.0

git 位置:

murphy@DESKTOP-BT532EP:~/work/cmake-work/c_cpp_project_framework$ git log -1
commit a64e67e4a60844e2d6c940a7f101f0f2b60e3d96 (HEAD -> master, origin/master, origin/HEAD)
Author: Neucrack <CZD666666@gmail.com>
Date:   Fri Jul 15 14:03:58 2022 +0800

    optimize project.py



murphy@DESKTOP-BT532EP:~/work/cmake-work/c_cpp_project_framework/tools/kconfig/Kconfiglib$ git log -1
commit 53c72959ac4d71f99913e4b0eea99261a6585430 (HEAD)
Author: Ulf Magnusson <ulfalizer@gmail.com>
Date:   Sat Aug 3 03:19:35 2019 +0200

    Add a .gitignore that ignores *.pyc

    Might avoid some pain in projects that use Kconfiglib as a submodule.

    Fixes https://github.com/ulfalizer/Kconfiglib/issues/74.

@Neutree
Copy link
Owner

Neutree commented Jul 18, 2022

Ninja 调用 shell 命令的方式好像有点特殊, 不能进入交互模式, 不知道怎么解决。

目前的解决方法就是绕过 Ninja,不使用 Ninja 来调用 menuconfig 命令, 而是直接 python 调用 menuconfig 命令。
已经提交了更新: e6887b8

@murphyzhao
Copy link
Author

非常感谢,目前可以在 ninja 配置下使用 python project.py menuconfig 打开 menuconfig 。

我看到 zephyr 支持使用 ninja menuconfig ,等闲下来的时候再研究下,目前已经可以满足使用啦,多谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants