Hi guys! I’m trying to get up and running on my M1 mac. I actually think that I’ve done most of the required stuff (setting up Zephyr, installing the NRF tools, JLink, and ARM toolchain through the new .pkg signed installation package, set up newtmgr by building manually), but it seems like something is amiss when I try to build the blinky sample with west:
(.venv) jeppe@jeppe-mbp blinky % west build -b circuitdojo_feather_nrf9160_ns -p
-- west build: making build dir /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky
-- Found Python3: /Users/jeppe/zephyrproject/.venv/bin/python3.10 (found suitable exact version "3.10.8") found components: Interpreter
-- Cache files will be written to: /Users/jeppe/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/Users/jeppe/zephyrproject/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160_ns
-- Found toolchain: gnuarmemb (/Applications/ARM)
-- Found Dtc: /opt/homebrew/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found BOARD.dts: /Users/jeppe/zephyrproject/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns.dts
-- Generated zephyr.dts: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/dts.cmake
Parsing /Users/jeppe/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/jeppe/zephyrproject/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns_defconfig'
Merged configuration '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/prj.conf'
Configuration saved to '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/.config'
Kconfig header saved to '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /Applications/ARM/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build
-- west build: building application
[1/163] Preparing syscall dependency handling
[3/163] Generating include/generated/version.h
-- Zephyr version: 3.2.99 (/Users/jeppe/zephyrproject/zephyr), build: zephyr-v3.2.0-1597-g27ec69eca183
[10/163] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /Applications/ARM/bin/arm-none-eabi-gcc -DKERNEL -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/jeppe/zephyrproject/zephyr/include -I/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated -I/Users/jeppe/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf91 -I/Users/jeppe/zephyrproject/zephyr/soc/arm/nordic_nrf/common/. -I/Users/jeppe/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx/mdk -I/Users/jeppe/zephyrproject/zephyr/modules/hal_nordic/nrfx/. -isystem /Users/jeppe/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/include-fixed -fno-strict-aliasing -Os -imacros /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/Applications/ARM/arm-none-eabi -imacros /Users/jeppe/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/jeppe/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/jeppe/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/src/main.c
/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/src/main.c:7:10: fatal error: zephyr.h: No such file or directory
7 | #include <zephyr.h>
| ^~~~~~~~~~
compilation terminated.
[19/163] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build
(.venv) jeppe@jeppe-mbp blinky % cd ~/.zephyrtools
cd: no such file or directory: /Users/jeppe/.zephyrtools
(.venv) jeppe@jeppe-mbp blinky % ls ~/.zephyrproject
ls: /Users/jeppe/.zephyrproject: No such file or directory
(.venv) jeppe@jeppe-mbp blinky % west build -b circuitdojo_feather_nrf9160_ns -p
-- west build: making build dir /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky
-- Found Python3: /Users/jeppe/zephyrproject/.venv/bin/python3.10 (found suitable exact version "3.10.8") found components: Interpreter
-- Cache files will be written to: /Users/jeppe/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/Users/jeppe/zephyrproject/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160_ns
-- Found toolchain: gnuarmemb (/Applications/ARM)
-- Found Dtc: /opt/homebrew/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found BOARD.dts: /Users/jeppe/zephyrproject/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns.dts
-- Generated zephyr.dts: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/dts.cmake
Parsing /Users/jeppe/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/jeppe/zephyrproject/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_ns_defconfig'
Merged configuration '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/prj.conf'
Configuration saved to '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/.config'
Kconfig header saved to '/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /Applications/ARM/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build
-- west build: building application
[1/163] Preparing syscall dependency handling
[3/163] Generating include/generated/version.h
-- Zephyr version: 3.2.99 (/Users/jeppe/zephyrproject/zephyr), build: zephyr-v3.2.0-1597-g27ec69eca183
[19/163] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /Applications/ARM/bin/arm-none-eabi-gcc -DKERNEL -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/jeppe/zephyrproject/zephyr/include -I/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated -I/Users/jeppe/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf91 -I/Users/jeppe/zephyrproject/zephyr/soc/arm/nordic_nrf/common/. -I/Users/jeppe/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx/drivers/include -I/Users/jeppe/zephyrproject/modules/hal/nordic/nrfx/mdk -I/Users/jeppe/zephyrproject/zephyr/modules/hal_nordic/nrfx/. -isystem /Users/jeppe/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/include-fixed -fno-strict-aliasing -Os -imacros /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/Applications/ARM/arm-none-eabi -imacros /Users/jeppe/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/jeppe/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/jeppe/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/src/main.c
/Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/src/main.c:7:10: fatal error: zephyr.h: No such file or directory
7 | #include <zephyr.h>
| ^~~~~~~~~~
compilation terminated.
[28/163] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build /Users/jeppe/zephyrproject/nrf9160-feather-examples-and-drivers/samples/blinky/build
Sorry if this is not strictly M1 related, but since I’m building on the M1, I figured it would be good to collect the info here.
Any suggestions on what might be wrong?