如何移植在C/C++的整个VS代码项目中在Linux到Windows上?

发布于 2025-02-07 12:48:49 字数 813 浏览 4 评论 0原文

我在Linux上有一个工作项目,并且成功地将代码刷新到了NRF5480-DK控制器。现在,我正在尝试在Windows上执行相同的操作。我已经按照文档中建议的所有工具安装了 https://infocenter.nordicsemi.com/index.jsp?topic=%2FUG_NRF_NRF_NRF_CLTOOLS%2FUG;

项目结构是

-  build
- .vscode
  - c_cpp_properties.json
  - launch.json
  - settings.json
  - tasks.json
- include
   - *.h
- src
  - *.c
- linked.ld
- Makefile

我已经安装了编译器和SDK文件,并在settings.json文件中给出了路径。

{
    "sdkRoot": "/nRF5_SDK_17.1.0_ddde560/nRF5_SDK_17.1.0_ddde560",
    "gnuInstallRoot": "/GNU Arm Embedded Toolchain/102021/bin/",
    "C_Cpp.errorSquiggles": "Enabled"
}

我应该对项目结构进行哪些更改?我应该用cmake代替makefile吗? 关于如何进行的任何提示?

I have a working project in Linux and I have successfully flashed the code on to a nRF5480-DK controller. Now I am trying to do the same on windows.I have installed all the tools as recommended in the documentation https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf_cltools%2FUG%2Fcltools%2Fnrf_installation.html.

The project structure is

-  build
- .vscode
  - c_cpp_properties.json
  - launch.json
  - settings.json
  - tasks.json
- include
   - *.h
- src
  - *.c
- linked.ld
- Makefile

I have installed the compiler and sdk files and have given the path in settings.json file.

{
    "sdkRoot": "/nRF5_SDK_17.1.0_ddde560/nRF5_SDK_17.1.0_ddde560",
    "gnuInstallRoot": "/GNU Arm Embedded Toolchain/102021/bin/",
    "C_Cpp.errorSquiggles": "Enabled"
}

What changes should I make to the project structure? Should I replace Makefile with CMake?
Any tips on how to proceed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文