nrf5340 audio application - broadcast source

Hi,

I'm trying to build the nrf5340_audio/broadcast_source application. I'm getting the following error:

nrf5340_audio/src/audio/le_audio_rx.c:20:22: error: 'CONFIG_BT_ISO_RX_MTU' undeclared here (not in a function); did you mean 'CONFIG_BT_ID_MAX'?
20 | uint8_t data[CONFIG_BT_ISO_RX_MTU];

I'm using SDK 2.9.99. I've added the following to prj.conf:

CONFIG_AUDIO_DEV=2
CONFIG_TRANSPORT_BIS=y
Any suggestions why I'm not getting a clean build?
Regards,
ac
Parents
  • Hi ac,

    How are you building the application? I was able to get a successful build with the current nRF Connect SDK main and the v2.9.0 toolchain (b620d30767 on Windows).

    Do you see the same error with the latest tagged release: v2.9.1?

    Best regards,

    Maria

  • Hi Maria,

    Than you for your reply. I've tried both SDK & Toolchain versions of v2.9.1 and v2.9.0 and I am still not getting a clean build. I've removed:

    CONFIG_AUDIO_DEV=2
    CONFIG_TRANSPORT_BIS=y
    from prj.conf so my build is now unchanged from downloaded files. I've also tried changing the board target from nrf5340_audio_dk/nrf5340/cpuappns to nrf5340_audio_dk/nrf5340/cpunet and I get similar errors. Here is what I get with v2.9.1 and app core board target:

    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.c:239:14: error: 'NRF_FICR' undeclared (first use in this function); did you mean 'NRF_FICR_S'?
    239 | if ((NRF_FICR->INFO.DEVICEID[0] != UINT32_MAX) ||
    | ^~~~~~~~
    | NRF_FICR_S
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.c:239:14: note: each undeclared identifier is reported only once for each function it appears in
    [314/701] Building C object zephyr/CMakeFiles/zephyr.dir/opt/nordic/ncs/v2.9.0/modules/crypto/tinycrypt/lib/source/aes_decrypt.c.obj
    [315/701] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/flash/flash_util.c.obj
    [316/701] Building C object zephyr/CMakeFiles/zephyr.dir/opt/nordic/ncs/v2.9.0/nrf/subsys/bluetooth/hci_vs_sdc.c.obj
    [317/701] Building C object zephyr/CMakeFiles/zephyr.dir/opt/nordic/ncs/v2.9.0/nrf/subsys/bluetooth/host_extensions/host_extensions.c.obj
    [318/701] Building C object CMakeFiles/app.dir/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c.obj
    FAILED: CMakeFiles/app.dir/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c.obj
    ccache /opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DGATEWAY=2 -DHEADSET=1 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=4096 -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -DZEPHYR_CONFIG_OVERRIDE=zephyr_fatfs_config.h -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/include -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/audio -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/drivers -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/modules -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/utils -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/utils/macros -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/app -I/opt/nordic/ncs/v2.9.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340 -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/controller_config -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/dfu -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/scanning -I/opt/nordic/ncs/v2.9.0/zephyr/subsys/bluetooth/host -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_rendering_and_capture/volume -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_content_control/media -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_stream/broadcast -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_stream/unicast -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_stream/bt_le_audio_tx -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_rendering_and_capture -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_content_control -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_stream -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/zephyr/include/generated/zephyr -I/opt/nordic/ncs/v2.9.0/zephyr/include -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/zephyr/include/generated -I/opt/nordic/ncs/v2.9.0/zephyr/soc/nordic -I/opt/nordic/ncs/v2.9.0/zephyr/lib/libc/newlib/include -I/opt/nordic/ncs/v2.9.0/zephyr/lib/posix/options/getopt -I/opt/nordic/ncs/v2.9.0/zephyr/soc/nordic/nrf53/. -I/opt/nordic/ncs/v2.9.0/zephyr/soc/nordic/common/. -I/opt/nordic/ncs/v2.9.0/zephyr/subsys/bluetooth -I/opt/nordic/ncs/v2.9.0/zephyr/subsys/settings/include -I/opt/nordic/ncs/v2.9.0/zephyr/subsys/shell/modules/kernel_service/thread/.. -I/opt/nordic/ncs/v2.9.0/nrf/include -I/opt/nordic/ncs/v2.9.0/nrf/lib/contin_array/. -I/opt/nordic/ncs/v2.9.0/nrf/lib/pcm_mix/. -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/tfm/api_ns/interface/include -I/opt/nordic/ncs/v2.9.0/nrf/modules/trusted-firmware-m/. -I/opt/nordic/ncs/v2.9.0/nrf/include/tfm -I/opt/nordic/ncs/v2.9.0/nrf/tests/include -I/opt/nordic/ncs/v2.9.0/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.9.0/zephyr/modules/cmsis/. -I/opt/nordic/ncs/v2.9.0/modules/lib/cmsis-dsp/Include -I/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.9.0/zephyr/modules/hal_nordic/nrfx/. -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/modules/libmetal/libmetal/lib/include -I/opt/nordic/ncs/v2.9.0/modules/lib/open-amp/open-amp/lib/include -I/opt/nordic/ncs/v2.9.0/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.9.0/modules/debug/segger/Config -I/opt/nordic/ncs/v2.9.0/modules/crypto/tinycrypt/lib/include -I/opt/nordic/ncs/v2.9.0/nrfxlib/softdevice_controller/include -I/opt/nordic/ncs/v2.9.0/nrfxlib/lc3/codec/inc -I/opt/nordic/ncs/v2.9.0/nrfxlib/lc3/platform/os/inc -I/opt/nordic/ncs/v2.9.0/nrfxlib/lc3/platform/os/baremetal/inc -I/opt/nordic/ncs/v2.9.0/nrfxlib/lc3/include -I/Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/generated/interface_nrf_security_psa -I/opt/nordic/ncs/v2.9.0/nrf/subsys/nrf_security/include -I/opt/nordic/ncs/v2.9.0/modules/crypto/oberon-psa-crypto/include -I/opt/nordic/ncs/v2.9.0/nrf/subsys/nrf_security/src/utils -I/opt/nordic/ncs/v2.9.0/modules/crypto/oberon-psa-crypto/library -I/opt/nordic/ncs/v2.9.0/modules/crypto/mbedtls/library -I/opt/nordic/ncs/v2.9.0/modules/crypto/mbedtls/include -I/opt/nordic/ncs/v2.9.0/modules/crypto/mbedtls/include/library -I/opt/nordic/ncs/v2.9.0/nrfxlib/crypto/nrf_oberon/include -I/opt/nordic/ncs/v2.9.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/opt/nordic/ncs/v2.9.0/zephyr/modules/fatfs -I/opt/nordic/ncs/v2.9.0/modules/fs/fatfs/include -isystem /opt/nordic/ncs/v2.9.0/zephyr/lib/libc/common/include -Os -DNDEBUG -fno-strict-aliasing -Og -imacros /Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio/zephyr/include/generated/zephyr/autoconf.h -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=/opt/nordic/ncs/toolchains/b8efef2ad5/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.9.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -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 --param=min-pagesize=0 -fno-defer-pop -fstack-usage -fmacro-prefix-map=/Users/andrewcoad/Projects/Nordic/nrf5340_audio=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c.obj -MF CMakeFiles/app.dir/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c.obj.d -o CMakeFiles/app.dir/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c.obj -c /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c
    In file included from /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:10,
    from /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c:7:
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c: In function 'bt_mgmt_dir_adv_timed_out':
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:23:49: error: 'BT_LE_ADV_OPT_CONN' undeclared (first use in this function); did you mean 'BT_LE_ADV_OPT_NONE'?
    23 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | \
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.9.0/zephyr/include/zephyr/bluetooth/bluetooth.h:895:21: note: in definition of macro 'BT_LE_ADV_PARAM_INIT'
    895 | .options = (_options), \
    | ^~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:23:9: note: in expansion of macro 'BT_LE_ADV_PARAM'
    23 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | \
    | ^~~~~~~~~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c:320:44: note: in expansion of macro 'LE_AUDIO_EXTENDED_ADV_CONN_NAME_FILTER'
    320 | ret = bt_le_ext_adv_create(LE_AUDIO_EXTENDED_ADV_CONN_NAME_FILTER, &adv_cb,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:23:49: note: each undeclared identifier is reported only once for each function it appears in
    23 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | \
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.9.0/zephyr/include/zephyr/bluetooth/bluetooth.h:895:21: note: in definition of macro 'BT_LE_ADV_PARAM_INIT'
    895 | .options = (_options), \
    | ^~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:23:9: note: in expansion of macro 'BT_LE_ADV_PARAM'
    23 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | \
    | ^~~~~~~~~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c:320:44: note: in expansion of macro 'LE_AUDIO_EXTENDED_ADV_CONN_NAME_FILTER'
    320 | ret = bt_le_ext_adv_create(LE_AUDIO_EXTENDED_ADV_CONN_NAME_FILTER, &adv_cb,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c: In function 'bt_mgmt_adv_start':
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:19:49: error: 'BT_LE_ADV_OPT_CONN' undeclared (first use in this function); did you mean 'BT_LE_ADV_OPT_NONE'?
    19 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME, \
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.9.0/zephyr/include/zephyr/bluetooth/bluetooth.h:895:21: note: in definition of macro 'BT_LE_ADV_PARAM_INIT'
    895 | .options = (_options), \
    | ^~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h:19:9: note: in expansion of macro 'BT_LE_ADV_PARAM'
    19 | BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME, \
    | ^~~~~~~~~~~~~~~
    /Users/andrewcoad/Projects/Nordic/nrf5340_audio/src/bluetooth/bt_management/advertising/bt_mgmt_adv.c:441:44: note: in expansion of macro 'LE_AUDIO_EXTENDED_ADV_CONN_NAME'
    441 | ret = bt_le_ext_adv_create(LE_AUDIO_EXTENDED_ADV_CONN_NAME, &adv_cb,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    [10/20] No configure step for 'ipc_radio'
    FAILED: _sysbuild/sysbuild/images/nrf5340_audio-prefix/src/nrf5340_audio-stamp/nrf5340_audio-build /Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/_sysbuild/sysbuild/images/nrf5340_audio-prefix/src/nrf5340_audio-stamp/nrf5340_audio-build
    cd /Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source/nrf5340_audio && /opt/nordic/ncs/toolchains/b8efef2ad5/Cellar/cmake/3.21.0/bin/cmake --build .
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/b8efef2ad5/bin/cmake --build /Users/andrewcoad/Projects/Nordic/nrf5340_audio/build_bcast_source

    Regards,
    ac
  • Hey ac,

    Please do the following: 

    1. Open an nRF Connect terminal from
      1. the nRF Connect for VS Code extension or
      2. the Toolchain manager in the nRF Connect for Desktop application.
    2. Follow one of the build methods from the application documentation: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/building.html 

    I think the reason that you are getting a build error is that the build environment is not properly set up. Launching the terminal from on of the methods in step 1 above sets up the build environment for you.

    Also, next time you share long build logs, please use the Insert -> Code option.

    Best regards.

    Maria

  • Hi Maria,

    I can build and flash the applications using the command line. However, that builds the application inside the SDK folder. I want to build the application outside of the SDK, in my own folder. Running the command line commands in my directory does not work as it isn't a west workspace.

    Any suggestions? Maybe wipe VS Code clean and start afresh?

    Regards,

    ac

  • Hey ac,

    skajam66 said:
    I want to build the application outside of the SDK, in my own folder. Running the command line commands in my directory does not work as it isn't a west workspace.

    Do you see this with the nRF Connect terminal in VS Code or the Toolchain manager application? With the nRF Connect terminal in VS Code I was able to build a copy the nRF5340 application which was located outside of nRF Connect SDK.

    skajam66 said:
    Any suggestions? Maybe wipe VS Code clean and start afresh?

    That is certainly something to try.

    If it does not solve your build issues: please share a step by step overview of what you are doing, I want to see if I can find any issues with it or reproduce it if I can't see any issues in the text.

    Best regards,

    Maria

Reply
  • Hey ac,

    skajam66 said:
    I want to build the application outside of the SDK, in my own folder. Running the command line commands in my directory does not work as it isn't a west workspace.

    Do you see this with the nRF Connect terminal in VS Code or the Toolchain manager application? With the nRF Connect terminal in VS Code I was able to build a copy the nRF5340 application which was located outside of nRF Connect SDK.

    skajam66 said:
    Any suggestions? Maybe wipe VS Code clean and start afresh?

    That is certainly something to try.

    If it does not solve your build issues: please share a step by step overview of what you are doing, I want to see if I can find any issues with it or reproduce it if I can't see any issues in the text.

    Best regards,

    Maria

Children
No Data
Related