Overlay file not included in the build

I am working on new project setup. I have copied a sample blinky project from nRF connect SDK(C:\ncs\v2.7.0\zephyr\samples\basic\blinky) and board I selected in Build configuration is nrf52840dk/nr52840. I am trying to make use of the overlay file through which I can change the pin configuration of LED1 from P0.14 to P0.16. For that I have tried multiple ways for including the overlay file in the build

1) Placed the overlay file(nrf52840dk_nrf52840.overlay) in the projects root directory

2) Placing that file in Zephyr boards directory(C:\ncs\v2.7.0\zephyr\boards\nordic\nrf52840dk)

3) adding the file through CMakeLists.txt(by adding  set(DTC_OVERLAY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/nrf52840dk_nrf52840.overlay and set(DTC_OVERLAY_FILE "nrf52840dk_nrf52840.overlay")

I am seeing the zephyr.dts file and nothing was changing. Please let me know how I can solve this.

Talking the mind: It feels like the nRF connect SDK is so much complex that it feels like a nightmare even though we take advantage of the training courses, chat gpt,documentations?

Parents
  • Hello,

    I believe you just need to do a pristine build for it to look for new .overlay files. Usually, when I test these kind of things, I first try a normal build, if that doesn't work -> pristine build, and if that doesn't work, delete build folder and build from scratch. 

    So try putting the nrf52840dk_nrf52840.overlay file in the application's root folder (the same folder as your prj.conf and CMakeLists.txt), and delete your build folder, and build the application. You can use this one for testing:

    blinky_overlay.zip

    Note that this behavior hasn't changed with NCS v2.7.0, but it is perhaps something you don't often encounter when working on a project for a long time.

    Best regards,

    Edvin

  • Hi, 

    Have you been able to solve this issue? I have started facing this all of a sudden in ncs 2.7.0.

Reply Children
Related