NRFX SPI Migration From NCS 1.9 to NCS 2.0

Hello, I've been trying to migrate my code which uses NRFX SPI functions to NCS 2.0

The code compiles just fine on NCS 1.9, but after migrating to NCS 2.0 I noticed that it doesn't recognize that I'm even using NRFX SPI drivers:

However my configuration does have these lines in the configuration:

It's probabbly something as simple as missing line in configuration. What am I missing?

  • Hi,

    Could you please elaborate on your question? What happens when you switch to NCS v2.0.0? Do you get any error? If so, could you show the error? Did you make any changes to your application in the transitioning process from NCS v1.9.0 to v2.0.0? Where are the screenshots taken from? Do you use any of the provided NCS samples?

    Best regards,
    Dejan

  • Yes, after switching to NCS 2.0 I get an error that identifier "NRFX_SPIS1_INST_IDX" is undefined therefore I am unable to compile it. Upon investigating this further I found that this define is missing (not compiled) because it doesn't pass this if in nrfx_spis.h file:

    As you can see from all the greyed out text the define is not included because it cannot pass this if. Upon investigating it even further i found that a whole nrfx_spis.c file is not included into build because it doesn't pass this NRFX_CHECK (also seen in first, initial post screenshot):

     I do not use any sample application, this application has been in development for a while. I figure something changed with the configuration which causes me to fail this 'if' and not include all the nrfx_spis.c file. So the question is what changed going from NCS 1.9 to NCS 2.0 that causes me not to include nrfx_spis drivers into the build?

  • Hi,

    The problem you encountered might be related to this commit.
    You could try setting compatible = "nordic,nrf-spis" in an overlay file as shown below.

    &spi1 {
        compatible = "nordic,nrf-spis";
    };


    Best regards,
    Dejan

Related