Raspberry Pi PicoマイコンのC言語開発環境をWindowsに構築するために、Windowsに構築するために、https://www.zep.co.jp/nbeppu/article/z-pico-da2/
を参考に
setx PICO_SDK_PATH "C:/lib/Pico/pico-sdk"
成功:指定された値は保存されました。
cd C:/lib/Pico/pico-examples
mkdir build
cd build
cmake -G "NMake Makefiles" ..
と進めていったのですが、
PICO platform is rp2040.
CMake Error at C:/lib/Pico/pico-sdk/cmake/preload/toolchains/find_compiler.cmake:28 (message):
Compiler 'arm-none-eabi-g++' not found, you can specify search path with
"PICO_TOOLCHAIN_PATH".
Call Stack (most recent call first):
C:/lib/Pico/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake:21 (pico_find_compiler)
C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:124 (include)
CMakeLists.txt:6 (project)
CMake Error: CMake was unable to find a build program corresponding to "NMake Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
のようなエラーが発生してしまいました。どのようにしたら、cmakeがうまくいくでしょうか?
C:\lib\Pico\pico-examples\buildのCMakeCache.txtは以下のようになっております。
# This is the CMakeCache file. # For build in directory: c:/lib/Pico/pico-examples/build # It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY. ######################## # EXTERNAL cache entries ######################## //Choose the type of build, options are: 'Debug', 'Release', 'MinSizeRel', // 'RelWithDebInfo'. CMAKE_BUILD_TYPE:STRING=Release //Value Computed by CMake CMAKE_PROJECT_DESCRIPTION:STATIC= //Value Computed by CMake CMAKE_PROJECT_HOMEPAGE_URL:STATIC= //Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=pico_examples //Path to a program. PICO_COMPILER_CC:FILEPATH= //Path to a program. PICO_COMPILER_CXX:FILEPATH=PICO_COMPILER_CXX-NOTFOUND //PICO Build platform (e.g. rp2040, host) PICO_PLATFORM:STRING=rp2040 //Set to ON to fetch copy of SDK from git if not otherwise locatable PICO_SDK_FETCH_FROM_GIT:BOOL=OFF //location to download SDK PICO_SDK_FETCH_FROM_GIT_PATH:FILEPATH= //Path to the Raspberry Pi Pico SDK PICO_SDK_PATH:PATH=C:/lib/Pico/pico-sdk //Value Computed by CMake pico_examples_BINARY_DIR:STATIC=C:/lib/Pico/pico-examples/build //Value Computed by CMake pico_examples_IS_TOP_LEVEL:STATIC=ON //Value Computed by CMake pico_examples_SOURCE_DIR:STATIC=C:/lib/Pico/pico-examples ######################## # INTERNAL cache entries ######################## //STRINGS property for variable: CMAKE_BUILD_TYPE CMAKE_BUILD_TYPE-STRINGS:INTERNAL=Debug;Release;MinSizeRel;RelWithDebInfo //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=c:/lib/Pico/pico-examples/build //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=23 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe //Path to cache edit program executable. CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake-gui.exe //Name of external makefile project generator. CMAKE_EXTRA_GENERATOR:INTERNAL= //Name of generator. CMAKE_GENERATOR:INTERNAL=NMake Makefiles //Generator instance identifier. CMAKE_GENERATOR_INSTANCE:INTERNAL= //Name of generator platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Source directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=C:/lib/Pico/pico-examples //number of local generators CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 //Platform information initialized CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 //Path to CMake installation. CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.23 CMAKE_TOOLCHAIN_FILE:INTERNAL=C:/lib/Pico/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake PICO_CMAKE_PRELOAD_PLATFORM_DIR:INTERNAL=C:/lib/Pico/pico-sdk/cmake/preload/platforms PICO_CMAKE_PRELOAD_PLATFORM_FILE:INTERNAL=C:/lib/Pico/pico-sdk/cmake/preload/platforms/rp2040.cmake PICO_TOOLCHAIN_PATH:INTERNAL=
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。