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

PWM in Mesh SDK 2.0.0

Hi,

I would like to use a PWM application with mesh SDK. However when I try to compile, I got an error because "app_pwm.h" is missing (No such file or directory).

The only related topics I found was here and here but I guess this is outdated as "The nRF5 SDK for Mesh now requires the nRF5 SDK to compile. By default, the nRF5 SDK is expected to be adjacent to the nRF5 SDK for Mesh".

Can someone help me with this?

Parents
  • hello,

    Assuming that you are using Segger Embedded Studio (SES), you can follow the directions in the .\nrf5-mesh-sdk_v2.01\doc\getting_started\SES.md file... This will allow you to direct SES to the location of your nRF5 SDK.

    # nRF5 SDK for Mesh Segger Embedded Studio first time setup
    
    Segger Embedded Studio determines the location of the nRF5 SDK through macros.
    Before building the example, you must first configure the `SDK_ROOT` macro
    in Segger Embedded Studio. This is a one time global configuration that will
    still be valid the next time you open Segger Embedded Studio. The `SDK_ROOT`
    variable defaults to an nRF5 SDK 15.0.0 instance unzipped right next to the mesh
    folder if not set.
    
    The `SDK_ROOT` macro can be set by navigating to Tools -> Options, then
    "Building". Under "Build" in the configuration list, edit "Global macros" to
    contain `SDK_ROOT=<the path to your nRF5 SDK 15 instance>`. Save the
    configuration.
    
    The path can be verified by opening one of the source files under the "nRF5 SDK"
    file group. If the macro was set correctly, the file should open in the editor
    window. If not, it will show an error message telling you that the file couldn't
    be found.
    
    For more info on Segger Embedded Studio macros, see
    https://studio.segger.com/ide_project_macros.htm

    Alternatively, you can simply ensure that the nRF5 SDK is located adjacently to the nRF5 Mesh SDK as depicted in the image below...

    Regards,

  • Hello leonwj,

    Thanks for the quick reply.

    Unfortunately, that is not the solution. I had  nRF5 SDK located adjacently to the nRF5 Mesh SDK already. That part is fine, since I was able to Build the light_switch server example without changes.

    I also checked through the instructions: "The path can be verified by opening one of the source files under the "nRF5 SDK" file group. If the macro was set correctly, the file should open in the editor window. If not, it will show an error message telling you that the file couldn't be found." and it worked.

    But if I try to include other header files it fails with the message No such file or directory as described before.


    Then I still edited the "Global macro" as described, but still it doesn't work (I tried app_pwm.h and nrf_drv_pwm.h).

    Regards,

  • Hi erik,

    I added the missing files from $SDK_ROOT/modules/nrfx/drivers/src/, plus some header and c files more to solve dependencies issues.

    Now, besides some undefined references (still), I also get errors with multiple definition:



    Isn't there a better way to actually integrate the nrf SDK 15 with Mesh SDK?
    Because so far I have just been fixing dependencies issues over and over again :/

    Any help is more than welcome!

  • Try to set these defines in sdk_config.h to 1 :

    GPIOTE_ENABLED
    NRFX_GPIOTE_ENABLED
    NRFX_PPI_ENABLED
    NRFX_TIMER_ENABLED
    PPI_ENABLED
    TIMER_ENABLED
    NRF_STRERROR_ENABLED

  • Thanks for the reply Daniel,

    I enabled them all but still get the same 12 errors.

    EDIT: I added app_util_platform.c and nrf_drv_ppi.c, and respective path to header directories.

    Undefined references seem to be solved! But now I still face multiple declaration issues:

  • Hi,

    Have you solved the issues with missing and double includes now, or do you want us to have a look at it?

    Regards,
    Terje

  • Hi,

    Yes, I managed to solve them. If it was the proper way or not, I'm yet to discover,.

    For example I'm having error when trying to add a second instance of PWM (with one it works just fine). Don't know if it might be related or not.

    Anyway, I will create another ticket related with this new issue, if I fail to solve it.

    Regards,
    Paulo

Reply Children
Related