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?

  • Hi,

    So, I edited sdk_config.h to enable and set APP_PWM_ENABLED 1, I got 48 errors this time. Then I tried to enable NRFX_TIMERNRFX_PPI and NRFX_GPIOTE with no results.

  • @PauloZacarias

    You appear to have missed to add a few *.c files from $SDK_ROOT/modules/nrfx/drivers/src/ in your projects and potentially also the preprocessor include directories for their related .h files.

    In your SES Preprocessor include files, I would suggest removing $SDK_ROOT/modules/nrfx/templates (and any subdirectories), since the directory $SDK_ROOT/integration/nrfx has files with identical names that have been tailored to the SDK. (depending on order  you list the preprocessor include directory, you can get one set or the other -I hope Nordic can fix the overlap between these two directory branches in next SDK) Without the changes, you can be making config changes and nothing happens.

    If you plan to eventually migrate your project to a newer version of Mesh stack, it can help to define a global macro similar to $(SDK_ROOT), e.g $(MESH_ROOT) and use it when defining the preprocessor include directories for the MeshSDK.

    Finally, the file implmentation/nrfx/nrfx_log.h has a subtle bug that can appear depending on the order your .h files get included. On line 51 the right-hand side of the #define should be NRFX_CONCAT_3(..) instead of CONCAT_3(..). Since CONCAT_3(..) is defined in nordic_common.h you can be lucky and the preprocessor may have picked up the definition already. and you won't (initially) experience any error.(Spent 1/2 day hunting that one down, so thought should share it!)

  • 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:

Related