nRF5340 audio DK, CONFIG_BT_SHELL Question

Hi,

I am using nRF Connect SDK v2.1.1 with nRF5340 audio DK PCA10121. I am able to have LC3 audio CIS example code working for gateway and headset. I turned on CONFIG_BT_SHELL to be enable BT shell for cmd_fal_add() but I got into compiler error. Here are my prj.conf configuration:

# Shell related defines
CONFIG_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_USE_SEGGER_RTT=y
## Disable logs on RTT
CONFIG_SHELL_RTT_INIT_LOG_LEVEL_NONE=y
CONFIG_SHELL_BACKEND_RTT=y
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_SHELL_VT100_COLORS=y
CONFIG_SHELL_STACK_SIZE=4096
CONFIG_SHELL_CMD_BUFF_SIZE=128
## Reduce shell memory usage
CONFIG_SHELL_WILDCARD=n
CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n
CONFIG_SHELL_STATS=n
CONFIG_SHELL_CMDS=n
CONFIG_SHELL_HISTORY=y

CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SHELL=y
CONFIG_BT_FILTER_ACCEPT_LIST=y
The compiler error is:
c:/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/subsys/bluetooth/shell/libsubsys__bluetooth__shell.a(audio.c.obj):C:\Projects\le-audio\gateway\zephyr\subsys\bluetooth\shell\audio.c:607: multiple definition of `unicast_client_cbs'; app/libapp.a(le_audio_cis_gateway.c.obj):C:\Projects\le-audio\gateway\gateway\src\bluetooth\le_audio_cis_gateway.c:195: first defined here
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.1.1\opt\bin\cmake.EXE' --build 'c:\Projects\le-audio\gateway\gateway\build'
When I comment out unicast_client_cbs in either audio.c:607 or le_audio_cis_gateway.c:195, I got different compiler errors. Do I need another CONFIG_BT option, that I don't see, for nRF Connect SDK v2.1.1 with nRF5340 audio DK PCA10121?
Thanks,
Dennis
Parents
  • Hi Dennis,

    While in NCS v2.1.1, please try following modifications in to your prj.conf file

    @@ -33,11 +33,11 @@ CONFIG_UART_CONSOLE=y
     # Shell related defines
     CONFIG_SHELL=y
     CONFIG_KERNEL_SHELL=y
    -CONFIG_USE_SEGGER_RTT=y
    +CONFIG_USE_SEGGER_RTT=n
     ## Disable logs on RTT
     CONFIG_SHELL_RTT_INIT_LOG_LEVEL_NONE=y
    -CONFIG_SHELL_BACKEND_RTT=y
    -CONFIG_SHELL_BACKEND_SERIAL=n
    +CONFIG_SHELL_BACKEND_RTT=n
    +CONFIG_SHELL_BACKEND_SERIAL=y
     CONFIG_SHELL_VT100_COLORS=y
     CONFIG_SHELL_STACK_SIZE=1024
     CONFIG_SHELL_CMD_BUFF_SIZE=128
    @@ -45,7 +45,7 @@ CONFIG_SHELL_CMD_BUFF_SIZE=128
     CONFIG_SHELL_WILDCARD=n
     CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n
     CONFIG_SHELL_STATS=n
    -CONFIG_SHELL_CMDS=n
    +CONFIG_SHELL_CMDS=y
     CONFIG_SHELL_HISTORY=y
     
     # Turn off default shell commands
    @@ -54,7 +54,7 @@ CONFIG_HWINFO_SHELL=n
     CONFIG_CLOCK_CONTROL_NRF_SHELL=n
     CONFIG_FLASH_SHELL=n
     CONFIG_DEVICE_SHELL=n
    -
    +CONFIG_BT_SHELL=y
     # Suppress err msg from sd_check_card_type. Because SPI_SDHC has no card presence method,
     # assume card is in slot. Thus error message is always shown if card is not inserted
     CONFIG_SD_LOG_LEVEL_OFF=y


    Additionally, you should consider upgrading to NCS v2.2.0. Please let me know if these changes work for you in both NCS v2.1.1 and v2.2.0.


    Best regards,
    Dejan

Reply Children
No Data
Related