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?