Config custom board

Hi,

  We are working on creating a custom board configuration for ease of development. This is based on UBlox BMD-350-EVAL10. Which uses nRF52832.

  While I created a custom board configuration. While building getting the following error

  C:\Users\Sachin\ncs\v2.0.2\zephyr\include\zephyr\device.h:96:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared (first use in this function)

#define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
C:\Users\Sachin\ncs\v2.0.2\zephyr\include\zephyr\device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
C:\Users\Sachin\ncs\v2.0.2\zephyr\include\zephyr\device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
C:\Users\Sachin\ncs\v2.0.2\zephyr\drivers\bluetooth\hci\h4.c:561:11: note: in expansion of macro 'DEVICE_DT_GET'
561 | h4_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart));
| ^~~~~~~~~~~~~
C:\Users\Sachin\ncs\v2.0.2\zephyr\include\zephyr\device.h:96:39: note: each undeclared identifier is reported only once for each function it appears in
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)

  As I am building based on nRF connect SDK, ideally Zephyr BT stack should not be built at all, Is my understanding correct?

Parents
  • Hi,

    In the nRF Connect SDK, the host layer and the host side of the HCI will still be from Zephyr, even when you are using Nordic's controller.

    Which sample are you building? The error seems to be from not having defined a bluetooth uart for the HCI driver to use. Your project likely enables CONFIG_BT_H4=y.

    You can an overlay file with the name nrf52dk_nrf52832.overlay to your project and that should fix the issue, it should set the zephyr,bt-uart to the uart you wish to use for HCI:

    / {
    	chosen {
    		zephyr,bt-uart=     ;
    	};
    };

  • Hi Oivind,

    I have just hit this one moving from SDK 2.1.0 to 2.2.0.

    We do not have bt_uart defined; this has not been a problem in the past SDK's; I did not think a physical uart was used for the bluetooth and that some other for of message passing was used for the soft device?

    I suspect the default HCI transport for that build got changed to UART rather than RPMSG.

    I think a config overlay for child image with CONFIG_BT_RPMSG=y rather than picking up the now default H4 transport will fix.

    Regards,
    Owain

Reply
  • Hi Oivind,

    I have just hit this one moving from SDK 2.1.0 to 2.2.0.

    We do not have bt_uart defined; this has not been a problem in the past SDK's; I did not think a physical uart was used for the bluetooth and that some other for of message passing was used for the soft device?

    I suspect the default HCI transport for that build got changed to UART rather than RPMSG.

    I think a config overlay for child image with CONFIG_BT_RPMSG=y rather than picking up the now default H4 transport will fix.

    Regards,
    Owain

Children
No Data
Related