Modification of SDK device drivers

We are developing an application in which we need to modify an existing device driver.
It's about LIS2DH driver that is part of nRF Connect SDK v1.8.0 and we are using VSCode.

Currently we have working app a proof of concept, and we need to remove some data processing as we need raw sensor samples, and we do not want to edit SDK, because we want our changes in our repo and also not the entire SDK code base.

The plan was as follows, transfer the existing driver folder from SDK to our codebase, remove any switches and defines that links SDK driver from prj.conf (CONFIG_SENSOR=y, CONFIG_LIS2DH=y), modify CMakeLists.txt, to include files in src subdirectory, modify Kconfig so we wont use SDKs driver. 

And here begins an infinite number of build errors, dual Kconfig processing, missing defines,...
We tried many things many times... without results.

We will appreciate a point to right direction.

Thank you!

  • Hi,

    It may be simpler to rename the driver and all related configs, to make sure it does not conflict with the existing driver and Kconfigs. You may also include the changes directly in the existing driver guarded by a Kconfig, etc., but this may be more work maintaining during SDK version migrations.

    If you want us to help resolve the build errors, please upload the sample with the driver, for us to reproduce and debug the issue.

    Best regards,
    Jørgen

Related