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

Again messing with the nrfx drivers, glue and error headers.

Hello there,

I created a project a while ago with the SES and the SDK 15.x. For a new Project, we would like to move to PlatformIO. Right now I am evaluating where we will use some available frameworks/libraries or create local libraries.

I am trying to integrate the nrfx drivers into the project. So I downloaded the SDK and after about 10 minutes some horror memories came back to my mind :D

So what I have done:

Downloaded the SDK 16.0.0
Copied the modules\nrfx folder into the project
Copied the nrfx_config.h from modules\nrfx\templates\nRF52840
A tried to reuse my old glue and log headers but they seem to be different, so I went back to the Documentation and found that for the SDK the files from integration should be used
So I copied the nrfx_log.h nrfx_glue.h from the integration\nrfx folder into the project, I skipped the legacy folder in hope it will not be needed. (You should never hope, it is needed)
So i copied the legacy folder as well
I found that nrfx_common.h file includes nrf.h files from the MDK folder (I am a bit disappointed since I was hoping that all the needed sources are located in the modules\nrfx directory)
I included the MDK directory
Now I recognized the nrfx_glue.h includes the nrf_assert.h file from the components\libraries\util (At this point I am just adding includes paths out of disappointment)
Compiled again and found that "nrf_error.h" included from In file included from util/app_error.h:57:0,
from util/app_util_platform.h:60,
from include/nrfx_glue.h:182,
from nrfx/nrfx.h:46,
from src\nrfx\drivers\nrfx_adc.c:41:

At this point I gave up as the above way seems not to be the right way to use nrfx standalone.
How is it done? Thanks

Related