nRF5340_Audio Build Error

Hello All,

Just to begin, I am an extreme novice when it comes to building/flashing FW so if I do not provide enough description or ask questions that may seem a bit surface level please keep that in mind, but I am happy to provide more info anything else that is needed to help with debugging!

I believe I have the prerequisites installed and I am trying to build the nrf5340_audio sample application, but when I run the following command:

Fullscreen
1
python buildprog.py -c app -b release -d gateway
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I get the following log and errors:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
C:\Users\samietz\Desktop\nrf5340_audio_test\tools\buildprog>python buildprog.py -c app -b release -d gateway
+------------+----------+---------+--------------+---------------------+---------------------+
| snr | snr conn | device | only reboot | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1000 | ←[33mFalse←[0m | headset | Not selected | Not selected | Not selected |
| 1050159080 | ←[32mTrue←[0m | gateway | Not selected | Selected TBD | Not selected |
| 1000 | ←[33mFalse←[0m | headset | Not selected | Not selected | Not selected |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Run: west build C:\Users\samietz\Desktop\nrf5340_audio_test -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\Users\samietz\Desktop\nrf5340_audio_test\build\dev_gateway\build_release
-- west build: generating a build system
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\west.exe\__main__.py", line 7, in <module>
File "c:\python38\lib\site-packages\west\app\main.py", line 793, in main
app.run(argv or sys.argv[1:])
File "c:\python38\lib\site-packages\west\app\main.py", line 109, in run
self.run_command(argv)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This was done while following the instructions here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html#building-and-programming-using-script.

I have also tried building via the command line and also receive an error, but it's not the same as the above:

Fullscreen
1
2
3
4
5
6
7
8
samietz@samietz0 MINGW64 ~/Desktop/nrf5340_audio_test
$ west build -b nrf5340_audio_dk_nrf5340_cpuapp --pristine -DCONFIG_AUDIO_DEV=2 -DCONF_FILE=prj_release.conf
WARNING: ZEPHYR_BASE=C:\ncs\v2.0.1\zephyr in the calling environment will be used,
but the zephyr.base config option in C:\Users\samietz\Desktop\nrf5340_audio_test is "zephyr"
which implies a different ZEPHYR_BASE=C:\Users\samietz\Desktop\nrf5340_audio_test\zephyr
To disable this warning in the future, execute 'west config --global zephyr.base-prefer env'
ERROR: source directory -DCONFIG_AUDIO_DEV=2 does not exist
FATAL ERROR: refusing to proceed without --force due to above error
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Without an in-depth understanding of what is actually going on here I am a bit lost as to what is going wrong. Any help would be greatly appreciated!

Parents
  • Just re-opening this thread as I have received access to the LC3 repository, but am still running some issues with the build step. I can locate the file needed for the build here C:\ncs\v2.0.1\modules\lib\lc3\src\sw_codec_lc3.c, but when building the application it still can't 'find' the file as seen in the error below:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\tools\buildprog>python3 buildprog.py -c both -b release -d both -p
    +------------+----------+---------+--------------+---------------------+---------------------+
    | snr | snr conn | device | only reboot | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1000 | ←[33mFalse←[0m | headset | Not selected | Selected TBD | Selected TBD |
    | 1050159080 | ←[32mTrue←[0m | gateway | Not selected | Selected TBD | Selected TBD |
    | 1000 | ←[33mFalse←[0m | headset | Not selected | Selected TBD | Selected TBD |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\ncs\v2.0.1\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\build\dev_headset\build_release
    [1/13] Building C object CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj
    FAILED: CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj
    C:\ncs\toolchains\v2.0.1\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DARM_ALL_FAST_TABLES -DARM_DSP_CONFIG_TABLES -DARM_FAST_ALLOW_TABLES -DARM_FFT_ALLOW_TABLES -DARM_TABLE_RECIP_Q15 -DARM_TABLE_RECIP_Q31 -DARM_TABLE_SIN_F32 -DARM_TABLE_SIN_Q15 -DARM_TABLE_SIN_Q31 -DGATEWAY=2 -DHEADSET=1 -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/bluetooth -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/drivers -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/events -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/modules -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/utils -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/utils/macros -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/app -IC:/ncs/v2.0.1/nrf/boards/arm/nrf5340_audio_dk_nrf5340 -IC:/ncs/v2.0.1/zephyr/include/zephyr -IC:/ncs/v2.0.1/zephyr/include -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated -IC:/ncs/v2.0.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.0.1/zephyr/lib/libc/newlib/include -IC:/ncs/v2.0.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.1/zephyr/subsys/bluetooth -IC:/ncs/v2.0.1/zephyr/subsys/settings/include -IC:/ncs/v2.0.1/nrf/include -IC:/ncs/v2.0.1/modules/hal/cirrus-logic -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common/bridge -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common/platform_bsp -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63 -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/bsp -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/config -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/fw_pt -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/generated -IC:/ncs/v2.0.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.1/modules/hal/cmsis/CMSIS/DSP/Include -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.1/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/modules/libmetal/libmetal/lib/include -IC:/ncs/v2.0.1/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.0.1/modules/debug/segger/SEGGER -IC:/ncs/v2.0.1/modules/debug/segger/Config -IC:/ncs/v2.0.1/zephyr/modules/segger/. -IC:/ncs/v2.0.1/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.0.1/nrfxlib/softdevice_controller/include -IC:/ncs/v2.0.1/modules/fs/fatfs/include -isystem C:/ncs/v2.0.1/nrfxlib/crypto/nrf_cc312_platform/include -Og -imacros C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.0.1/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.0.1/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fstack-usage -fmacro-prefix-map=C:/ncs/v2.0.1/nrf/applications/nrf5340_audio=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj -MF CMakeFiles\app.dir\src\audio\sw_codec_select.c.obj.d -o CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj -c C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio/sw_codec_select.c
    C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio/sw_codec_select.c:15:10: fatal error: sw_codec_lc3.h: No such file or directory
    15 | #include "sw_codec_lc3.h"
    | ^~~~~~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Python38\Scripts\cmake.EXE' --build 'C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\build\dev_headset\build_release'
    Traceback (most recent call last):
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    I have ran 'west update' and 'west zephyr-export' before the build command, but still see this error. Am I pointing to a wrong location where the build script looks for the file or is something else wrong here?

Reply
  • Just re-opening this thread as I have received access to the LC3 repository, but am still running some issues with the build step. I can locate the file needed for the build here C:\ncs\v2.0.1\modules\lib\lc3\src\sw_codec_lc3.c, but when building the application it still can't 'find' the file as seen in the error below:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\tools\buildprog>python3 buildprog.py -c both -b release -d both -p
    +------------+----------+---------+--------------+---------------------+---------------------+
    | snr | snr conn | device | only reboot | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1000 | ←[33mFalse←[0m | headset | Not selected | Selected TBD | Selected TBD |
    | 1050159080 | ←[32mTrue←[0m | gateway | Not selected | Selected TBD | Selected TBD |
    | 1000 | ←[33mFalse←[0m | headset | Not selected | Selected TBD | Selected TBD |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\ncs\v2.0.1\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\build\dev_headset\build_release
    [1/13] Building C object CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj
    FAILED: CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj
    C:\ncs\toolchains\v2.0.1\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DARM_ALL_FAST_TABLES -DARM_DSP_CONFIG_TABLES -DARM_FAST_ALLOW_TABLES -DARM_FFT_ALLOW_TABLES -DARM_TABLE_RECIP_Q15 -DARM_TABLE_RECIP_Q31 -DARM_TABLE_SIN_F32 -DARM_TABLE_SIN_Q15 -DARM_TABLE_SIN_Q31 -DGATEWAY=2 -DHEADSET=1 -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/bluetooth -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/drivers -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/events -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/modules -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/utils -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/utils/macros -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/app -IC:/ncs/v2.0.1/nrf/boards/arm/nrf5340_audio_dk_nrf5340 -IC:/ncs/v2.0.1/zephyr/include/zephyr -IC:/ncs/v2.0.1/zephyr/include -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated -IC:/ncs/v2.0.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.0.1/zephyr/lib/libc/newlib/include -IC:/ncs/v2.0.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.1/zephyr/subsys/bluetooth -IC:/ncs/v2.0.1/zephyr/subsys/settings/include -IC:/ncs/v2.0.1/nrf/include -IC:/ncs/v2.0.1/modules/hal/cirrus-logic -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common/bridge -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/common/platform_bsp -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63 -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/bsp -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/config -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/fw_pt -IC:/ncs/v2.0.1/modules/hal/cirrus-logic/cs47l63/generated -IC:/ncs/v2.0.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.1/modules/hal/cmsis/CMSIS/DSP/Include -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.1/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/modules/libmetal/libmetal/lib/include -IC:/ncs/v2.0.1/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.0.1/modules/debug/segger/SEGGER -IC:/ncs/v2.0.1/modules/debug/segger/Config -IC:/ncs/v2.0.1/zephyr/modules/segger/. -IC:/ncs/v2.0.1/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.0.1/nrfxlib/softdevice_controller/include -IC:/ncs/v2.0.1/modules/fs/fatfs/include -isystem C:/ncs/v2.0.1/nrfxlib/crypto/nrf_cc312_platform/include -Og -imacros C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/build/dev_headset/build_release/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.0.1/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.0.1/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fstack-usage -fmacro-prefix-map=C:/ncs/v2.0.1/nrf/applications/nrf5340_audio=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj -MF CMakeFiles\app.dir\src\audio\sw_codec_select.c.obj.d -o CMakeFiles/app.dir/src/audio/sw_codec_select.c.obj -c C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio/sw_codec_select.c
    C:/ncs/v2.0.1/nrf/applications/nrf5340_audio/src/audio/sw_codec_select.c:15:10: fatal error: sw_codec_lc3.h: No such file or directory
    15 | #include "sw_codec_lc3.h"
    | ^~~~~~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Python38\Scripts\cmake.EXE' --build 'C:\ncs\v2.0.1\nrf\applications\nrf5340_audio\build\dev_headset\build_release'
    Traceback (most recent call last):
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    I have ran 'west update' and 'west zephyr-export' before the build command, but still see this error. Am I pointing to a wrong location where the build script looks for the file or is something else wrong here?

Children