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

nrfx_glue.h macros implementation question

Hi, I am a beginner with nRF52840. In the SDK under modules/nrfx/templates we find a file "nrfx_glue.h".

This file contains macros that should be implemented according to the needs of the host environment. A file with the same name can be found under integration/nrfx, but this file seems to contain an implementation of the macros for baremetal. Is this correct?

Why is this file placed in a folder together with legacy code and why is including legacy code?

Are there other implementation of nrfx_glue.h available for Baremetal or other platforms?

Thanks!

Parents
  • Hi,

    Let me first clarify that the term "legacy" is bad, and should not have been used. The "legacy" drivers are really the nRF5 SDK integration layer for nrfx, and should normally be used.

    The nrfx_glue.h file should be implemented for each SDK/RTOS/integration (call it what you want) where nrfx is used, and for nRF5 SDK, you find the correct one located under <nRF5 SDK>\integration\nrfx\. This implementation is always sensible when using nRF5 SDK. You can use this file regardless of if you are using the SoftDevice or not (bare metal) - it handles the difference using the SOFTDEVICE_PRESENT define.

    There can be other implementations for other systems, such as this one for the Zephyr RTOS.

Reply
  • Hi,

    Let me first clarify that the term "legacy" is bad, and should not have been used. The "legacy" drivers are really the nRF5 SDK integration layer for nrfx, and should normally be used.

    The nrfx_glue.h file should be implemented for each SDK/RTOS/integration (call it what you want) where nrfx is used, and for nRF5 SDK, you find the correct one located under <nRF5 SDK>\integration\nrfx\. This implementation is always sensible when using nRF5 SDK. You can use this file regardless of if you are using the SoftDevice or not (bare metal) - it handles the difference using the SOFTDEVICE_PRESENT define.

    There can be other implementations for other systems, such as this one for the Zephyr RTOS.

Children
Related