This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error: Symbol multiply defined

Hi everyone,

I am trying to implement my device with nus service. Both nus client and server role on the same device, similar to the official example of  "relay".

But when I generated the hex.file, the error came like this:

.\_build\nrf52832_xxaa.axf: Error: L6200E: Symbol m_nrf_log_ble_nus_logs_data_const multiply defined (by ble_nus.o and ble_nus_c.o).
.\_build\nrf52832_xxaa.axf: Error: L6200E: Symbol m_nrf_log_ble_nus_logs_data_dynamic multiply defined (by ble_nus.o and ble_nus_c.o).

I changed the NRF_LOG_MODULE_NAME at the "ble_nus_c" sources files to solve the error but it had a fatal error when I ran the program on the device.

The fatal error should locate at the initialization of nus client and service. 

Any advice would help a lot.

Thanks in advance.

Duncan

  • Great. I solved the problems by changing the NRF_SDH_BLE_VS_UUID_COUNT from 0 to 1 and editing the RAM. Thank you very much!!! 

    I have one more question, how did you locate the error is returned by sd_ble_uuis_vs_add() by knowing "error 4"? Are there any materials for reference? 

  • Hi,

    I am glad to hear you got it working.

    Duncan Xu said:
    I have one more question, how did you locate the error is returned by sd_ble_uuis_vs_add() by knowing "error 4"? Are there any materials for reference? 

    The error codes not just random numbers. There is a hierarchy of errors, but error 4 is a generic error that is defined in components\drivers_nrf\nrf_soc_nosd\nrf_error.h as NRF_ERROR_NO_MEM. This hints at what the problem could be, and then you can either look at the documentation for the function that returned it or dig into the code. In this case you can see the following description for NRF_ERROR_NO_MEM in the API documentation for  sd_ble_uuid_vs_add():

    NRF_ERROR_NO_MEM: If there are no more free slots for VS UUIDs.

Related