当前位置:   article > 正文

raspberry pi pico建立C++环境报错解决_pico-project-generator 启动不了

pico-project-generator 启动不了

raspberry pi pico建立C++环境报错解决

环境

系统:windows8.1
ARM-GCC-compile
cmake
pico-sdk:https://github.com/raspberrypi/pico-sdk
pico-project-generator:https://github.com/raspberrypi/pico-project-generator
make工具:官网给的是visual studio 2019的nmake,但是报错了,我改成了MinGW32-make

报错情况

前期按照mobyw的库https://github.com/mobyw/pico-getting-started进行安装即可,步骤是:

  • 1、ARM-GCC compile
  • 2、pico-sdk
  • 2、cmake
  • 3、minGW
  • 4、pico-project-generator

使用pi_project.py建立新的project,使用“NMake Makefilfs”时,nmake命令报错如下:

(general) λ cmake ..
PICO_SDK_PATH is E:/pico/sdk/pico-sdk
PICO platform is rp2040.
Using regular optimized debug build (set PICO_DEOPTIMIZED_DEBUG=1 to de-optimize)
PICO target board is pico.
Using board configuration from E:/pico/sdk/pico-sdk/src/boards/include/boards/pico.h
TinyUSB available at E:/pico/sdk/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
Compiling TinyUSB with CFG_TUSB_DEBUG=1
-- Configuring done
-- Generating done
-- Build files have been written to: E:/pico/sdk/pico-project-generator/ProjectwithNmake/build

E:\pico\sdk\pico-project-generator\ProjectwithNmake\build (master -> origin)
(general) λ nmake

Microsoft (R) 程序维护实用工具 14.29.30141.0 版
版权所有 (C) Microsoft Corporation。  保留所有权利。

[  1%] Creating directories for 'ELF2UF2Build'
[  3%] No download step for 'ELF2UF2Build'
[  5%] No update step for 'ELF2UF2Build'
[  6%] No patch step for 'ELF2UF2Build'
[  8%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is MSVC 19.29.30141.0
-- The CXX compiler identification is MSVC 19.29.30141.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - broken
CMake Error at E:/Cmake/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: E:/pico/sdk/pico-project-generator/ProjectwithNmake/build/elf2uf2/CMakeFiles/CMakeTmp

    Run Build Command(s):nmake -f Makefile /nologo cmTC_b3b91\fast &&   "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\nmake.exe"  -f CMakeFiles\cmTC_b3b91.dir\build.make /nologo -L
                  CMakeFiles\cmTC_b3b91.dir\build
    Building C object CMakeFiles/cmTC_b3b91.dir/testCCompiler.c.obj
        E:\Cmake\bin\cmake.exe -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_b3b91.dir\testCCompiler.c.obj.d --working-dir=E:\pico\sdk\pico-project-generator\ProjectwithNmake\build\elf2uf2\CMakeFiles\CMakeTmp --filter-prefix="注意:
 包含文件:  " -- C:\PROGRA~2\MICROS~4\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\cl.exe @C:\Users\asus-pc\Ap
pData\Local\Temp\nm5394.tmp
    testCCompiler.c
    Linking C executable cmTC_b3b91.exe
        E:\Cmake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_b3b91.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MICROS~4\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe /nologo @CMakeFiles\cmTC_b3b91.dir\objects1.rsp @C:\Users\asus-pc\AppData\Local\Temp\nm547F.tmp
    RC Pass 1: command "rc /fo CMakeFiles\cmTC_b3b91.dir/manifest.res CMakeFiles\cmTC_b3b91.dir/manifes
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/468107
推荐阅读
相关标签
  

闽ICP备14008679号