This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't compile nRF5340 Audio DK example

I am trying to build the example for the Audio DK on an x86 Mac and am having trouble configuring the toolchain.

I have followed the instructions from here: developer.nordicsemi.com/.../gs_installing.html

When I run the build command for buildprog.py I get an error saying Zephyr can not find the toolchain.

I believe I have all of the environment variables set properly.

The error shows a path under the heading CROSS_COMPILE that does not exist (it is not installed by the GNU Arm Embedded Toolchain from here: https://developer.arm.com/downloads/-/gnu-rm)

CROSS_COMPILE:
/Users/dmann/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-

Any help would be appreciated.

Example Build Output

dmann@Davids-MBP-2 buildprog % python3 buildprog.py -c both -b release -d both
No programmer/debugger connected to PC
No snrs connected
+------------+----------+---------+--------------+---------------------+---------------------+
| snr | snr conn | device | only reboot | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1050187322 | False | headset | Not selected | Not selected | Not selected |
| 1050166837 | False | gateway | Not selected | Not selected | Not selected |
| 1000 | False | headset | Not selected | Not selected | Not selected |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Net core uses precompiled hex
Run: west build ../.. -b nrf5340_audio_dk_nrf5340_cpuapp -d ../../build/dev_headset/build_release
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /Users/dmann/w/ncs/nrf/applications/nrf5340_audio
-- Cache files will be written to: /Users/dmann/Library/Caches/zephyr
-- Zephyr version: 3.0.99 (/Users/dmann/w/ncs/zephyr)
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/dmann/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major)
CMake Error at /Users/dmann/w/ncs/zephyr/cmake/compiler/gcc/generic.cmake:9 (message):
Zephyr was unable to find the toolchain. Is the environment misconfigured?

User-configuration:

ZEPHYR_TOOLCHAIN_VARIANT: gnuarmemb

Internal variables:

CROSS_COMPILE:
/Users/dmann/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-


TOOLCHAIN_HOME: /Users/dmann/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major

Call Stack (most recent call first):
/Users/dmann/w/ncs/zephyr/cmake/modules/generic_toolchain.cmake:51 (include)
/Users/dmann/w/ncs/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
/Users/dmann/w/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
/Users/dmann/w/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:81 (include_boilerplate)
CMakeLists.txt:13 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.9 -B/Users/dmann/w/ncs/nrf/applications/nrf5340_audio/build/dev_headset/build_release -S/Users/dmann/w/ncs/nrf/applications/nrf5340_audio -GNinja
Traceback (most recent call last):
File "/Users/dmann/w/ncs/nrf/applications/nrf5340_audio/tools/buildprog/buildprog.py", line 319, in <module>
__main()
File "/Users/dmann/w/ncs/nrf/applications/nrf5340_audio/tools/buildprog/buildprog.py", line 302, in __main
__build_module(build_cfg)
File "/Users/dmann/w/ncs/nrf/applications/nrf5340_audio/tools/buildprog/buildprog.py", line 130, in __build_module
raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 256

Environment variables are set as: 

ZEPHYR_BASE=/Users/dmann/w/ncs/zephyr
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
GNUARMEMB_TOOLCHAIN_PATH=~/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major

Related