platformio / platformio-home

PlatformIO Home
https://docs.platformio.org/page/home/index.html
Apache License 2.0
91 stars 63 forks source link

Could not initialize project #7834

Closed davewyers closed 2 weeks ago

davewyers commented 2 weeks ago

Setting up a new project to test Zephyr on a Nordic nRF52840 throws the following error.

image

image

Resolving nrf52840_dk dependencies... Already up-to-date. Updating metadata for the vscode IDE... UserSideException: Processing nrf52840_dk (platform: nordicnrf52; board: nrf52840_dk; framework: zephyr)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nrf52840_dk.html PLATFORM: Nordic nRF52 (10.4.0+sha.1b11bd6) > Nordic nRF52840-DK HARDWARE: NRF52840 64MHz, 256KB RAM, 1MB Flash DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink) PACKAGES:

Loaded configuration 'C:/Users/DaveWyers/.platformio/packages/framework-zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'

Configuration saved to 'C:/Users/DaveWyers/OneDrive/Documents/PlatformIO/Projects/Upload Test/.pio/build/nrf52840_dk/zephyr/.config'

Kconfig header saved to 'C:/Users/DaveWyers/OneDrive/Documents/PlatformIO/Projects/Upload Test/.pio/build/nrf52840_dk/zephyr/include/generated/autoconf.h'

-- The C compiler identification is GNU 8.2.1 -- The CXX compiler identification is GNU 8.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/DaveWyers/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc.exe -- Configuring incomplete, errors occurred! See also "C:/Users/DaveWyers/OneDrive/Documents/PlatformIO/Projects/Upload Test/.pio/build/nrf52840_dk/CMakeFiles/CMakeOutput.log". See also "C:/Users/DaveWyers/OneDrive/Documents/PlatformIO/Projects/Upload Test/.pio/build/nrf52840_dk/CMakeFiles/CMakeError.log".

C:\Users\DaveWyers.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.

CMake Error: Could not find cmake module file: CMakeDetermineTestCompiler.cmake CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_Test_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_Test_COMPILER CMake Error: Could not find cmake module file: C:/Users/DaveWyers/OneDrive/Documents/PlatformIO/Projects/Upload Test/.pio/build/nrf52840_dk/CMakeFiles/3.21.3/CMakeTestCompiler.cmake CMake Error at CMakeLists.txt:3 (project): No CMAKE_Test_COMPILER could be found.

Tell CMake where to find the compiler by setting the CMake cache entry CMAKE_Test_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error: Could not find cmake module file: CMakeTestInformation.cmake CMake Error: CMAKE_Test_COMPILER not set, after EnableLanguage ========================= [FAILED] Took 13.00 seconds =========================

davewyers commented 2 weeks ago

Ok Found the problem. A project Name must not have a space in the name.

removing the space allowed cmake to run correctly

cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(**UploadTest**)

NOT

cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(**Upload Test**)