Can't create nrf52_dk/zephyr project

I am trying to create a project with the platformio.ini below but it fails when I try to build it. This combination of the board nrf52_dk and the framework zephyr seems to be valid in the platformio documentation. Any suggestions?


platform = nordicnrf52
board = nrf52_dk
framework = zephyr
upload_protocol = jlink

Error log when trying to build:

Processing nrf52_dk (platform: nordicnrf52; board: nrf52_dk; framework: zephyr)
--------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Nordic nRF52 (9.2.0) > Nordic nRF52-DK
HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
 - framework-zephyr 2.20701.220216 (2.7.1)
 - tool-cmake 3.21.3
 - tool-dtc 1.4.7
 - tool-ninja 1.9.0
 - tool-sreccat 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)
Reading CMake configuration...
-- Application: C:/Users/user/Documents/PlatformIO/Projects/kaka4/zephyr
-- Zephyr version: 2.7.1 (C:/Users/user/.platformio/packages/framework-zephyr)
-- Found Python3: C:/Users/user/.platformio/penv/Scripts/python.exe (found suitable exact version "3.9.2") found components: Interpreter
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: C:/Users/user/.platformio/packages/framework-zephyr/.cache
-- Found dtc: C:/Users/user/.platformio/packages/tool-dtc/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found toolchain: gnuarmemb (C:/Users/user/.platformio/packages/toolchain-gccarmnoneeabi)
-- Configuring incomplete, errors occurred!

CMake Error at C:/Users/user/.platformio/packages/framework-zephyr/cmake/compiler/gcc/generic.cmake:9 (message):
  Zephyr was unable to find the toolchain.  Is the environment misconfigured?



  Internal variables:


  TOOLCHAIN_HOME: C:/Users/user/.platformio/packages/toolchain-gccarmnoneeabi

Call Stack (most recent call first):
  C:/Users/user/.platformio/packages/framework-zephyr/cmake/generic_toolchain.cmake:42 (include)
  C:/Users/user/.platformio/packages/framework-zephyr/cmake/app/boilerplate.cmake:540 (include)
  CMakeLists.txt:2 (include)

If you don’t have any custom versions installed in there, can you remove every folder in there + delete C:\Users\<user>\.platformio\.cache to get a fresh copy?

Thanks @maxgerhardt, that fixed it.

1 Like