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

Problem of Including custom driver folder in to a project.

I am using a nRF52840 dongle with nRFconnect v1.5.1 in SES. I have followed This link to do it. But got stuck at "Editing CMake List.txt" step.

Please tell if there is something wrong in doing that as shown in screenshot. Sorry for the bad hand writing.

So, please guide through including a custom driver folder into any project. If any other step also there, please share.

Thank you.

Parents
  • So, please guide through including a custom driver folder into any project. If any other step also there, please share.

    The quick and easy way of adding a custom driver to your project:

    The Zephyr way:

    The Zephyr way - Out of tree driver:

    Best regards,

    Simon

  • Hi Simon.

    Thanks for the links.
    I followed the first link and did exactly the same hello world project + including the multiply function.

    Till making of the hello world project, there was no error.

    Now, after including the multiply.c and multiply.h files I have this error saying "No such file or directory" for multiply.h.

    Can you please tell where am I doing mistake here?

    I also tried making the same procedure inside the path shown below in screenshot(For blinky example). Also did the same changes in CMakeLists.txt file as above. And found the same error.

    Thank you.

  • If you've made changes to the CMakeLists.txt after opening the project, you need to run the CMake logic again for it to take effect, this can be done as mentioned in this answer in three ways:

    • Open the project again with File > Open nRF Connect SDK Project
    • Reload the project by going to Project > Reload <project_name>
    • Re-run CMake by going to Project > Run Cmake

    I see that many people run into the same issue in this section, so I'll add a note in the tutorial.

  • The link you have shared is not working. Says "Access Denied".

    I have tried 3 of the points you have mentioned to re run the CMake logic. Its not resolved. I got this error on the 3rd point.

    How to resolve this python dependency? I have faced this issue earlier while opening copy of any example project also.

    I know about the getting started assistance where we need to follow the steps of installing all required dependencies before working with nRF connect SDK.

    I got an info from This link that on windows if we install the nRF connect SDK from nRF connect Tool chain manager, all the dependencies will be installed and procedure of getting started assistance can be avoided.

    So as my system is Windows machine, I did install it from Tool chain manager.

    Thank you.

  • Gops said:
    The link you have shared is not working. Says "Access Denied".

    Sorry, I pointed you to a private ticket. But it just showed the three points I listed, not much more.

    Gops said:
    Its not resolved. I got this error on the 3rd point.

    That is strange. If you install NCS from the Toolchain Manager, all the dependencies should get included automatically. Could you do the below:

    1. Open Segger Embedded Studio from the Toolchain Manager (don't install it separately):

    2.  Check if you see the file <user name>\ncs\v1.5.0\toolchain\opt\bin\python.exe
      • Open cmd in <user name>\ncs\v1.5.0\toolchain\opt\bin and run 
    Gops said:
    How to resolve this python dependency? I have faced this issue earlier while opening copy of any example project also.

     Is this error consistent? If not, could you explain step-by-step how to reproduce it?

    What happened when you did the following:

    • "Open the project again with File > Open nRF Connect SDK Project"
  • Hi Simon.

    Open Segger Embedded Studio from the Toolchain Manager (don't install it separately):

    Today strangely, I am not getting any error when I did Project-> Run CMake. And build was also successful.

    May be due to restart of the IDE, it works freshly. I don't know.

    Check if you see the file <user name>\ncs\v1.5.0\toolchain\opt\bin\python.exe
    • Open cmd in <user name>\ncs\v1.5.0\toolchain\opt\bin and run 

    I see the python.exe inside the path you have mentioned

    I get this up on running python from command prompt.

    Is this error consistent? If not, could you explain step-by-step how to reproduce it?

    Earlier I had made a copy of an example at the same location(ncs_1.5.1\v1.5.1\nrf\samples\bluetooth).

    And when I opened that example from File->open nrf SDK project, I used to get the error like

    Today also I get the same error.

    According to the link (to include custom library files) you shared earlier, I made a simple hello world project(Not in v1.5.1\zephyr\samples\basic ) just at  C:\My_Project\ and added a ".c" an ".h" file. And today I see no error.

    In this similar way I want to include an example from the CMSIS 5 DSP package which I have installed from Tools->Package Manager. I want to do this for "ncs_1.5.1\v1.5.1\nrf\samples\bluetooth\peripheral_lbsCopy" as I have shown in the screenshot. Error coming on opening this copy of project now.

    Also I would like to do the same for any example project from Zephyre folder(\v1.5.1\zephyr\samples\basic).

    Or is there any other way to use the package?

    Thank you..

Reply
  • Hi Simon.

    Open Segger Embedded Studio from the Toolchain Manager (don't install it separately):

    Today strangely, I am not getting any error when I did Project-> Run CMake. And build was also successful.

    May be due to restart of the IDE, it works freshly. I don't know.

    Check if you see the file <user name>\ncs\v1.5.0\toolchain\opt\bin\python.exe
    • Open cmd in <user name>\ncs\v1.5.0\toolchain\opt\bin and run 

    I see the python.exe inside the path you have mentioned

    I get this up on running python from command prompt.

    Is this error consistent? If not, could you explain step-by-step how to reproduce it?

    Earlier I had made a copy of an example at the same location(ncs_1.5.1\v1.5.1\nrf\samples\bluetooth).

    And when I opened that example from File->open nrf SDK project, I used to get the error like

    Today also I get the same error.

    According to the link (to include custom library files) you shared earlier, I made a simple hello world project(Not in v1.5.1\zephyr\samples\basic ) just at  C:\My_Project\ and added a ".c" an ".h" file. And today I see no error.

    In this similar way I want to include an example from the CMSIS 5 DSP package which I have installed from Tools->Package Manager. I want to do this for "ncs_1.5.1\v1.5.1\nrf\samples\bluetooth\peripheral_lbsCopy" as I have shown in the screenshot. Error coming on opening this copy of project now.

    Also I would like to do the same for any example project from Zephyre folder(\v1.5.1\zephyr\samples\basic).

    Or is there any other way to use the package?

    Thank you..

Children
Related