multiple definition of `SERIAL21_IRQHandler'

I switched from the nRF-bm\v0.9.0 to nRF-bm\v1.0.0 SDK and now I am getting the following linker error message:

c:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/hal_nordic/modules/hal_nordic/nrfx/libmodules__hal
_nordic__nrfx.a(nrfx_prs.c.obj): in function `SERIAL21_IRQHandler':
C:/ncs/nrf-bm/v1.0.0/modules/hal/nordic/nrfx/drivers/src/prs/nrfx_prs.c:66: multiple definition of `SERIAL21_IRQHandler'; app/libapp.a(UART_dev.cpp.obj):C:/my_proj/UART
_dev.cpp:529: first defined here

With SDK v.0.9.0 there was no issue with the linking.

Is there a new configuration that I need to set for SDK v1.0.0 to disable the usage of SERIAL IRQhandler from zephyr?

Best Regards

Parents
  • In SDK v1.0.0, the Nordic HAL’s PRS (Peripheral Resource Sharing) layer now owns the shared SERIAL interrupts when PRS is enabled. That means the SDK itself defines SERIAL21_IRQHandler so it can route interrupts to whichever peripheral is active. i am not 100% sure of this but it looks like either PRS was not enabled by default in 0.9.0 or it did not own this handler. 

    In 1.0.0, You cannot keep PRS enabled and also define SERIAL21_IRQHandler yourself as that symbol is owned by PRS. If you do not want PRS then just add CONFIG_NRFX_PRS=n in your config file. 

  • Hi,

    thanks for the detailed information.

    When I add the 

    CONFIG_NRFX_PRS=n

    in my prj.conf file I am getting the following error:

    error: NRFX_PRS (defined at C:/ncs/nrf-bm/v1.0.0/zephyr/modules/hal_nordic\nrfx/Kconfig:366,
    C:/ncs/nrf-bm/v1.0.0/nrf-bm\modules\hal_nordic\nrfx/Kconfig:300,
    modules\hal_nordic\nrfx/Kconfig:366) is assigned in a configuration file, but is not directly user-
    configurable (has no prompt). It gets its value indirectly from other symbols. See
    docs.zephyrproject.org/.../kconfig.html and/or look up NRFX_PRS in the
    menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
    and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

  • Ah sorry, my bad, it does not look like you can se that thing directly, 

    try setting the below to "n". I think the main instance in your focus is to set CONFIG_NRFX_PRS_BOX_2=n

    CONFIG_NRFX_PRS_BOX_0
    CONFIG_NRFX_PRS_BOX_1
    CONFIG_NRFX_PRS_BOX_2
    CONFIG_NRFX_PRS_BOX_3
    CONFIG_NRFX_PRS_BOX_4

    If you don’t know which box is enabled, check build/zephyr/.config and search for NRFX_PRS_BOX to see which instance is enabled

  • Yes CONFIG_NRFX_PRS_BOX_2=n is working.

    Many thanks.

Reply Children
No Data
Related