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

Error: L6218E: Undefined symbol nrf_drv_pwm_init (referred from main.o).

Hello,

I am building a project that required pwm drivers and BLE UART. I started by using peripheral ble uart example in SDK 12 and adding the pwm driver source file from the SDK components. I am using Keil uVision 5.

When I use methods from the pwm driver source file I get a linking error:

Error: L6218E: Undefined symbol nrf_drv_pwm_init (referred from main.o).

Is there a specific linking configuration that needs to be done in order for the project to find the pwm driver ?

Thanks.

Parents Reply
  • Hi,

    I've tried setting the define as a -D in the Makefile: CFLAGS += -DPWM_ENABLED=1

    and in the sdk_config.h: #define PWM_ENABLED 1

    I'm trying to add PWM driver demo2 to the HRS BLE example and am getting this error:

    nRF5_SDK_14.2.0_17b948a/examples/ble_peripheral/ble_app_hrs/pca10040/s132/armgcc//../../../main.c:1066: undefined reference to nrf_drv_pwm_init' nRF5_SDK_14.2.0_17b948a/examples/ble_peripheral/ble_app_hrs/pca10040/s132/armgcc//../../../main.c:1108: undefined reference tonrf_drv_pwm_complex_playback'

    Is it necessary to go thru a SoftDevice API, hmmm...

Children
No Data
Related