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

Conflict in compiling when merging the two examples: gpiote (or pwm_library) and ble_uarte

Hello, 

I have been trying to merge the  pwm_library (or gpiote) with ble_uarte examples to have controle on the pwm signal through UART events

I think i merged correctly the projects enabling the right options in sdk_config, i added the needed .c and includes directory (gpiote into ble_uarte or pwm_library into ble_uarte)

1/ first question: it seems like the order of include directory matters in the list of directories? is that normal? (i.e ../../../../../../components/drivers_nrf/nrf_soc_nosd has to be much further in the list than it is in the gpiote or pwm_library)

2/ Second question: i have better results when on the top of adding the existing .c files (missiing in to the ble_uarte) I also import the file. does it make a difference to have the file local instead of letting it into the sdk?

I get a conflict with the BSP_DEFINES_ONLY  preprocessor definition (used in both gpiote or pwm_library) 

'BSP_BUTTON_ACTION_LONG_PUSH' undeclared (first use in this function)   in the bsp.c file ?? this error doesnt appear without BSP_DEFINES_ONLY into the pre-processor

3/ what should i do to make this merging of code compiling?

Thanks for your help

Parents
  • 1. When trying to merge the pwm_library with the ble_app_uart example I experience the same as you, when putting the path far up in the "User Include Directories" the program is not able to compile, and I am not sure why. However the pwm works fine without including the path at all.

    3. I did not get any of the errors you mentioned, and was able to merge the pwm library (which includes the gpiote module) with the ble_app_uart example. My code is attached.

    ble_app_uart_include_pwm.zip

    Best regards Simon

Reply
  • 1. When trying to merge the pwm_library with the ble_app_uart example I experience the same as you, when putting the path far up in the "User Include Directories" the program is not able to compile, and I am not sure why. However the pwm works fine without including the path at all.

    3. I did not get any of the errors you mentioned, and was able to merge the pwm library (which includes the gpiote module) with the ble_app_uart example. My code is attached.

    ble_app_uart_include_pwm.zip

    Best regards Simon

Children
Related