Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 + nRF SDK v17.009 Project with SDK as library

Hi,

I want to create a fresh project in Keil with nRF SDK as static library included into application. I have created the project, but when I run, the code always stuck into "wait_for_flash_ready()" while the file is present in library, if I do "go to definition"  for this functions, it errors to not found.

In the same project and folder structure, if I remove the library and include SDK in the same build as application, things run all fine.

Is there any issue if I create SDK as library (.lib) file and include in the application? Is there any such template available for Keil?

Thanks & regards,

Priyesh

Parents Reply
  • Hi Priyesh, 

    Sorry for the mistake. Please let me correct the answer. 

    Not sure what causes the issue. I have never heard about anyone putting the whole SDK into a lib-file before.
    Looks like the wait_for_flash_ready() function puts the chip in the system on mode, could be that something in the library prevents it from waking up again, but that is just speculations, I don't know what could cause that. 

    Maybe the library was compiled without SOFTDEVICE present flag set, while project, where lib is included, has this flag set? (or the other way around):

    /**@brief Sleep until an event is received. */
    static void power_manage(void)
    {
    #ifdef SOFTDEVICE_PRESENT
    (void) sd_app_evt_wait();
    #else
    __WFE();
    #endif
    }


    The #ifdef part is handled during compilation if I'm not mistaken, maybe that one of the options is removed when compiled into a library. 

    -Amanda H.

Children
Related