Combine Qorvo examples with Nordic examples

Hello,

i have a Nordic nRF52840DK and a Qorvo DWS3000 combination.
I´m using SDK7.0.2, Segger Embedded Studio 5.10a and J-Link 7.58b.

I want to combine the ble_app_uart_c_pca10056_s140 (Nordic example) with the ds_twr_responder (Deca example) to send the measured distance to another Board via BLE.

Both examples worked fine.
I used the ble_app_uart_c_pca10056_s140 as basis and add the code from the ds_twr_responder.c into the main.c from ble_app_uart_c_pca10056_s140 and added the necessary files and paths to the Project.

If i try to Build the Project it runs through 74 of 74 an then i get 69 Errors.
“Undefined reference” from references which worked properly before adding the code from ds_twr_responder.

Why does adding code erase the definitions?

Are there any experiences with combining Nordic and Qorvo examples?

Or maybe Multithreading is the answer? But i couldnt find any examples for Multithreading.

Please Help 

Parents
  • Building ‘ble_app_uart_c_pca10056_s140’ from solution ‘ble_app_uart_c_pca10056_s140’ in configuration ‘Release’
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/thumb_crt0.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_log_backend_rtt.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_log_backend_serial.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_log_default_backends.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_log_frontend.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_log_str_formatter.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_button.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_error.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_error_handler_gcc.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_error_weak.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_fifo.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_scheduler.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_timer2.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_uart_fifo.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/app_util_platform.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/drv_rtc.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/hardfault_implementation.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_assert.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_atfifo.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_atomic.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_balloc.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_fprintf.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_fprintf_format.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_memobj.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_pwr_mgmt.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_queue.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ringbuf.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_section_iter.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_sortlist.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_strerror.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/retarget.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ses_startup_nrf52840.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ses_startup_nrf_common.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/system_nrf52840.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/boards.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_drv_clock.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_drv_uart.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_atomic.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_clock.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_gpiote.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_prs.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_uart.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_uarte.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/bsp.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/bsp_btn_ble.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/SEGGER_RTT.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/SEGGER_RTT_Syscalls_SES.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/SEGGER_RTT_printf.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ble_advdata.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ble_db_discovery.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ble_srv_common.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gatt.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gq.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_scan.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/utf.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/ble_nus_c.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_sdh.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_sdh_ble.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_sdh_soc.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/shared_functions.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/deca_mutex.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/deca_probe_interface.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/deca_sleep.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/deca_spi.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/port.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_drv_spi.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_spi.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrfx_spim.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/config_options.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/mac_802_15_4.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/mac_802_15_8.o' is up to date
    'Output/Release/Obj/ble_app_uart_c_pca10056_s140/example_info.o' is up to date
    Output/Release/Exe/ble_app_uart_c_pca10056_s140.elf does not exist.
    Linking ble_app_uart_c_pca10056_s140.elf
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `db_disc_handler':
    undefined reference to `ble_nus_c_on_db_disc_evt'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `ble_evt_handler':
    undefined reference to `ble_nus_c_handles_assign'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `uart_event_handle':
    undefined reference to `ble_nus_c_string_send'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `bsp_event_handler':
    undefined reference to `nrf_pwr_mgmt_shutdown'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `ble_nus_c_evt_handler':
    undefined reference to `ble_nus_c_handles_assign'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:405: undefined reference to `ble_nus_c_tx_notif_enable'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `ble_nus_chars_received_uart_print':
    undefined reference to `ble_nus_c_string_send'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `power_management_init':
    undefined reference to `nrf_pwr_mgmt_init'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `nus_c_init':
    undefined reference to `ble_nus_c_init'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `idle_state_handle':
    undefined reference to `nrf_pwr_mgmt_run'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o: in function `main':
    undefined reference to `dwt_probe'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:793: undefined reference to `dwt_checkidlerc'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:795: undefined reference to `dwt_initialise'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:803: undefined reference to `dwt_configure'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:810: undefined reference to `dwt_configuretxrf'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:813: undefined reference to `dwt_setrxantennadelay'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:814: undefined reference to `dwt_settxantennadelay'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:819: undefined reference to `dwt_setleds'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:824: undefined reference to `dwt_setpreambledetecttimeout'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:826: undefined reference to `dwt_setrxtimeout'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:829: undefined reference to `dwt_rxenable'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:839: undefined reference to `dwt_writesysstatuslo'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:842: undefined reference to `dwt_getframelength'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:845: undefined reference to `dwt_readrxdata'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:861: undefined reference to `dwt_setdelayedtrxtime'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:864: undefined reference to `dwt_setrxaftertxdelay'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:865: undefined reference to `dwt_setrxtimeout'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:867: undefined reference to `dwt_setpreambledetecttimeout'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:871: undefined reference to `dwt_writetxdata'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:872: undefined reference to `dwt_writetxfctrl'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:873: undefined reference to `dwt_starttx'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:890: undefined reference to `dwt_writesysstatuslo'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:893: undefined reference to `dwt_getframelength'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:896: undefined reference to `dwt_readrxdata'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:933: undefined reference to `ble_nus_c_string_send'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:945: undefined reference to `dwt_writesysstatuslo'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/main.o:C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\examples\ble_central\ble_app_uart_c/main.c:70: undefined reference to `ble_nus_c_on_ble_evt'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gq.o: in function `queues_purge':
    undefined reference to `nrf_queue_generic_pop'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\components\ble\nrf_ble_gq/nrf_ble_gq.c:322: undefined reference to `nrf_queue_generic_pop'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\components\ble\nrf_ble_gq/nrf_ble_gq.c:325: undefined reference to `nrf_queue_generic_pop'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gq.o: in function `queue_process':
    undefined reference to `nrf_queue_generic_pop'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\components\ble\nrf_ble_gq/nrf_ble_gq.c:283: undefined reference to `nrf_queue_generic_pop'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gq.o: in function `nrf_ble_gq_item_add':
    undefined reference to `nrf_queue_is_empty'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\components\ble\nrf_ble_gq/nrf_ble_gq.c:517: undefined reference to `nrf_queue_push'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/nrf_ble_gq.o: in function `nrf_ble_gq_on_ble_evt':
    undefined reference to `nrf_queue_push'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/shared_functions.o: in function `get_tx_timestamp_u64':
    undefined reference to `dwt_readtxtimestamp'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/shared_functions.o: in function `get_rx_timestamp_u64':
    undefined reference to `dwt_readrxtimestamp'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/shared_functions.o: in function `waitforsysstatus':
    undefined reference to `dwt_readsysstatushi'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\Src\examples\shared_data/shared_functions.c:597: undefined reference to `dwt_readsysstatuslo'
    C:\DW3xxx_XR6.0C_24Feb2022\Release_XR6.0C\Software\DW3XXX_API\Sources\DW3XXX_API_rev9p3\DW3XXX_API_rev9p3\API\Src\examples\shared_data/shared_functions.c:603: undefined reference to `dwt_readsysstatushi'
    Output/Release/Obj/ble_app_uart_c_pca10056_s140/example_info.o: in function `build_examples':
    undefined reference to `ds_twr_responder'
    Build failed

  • Hi Gaetano, 

    I'm not very familiar with ds_twr_responder library however by looking at the error log, it seems that you haven't included the header files. 
    Please double check you have included the .c file and the path to .h file in your projects.

    Also in sdk_config.h you may want to enable the module you are using. For example please check if you set BLE_NUS_C_ENABLED = 1 in sdk_config.h . 
    I suspect that there could be a corrupt in the sdk_config.h if you base your project on ble_app_uart_c . 

Reply
  • Hi Gaetano, 

    I'm not very familiar with ds_twr_responder library however by looking at the error log, it seems that you haven't included the header files. 
    Please double check you have included the .c file and the path to .h file in your projects.

    Also in sdk_config.h you may want to enable the module you are using. For example please check if you set BLE_NUS_C_ENABLED = 1 in sdk_config.h . 
    I suspect that there could be a corrupt in the sdk_config.h if you base your project on ble_app_uart_c . 

Children
  • Thanks for the reply.

    BLE_NUS_C_ENABLED was endeed = 0, switched it to 1. But same Errors like before.

    All .c Files and .h Paths should be included. 

    The .c Files i added in the Project Explorer and the .h Paths in "User Include Directories".

  • Could you check if you still have the complain about ble_nus_c_on_db_disc_evt  not found when you set BLE_NUS_C_ENABLED = 1 ?


    Please use Ctrl+Shift+S to search in the whole solution to check if you can find the declaration for 
    dwt_checkidlerc ? 

    Note that the relative path can be different when you switch from one project to another project, so when you add the path to a folder in "User Include Directories" please double check if it point the right place. 
    Also please double check if you need to add anything to sdk_config.h when you want to use dwt library . 

Related