examples\ble_peripheral\ble_app_uart - PREPROCESSORS not being defined as expected

Hi, i am working on the example - examples\ble_peripheral\ble_app_uart from nRF SDK 17.1.0 using SES. I intend to use it on nRF52840 KD (pca10056 s140).

At first I started working with SES 6.34a. Since I needed a quick ramp up, after getting troubled by the SEGGER_RTT issues similar to nrf5-sdk-17-1-0-examples-is-not-compiling-in-latest-ses-6-20a , I decided to use SES 5.60. 

It was straight-forward to use this SES version and build and download the example, which I required. But after downloading, the Advertisement LED wasn't blinking. An issue similar to this ble-app-uart-example-not-running-after-flashing, as mentioned there entering debug mode enabled the Adverstisement to start.

Now, my intention is to use this example and branch out for adding more features, which is not necessary to be explained here. So, for the new project, I moved this examples\ble_peripheral\ble_app_uart out of the examples folder - I update the paths in the ble_app_uart_pca10056_s140.emProject file. Then building the project threw the following error: 

Comparing with the successfully build example in the SDK folder, gave me the hint that, in nrf_drv_uart.h the preprocessor NRF_DRV_UART_WITH_UART undefined.

#if defined(UART_PRESENT) && NRFX_CHECK(NRFX_UART_ENABLED)
    #define NRF_DRV_UART_WITH_UART
#endif

But NRF_DRV_UART_WITH_UART must be  defined as UART_PRESENT (in nrf52840_peripherals.h) and  

/* Universal Asynchronous Receiver-Transmitter */
#define UART_PRESENT

NRFX_UART_ENABLED (in sdk_config.h) are defined and set respectively.

// <e> NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver
//==========================================================
#ifndef NRFX_UART_ENABLED
#define NRFX_UART_ENABLED 1
#endif

I suspect, this issue is similar to apply_old_config-h-not-working-as-expected.

Unfortunately, I haven't found a reliable solution/ work around for this. I would appreciate a lot if you could give a coherent response, as I am in fast prototyping stage four research.

Best regards,

Lal

Parents
  • Hi Lal,

    Have you cleaned and rebuilded your project after moving from SES 6.20 to 5.60?

    If not, I would recommend you start with an unmodified ble_app_uart example, apply your necessary location change configurations, and build from a clean state with SES v5.60.

    Another thing to check is, have you cleaned the flash memory before flashing your sample? If not, please do that.

    I use the ble_app_uart fairly regularly and it does not require any modification like you are doing.

    The threads you linked are also for older versions of the SDK. If I remember correctly, the legacy driver integration, for example, has changed quite much between v15.0.0 and v17.1.0, so the information might not be applicable. I still suspect the "mixed compiler build" to be the issue.

    Best regards,

    Hieu

Reply
  • Hi Lal,

    Have you cleaned and rebuilded your project after moving from SES 6.20 to 5.60?

    If not, I would recommend you start with an unmodified ble_app_uart example, apply your necessary location change configurations, and build from a clean state with SES v5.60.

    Another thing to check is, have you cleaned the flash memory before flashing your sample? If not, please do that.

    I use the ble_app_uart fairly regularly and it does not require any modification like you are doing.

    The threads you linked are also for older versions of the SDK. If I remember correctly, the legacy driver integration, for example, has changed quite much between v15.0.0 and v17.1.0, so the information might not be applicable. I still suspect the "mixed compiler build" to be the issue.

    Best regards,

    Hieu

Children
No Data
Related