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

Bug in hci_rpmsg?

Tried to compile the Bluetooth: Peripheral UART-sample, (nRF Connect SDK v1.9.1) and got an error:

FATAL ERROR: command exited with status 1: 'c:\ncs\v1.9.1\toolchain\opt\bin\cmake.EXE' --build 'c:\ncs_test\Test\test_app\build\hci_rpmsg'

[{
    "resource": "/c:/ncs/v1.9.1/nrf/subsys/partition_manager/flash_map_partition_manager.c",
    "owner": "cpptools",
    "severity": 8,
    "message": "pm_config.h: No such file or directory",
    "source": "gcc",
    "startLineNumber": 9,
    "startColumn": 10,
    "endLineNumber": 9,
    "endColumn": 10
},{
    "resource": "/c:/ncs_test/Test/test_app/prj.conf",
    "owner": "kconfig0",
    "severity": 4,
    "message": "BT_SMP has direct dependencies (BT_CONN && BT_HCI_HOST && BT_RPC_STACK) || (BT_CONN && BT_HCI_HOST && BT_HCI && BT) with value n, but is currently being y-selected by the following symbols:\n - BT_NUS_SECURITY_ENABLED , with value y, direct dependencies y (value: y)",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 1
},{
    "resource": "/c:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg/prj.conf",
    "owner": "kconfig0",
    "severity": 4,
    "message": "BT_BUF_CMD_TX_COUNT set more than once. Old value \"4\", new value \"10\".",
    "startLineNumber": 17,
    "startColumn": 1,
    "endLineNumber": 17,
    "endColumn": 30,
    "relatedInformation": [
        {
            "startLineNumber": 13,
            "startColumn": 1,
            "endLineNumber": 13,
            "endColumn": 27,
            "message": "Already set to \"4\" here",
            "resource": "/c:/ncs/v1.9.1/zephyr/samples/bluetooth/hci_rpmsg/prj.conf"
        }
    ]
}]

The reason seems to be, that in C:\ncs\v1.9.1\zephyr\samples\bluetooth\hci_rpmsg\prj.conf the CONFIG_BT_BUF_CMD_TX_COUNT is defined twice.

CONFIG_RPMSG_SERVICE=y
CONFIG_RPMSG_SERVICE_MODE_REMOTE=y

CONFIG_HEAP_MEM_POOL_SIZE=8192

CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=16
CONFIG_BT_CTLR_ASSERT_HANDLER=y
CONFIG_BT_HCI_RAW_RESERVE=1
CONFIG_BT_BUF_CMD_TX_COUNT=4

# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
CONFIG_BT_BUF_CMD_TX_COUNT=10

I wonder if the first definition should be commented out?

  • I commented the first line (CONFIG_BT_BUF_CMD_TX_COUNT=4) and the compilation errors disappeared.

  • Hi,

    Did you make any modifications to the sample before building it?

    Which compiler/IDE did you use for building?

    Which target board did you build for?

    I built the peripheral_uart sample for nrf5340dk_nrf5340_cpuapp using west and it build without any errors.

    Best regards,
    Jørgen

  • I did no changes, tried to build for the same board (nrf5340dk_nrf5340_cpuapp) with Visual Studio Code / nRF Connect.

    Just the tools that nRF Connect for Desktop and nRF Connect SDK v1.9.1 bring in.

    Do you have the same two CONFIG_BT_BUF_CMD_TX_COUNT-lines in your file?

    ...\v1.9.1\zephyr\samples\bluetooth\hci_rpmsg\prj.conf

    Funny, first time I compiled, it crashed. When I deleted the build directory, and managed to force it  to realize, it didn't have a valid build configuration (restarting the changes watcher), I got to re-build the build configuration, and then it compiled without errors.

    Could there be some button to force-run kconfig? I think it's supposed to offer that when it sees some config file has changed, but now that the changes watcher keeps crashing, it doesn't notice changes.

    Anyway, there seems to be no bug - really. I think it's Visual Studio Code, whose functionality is a bit flaky.

    SES hasn't act up like that. It's just a bit more awkward to use with two-image applications.

  • turboscrew said:
    Could there be some button to force-run kconfig? I think it's supposed to offer that when it sees some config file has changed, but now that the changes watcher keeps crashing, it doesn't notice changes.

    You can use the Pristine build button, which generates a new build directory and removes all byproducts from previous builds.

  • Ah, yes. you just need to check that the whole application is selected in the "APPLICATIONS"-window.

Related