nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A power or clock problem?

Hello all,

I have started to use the App timer library and RTC, indeed, I have added certain .c files as libraries to use just a simple start/stop time counter that is started manually, however, I got to a problem that I cannot fix :/ Indeed, I have commented the code, however, apparently the "libraries " that I am trying to include are obstructing the compilation?

The error I get when I try to compile the code #error "This code is not supposed to be compiled when neither POWER nor CLOCK is enabled."

BTW The RTC is disabled in the SDK config

Can you help?

Best.

PS I cannot find the nrfx_clock.h ?

compilation error

Parents
  • BTW found the nrf_drv_clock.h and commented out the content (not yet sure how to remove the file :) and it compiles ok, however, I am not sure what I am doing wrong :/ For example, I have been following this tutorial : https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/application-timer-tutorial and I have stoped here Add the following directory to the include paths (the path is relative to project file): because I am not sure what is the "include path" to actually add the necessary files.

    Maybe the solution is to add those into the include paths, any can tell me more how to do that? If that is related to the so-called preprocessor than I am wondering what I am doing wrong, because the paths have been added. For example, this is my user include directory:

    C:/dev/nRF5_SDK_17.1.0_ddde560/modules/nrfx/drivers/src

    C:/dev/nRF5_SDK_17.1.0_ddde560/integration/nrfx/legacy

    C:/dev/nRF5_SDK_17.1.0_ddde560/modules/nrfx/drivers/include

    C:/dev/nRF5_SDK_17.1.0_ddde560/components/libraries/timer

    Am I missing something here?

    Yeah I am a beginner.

    Best.  

  • What does the build error look like at this time? And what IDE are you using? Segger Embedded Studio?

    In that case, please try to look at how the default include folders are added:

    And try to add your folders in the same way. 

    BR,

    Edvin

  • Hello Edvin and thank you for your input!

    corrected the edits:

    ../../../../../../modules/nrfx/drivers/src

    ../../../../../../modules/nrfx/drivers/include

    ../../../../../../integration/nrfx/legacy

    ../../../../../../components/libraries/timer

    according the way you suggested, but unfortunately, nothing better :/ 

    I have even opened the program from scratch ..

    Actually I went to the nRF_Drivers folder, namely on the nrf_drv_clock.c and tried to manually compile the file with the ctrl+F7 and it does not compile? OK, I am on SDK 17.1.0 and should I see the timer as enabled in the CMSIS, btw I could not see it, namely the timer in CMSIS... afterwards I have open the nrf time example and check that... after several looks I have found out that it would help to enable the NRF_CLOCK in the SDK config , once that was done , obviously compiles ok!

    Best.

    PS apparently I am learning the nrf  practically :)

Reply
  • Hello Edvin and thank you for your input!

    corrected the edits:

    ../../../../../../modules/nrfx/drivers/src

    ../../../../../../modules/nrfx/drivers/include

    ../../../../../../integration/nrfx/legacy

    ../../../../../../components/libraries/timer

    according the way you suggested, but unfortunately, nothing better :/ 

    I have even opened the program from scratch ..

    Actually I went to the nRF_Drivers folder, namely on the nrf_drv_clock.c and tried to manually compile the file with the ctrl+F7 and it does not compile? OK, I am on SDK 17.1.0 and should I see the timer as enabled in the CMSIS, btw I could not see it, namely the timer in CMSIS... afterwards I have open the nrf time example and check that... after several looks I have found out that it would help to enable the NRF_CLOCK in the SDK config , once that was done , obviously compiles ok!

    Best.

    PS apparently I am learning the nrf  practically :)

Children
No Data
Related