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

ESB app_timer SWI3 multiply define error

The chip uses nRF 52832. MDK keil μVision V 5.22.0.0 is used as the development environment. The SDK version uses 13.0.0_04a 0 bfd.It is based on template_project.

1drv.ms/.../s!Avi3XPNJyYuthwXwOn4fu72Ylm2-

I am trying to combine ESB and app_timer. I tried a method to rewrite app_timer.c from past questions and use SWI 3. In the definition of app_timer.c

#elif (APP_TIMER_CONFIG_SWI_NUMBER == 3)

#define SWI_IRQn SWI3_IRQn

#define SWI_IRQHandler SWI3_IRQHandler

Add. I have made sdk_config.h APP_TIMER_CONFIG_SWI_NUMBER 3.

However, with this setting, the build fails and the following error appears.

". \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 3 _EGU 3 _IRQHandler multiply defined (by nrf_drv_swi.o and app_timer_swi 3.

There is no error if nrf_drv_swi.c is excluded from the build, what is the cause?

Parents
  • FormerMember
    0 FormerMember

    Could you use SWI '0' or '1' instead, and check if that changes anything? Those are the SWI numbers defined in app_timer.

    Update 23.03.2017: To change SWI interrupt number used by the app_timer module, the easiest is to change the SWI nubmer in sdk_config.h. Unfortunately, the app_timer module is not added in sdk_config.h in the ESB example. To add the app_timer module, copy the app_timer part from sdk_config.h in BLE example.

    For reference, I have uploaded a version of esb_tx with the app_timer module added: esb_tx_with_app_timer_module_121309.zip

  • In app_timer_swi3.c, changing the #define of the SWI_IRQn at the beginning and SWI_IRQHandler is as follows.

    #define SWI_IRQn SWI0_IRQn
    #define SWI_IRQHandler SWI0_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 0 _EGU 0 _IRQHandler multiply defined (by nrf_esb.o and app_timer_swi 3.

    #define SWI_IRQn SWI1_IRQn
    #define SWI_IRQHandler SWI1_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 1 _EGU 1 _IRQHandler multiply defined (by nrf_drv_swi.o and app_timer_swi 3.

    #define SWI_IRQn SWI3_IRQn
    #define SWI_IRQHandler SWI3_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 3 _EGU 3 _IRQHandler multiply defined (by nrf_drv_swi.o and app_timer_swi 3.

    In app_timer.c I think that it is only the initial definition that configures SWI, but is there any other place to set it?

Reply
  • In app_timer_swi3.c, changing the #define of the SWI_IRQn at the beginning and SWI_IRQHandler is as follows.

    #define SWI_IRQn SWI0_IRQn
    #define SWI_IRQHandler SWI0_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 0 _EGU 0 _IRQHandler multiply defined (by nrf_esb.o and app_timer_swi 3.

    #define SWI_IRQn SWI1_IRQn
    #define SWI_IRQHandler SWI1_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 1 _EGU 1 _IRQHandler multiply defined (by nrf_drv_swi.o and app_timer_swi 3.

    #define SWI_IRQn SWI3_IRQn
    #define SWI_IRQHandler SWI3_IRQHandler
    

    . \ _ Build \ nrf 52832 _ xxaa.axf: Error: L 6200 E: Symbol SWI 3 _EGU 3 _IRQHandler multiply defined (by nrf_drv_swi.o and app_timer_swi 3.

    In app_timer.c I think that it is only the initial definition that configures SWI, but is there any other place to set it?

Children
No Data
Related