I encounter an "undefined reference to `__device_dts_ord_152'" error when attempting to incorporate the peripheral_uart demo code into my customized application. Can you please assist me in resolving this issue?

I'm encountering difficulties while integrating the logic from the peripheral_uart into my customized application. To showcase the problem, I've created a brief video available at this link: https://youtube.com/live/h0GjFsJRF_0

It appears that I may have overlooked certain configurations within the .prj file, KConfig, or device tree. I would greatly appreciate your assistance in troubleshooting this issue.

Parents Reply Children
  • Thank you for your prompt reply. I have added all of the above in my prj.conf. Below is what I have in my file. It may be even related to my KConfig or overlay files too. I can share the repo on gihuib if that might be easier to troubleshoot.

    I believe the issue is related to this line:
    static const struct device *uart = DEVICE_DT_GET(DT_CHOSEN(nordic_nus_uart);

    What is nordic_nus_uart ?

    prj.conf

    CONFIG_STDOUT_CONSOLE=y
    CONFIG_PRINTK=y
    CONFIG_PWM=y
    CONFIG_I2C=y
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_LOG_MODE_IMMEDIATE=y
    CONFIG_PWM_LOG_LEVEL_DBG=y
    CONFIG_USE_SEGGER_RTT=y

    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y
    CONFIG_GPIO=y

    #SPI
    CONFIG_SPI=y
    CONFIG_NRFX_SPIM3=y
    CONFIG_NRFX_SPIM4=y
    CONFIG_SPI_ASYNC=y
    CONFIG_SPI_SLAVE=y

    #Floating point
    CONFIG_CBPRINTF_FP_SUPPORT=y

    # BT
    CONFIG_BT=y
    CONFIG_BT_DEBUG_LOG=y

    CONFIG_BT_CENTRAL=y
    CONFIG_BT_PERIPHERAL=y

    CONFIG_BT_SCAN=y
    CONFIG_BT_SCAN_FILTER_ENABLE=y
    CONFIG_BT_SCAN_NAME_CNT=1
    CONFIG_BT_SCAN_MANUFACTURER_DATA_CNT=1
    CONFIG_BT_SCAN_WITH_IDENTITY=y

    CONFIG_BT_EXT_ADV=y

    CONFIG_BT_DEVICE_NAME="ANTSHIV Robotics BLE"
    CONFIG_BT_DDFS=y
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1

    # Enable the NUS service
    CONFIG_BT_NUS=y

    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y

    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y

    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
  • I have uploaded my code on GitHub for easy access: You can find it at this repository: https://github.com/antshiv/nrf5340DroneCode.git

    Feel free to clone the repository, compile the code, and identify any issues that may arise. It's possible that I have overlooked some essential configuration settings.

Related