Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Upgrading to NCS 2.0.2 for nRF5340

Hello,

I have been successfully developing, programming, and debugging with NCS v1.9.1 on a custom nRF5340 design. As my target board, I base it off the ubx_evknorab10_nrf5340 from the u-blox-sho-OpenCPU repository. I saw that NCS v2.0.2 was now supported on that board, so I went ahead and installed v2.0.2 using the Toolchain Manager. After a successful install, I opened VS Code and tried to compile with this new toolchain. It failed with the following errors. Can you advise on how to fix this?

Thank you,

Jamie

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FAILED: zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj
C:\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.0.2/zephyr/include/zephyr -IC:/ncs/v2.0.2/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.2/nrf/include -IC:/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -isystem C:/ncs/v2.0.2/nrfxlib/crypto/nrf_cc312_platform/include -Og -imacros C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/ncs/v2.0.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj -MF zephyr\drivers\spi\CMakeFiles\drivers__spi.dir\spi_nrfx_spim.c.obj.d -o zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj -c C:/ncs/v2.0.2/zephyr/drivers/spi/spi_nrfx_spim.c
In file included from C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain.h:50,
from C:\ncs\v2.0.2\zephyr\include\zephyr\init.h:10,
from C:\ncs\v2.0.2\zephyr\include\zephyr\device.h:29,
from C:\ncs\v2.0.2\zephyr\include\zephyr\drivers\spi.h:24,
from C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:7:
C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@8000 defined without required pin configuration"
77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:218:2: note: in expansion of macro 'BUILD_ASSERT'
218 | BUILD_ASSERT((IS_ENABLED(CONFIG_PINCTRL) && \
| ^~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:584:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
584 | SPI_NRFX_SPIM_DEVICE(0);
| ^~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@8000 has legacy *-pin properties defined although PINCTRL is enabled"
77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro 'BUILD_ASSERT'
229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
| ^~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:584:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
584 | SPI_NRFX_SPIM_DEVICE(0);
| ^~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@a000 has legacy *-pin properties defined although PINCTRL is enabled"
77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro 'BUILD_ASSERT'
229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
| ^~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:600:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
600 | SPI_NRFX_SPIM_DEVICE(4);
| ^~~~~~~~~~~~~~~~~~~~
[73/171] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
[74/171] Linking C static library zephyr\lib\posix\liblib__posix.a
[75/171] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
[76/171] Linking C static library zephyr\drivers\clock_control\libdrivers__clock_control.a
[77/171] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a
[78/171] Building C object CMakeFiles/app.dir/src/main.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE' --build 'c:\D-drive\Tessarae\Aurelia\Firmware\HexTile\HexTileController\build'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

  • Hello Jamie,

    The build errors are likely due to the introduction of Pin control(pinctrl) in Zephyr. The steps for migrating a project are shown in the documentation.

    It looks like the project you refer to has been updated to nRF Connect SDK v2.0.2. Check out the project's board files, for example these two files:

  • Hello. I tried adding pinctrl to the overlay but still getting errors. First, here is what I added to the overlay:

    ------------------------------------------------------------------------------------------------------------------------------------------

      &pinctrl {
        i2c1_default: i2c1_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
            };
        };
        i2c1_sleep: i2c1_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
                low-power-enable;
            };
        };
        i2c2_default: i2c2_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 18)>,
                    <NRF_PSEL(TWIM_SCL, 0, 17)>;
            };
        };
        i2c2_sleep: i2c2_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 18)>,
                    <NRF_PSEL(TWIM_SCL, 0, 17)>;
            };
            low-power-enable;
        };
        spi0_default: spi0_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 19)>,
                    <NRF_PSEL(SPIM_MISO, 0, 21)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 20)>;
            };
        };
        spi0_sleep: spi0_sleep {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 19)>,
                    <NRF_PSEL(SPIM_MISO, 0, 21)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 20)>;
                low-power-enable;
            };
        };
        spi4_default: spi4_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                    <NRF_PSEL(SPIM_MISO, 0, 10)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 9)>;
            };
        };
        spi4_sleep: spi4_sleep {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 8)>,
                    <NRF_PSEL(SPIM_MISO, 0, 10)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 9)>;
                low-power-enable;
            };
        };
      };
    -----------------------------------------------------------------------------------------------------------------------------------------

    Next, here is the new set of errors I am getting when compiling.

    -----------------------------------------------------------------------------------------------------------------------------------------

    FAILED: zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj
    C:\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.0.2/zephyr/include/zephyr -IC:/ncs/v2.0.2/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.2/nrf/include -IC:/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -isystem C:/ncs/v2.0.2/nrfxlib/crypto/nrf_cc312_platform/include -Og -imacros C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/ncs/v2.0.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj -MF zephyr\drivers\i2c\CMakeFiles\drivers__i2c.dir\i2c_nrfx_twim.c.obj.d -o zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj -c C:/ncs/v2.0.2/zephyr/drivers/i2c/i2c_nrfx_twim.c
    In file included from C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain.h:50,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\init.h:10,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\device.h:29,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\drivers\i2c.h:23,
    from C:\ncs\v2.0.2\zephyr\drivers\i2c\i2c_nrfx_twim.c:8:
    C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/i2c@b000 defined without required pin configuration"
    77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:218:2: note: in expansion of macro 'BUILD_ASSERT'
    218 | BUILD_ASSERT((IS_ENABLED(CONFIG_PINCTRL) && \
    | ^~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\i2c\i2c_nrfx_twim.c:409:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
    409 | NRF_DT_CHECK_PIN_ASSIGNMENTS(I2C(idx), 1, scl_pin, sda_pin); \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\i2c\i2c_nrfx_twim.c:469:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE'
    469 | I2C_NRFX_TWIM_DEVICE(2);
    | ^~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/i2c@b000 has legacy *-pin properties defined although PINCTRL is enabled"
    77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro 'BUILD_ASSERT'
    229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
    | ^~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\i2c\i2c_nrfx_twim.c:409:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
    409 | NRF_DT_CHECK_PIN_ASSIGNMENTS(I2C(idx), 1, scl_pin, sda_pin); \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\i2c\i2c_nrfx_twim.c:469:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE'
    469 | I2C_NRFX_TWIM_DEVICE(2);
    | ^~~~~~~~~~~~~~~~~~~~
    [65/171] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [66/171] Building C object zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj
    FAILED: zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj
    C:\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.0.2/zephyr/include/zephyr -IC:/ncs/v2.0.2/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.2/nrf/include -IC:/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -isystem C:/ncs/v2.0.2/nrfxlib/crypto/nrf_cc312_platform/include -Og -imacros C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/ncs/v2.0.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/D-drive/Tessarae/Aurelia/Firmware/HexTile/HexTileController=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj -MF zephyr\drivers\spi\CMakeFiles\drivers__spi.dir\spi_nrfx_spim.c.obj.d -o zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj -c C:/ncs/v2.0.2/zephyr/drivers/spi/spi_nrfx_spim.c
    In file included from C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain.h:50,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\init.h:10,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\device.h:29,
    from C:\ncs\v2.0.2\zephyr\include\zephyr\drivers\spi.h:24,
    from C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:7:
    C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@8000 defined without required pin configuration"
    77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:218:2: note: in expansion of macro 'BUILD_ASSERT'
    218 | BUILD_ASSERT((IS_ENABLED(CONFIG_PINCTRL) && \
    | ^~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
    518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:584:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
    584 | SPI_NRFX_SPIM_DEVICE(0);
    | ^~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@8000 has legacy *-pin properties defined although PINCTRL is enabled"
    77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro 'BUILD_ASSERT'
    229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
    | ^~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
    518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:584:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
    584 | SPI_NRFX_SPIM_DEVICE(0);
    | ^~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "/soc/peripheral@50000000/spi@a000 has legacy *-pin properties defined although PINCTRL is enabled"
    77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.0.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro 'BUILD_ASSERT'
    229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
    | ^~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro 'NRF_DT_CHECK_PIN_ASSIGNMENTS'
    518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.0.2\zephyr\drivers\spi\spi_nrfx_spim.c:600:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEVICE'
    600 | SPI_NRFX_SPIM_DEVICE(4);
    | ^~~~~~~~~~~~~~~~~~~~

  • Hi Jamie, sorry for the later reply.

    Is the overlay you posted the full overlay, or only a part of it? Are you still defining the pins the old way in the overlay?

    I downloaded the board files of ubx_evknorab10_nrf5340 and tried building hello_world, using the overlay you provided. I was not able to reproduce the errors you posted. The overlay looks fine (low-power-enable could perhaps be moved two lines up, so that it is located within the brackets of group1).

    What happens if you try to use i2c3 instead of i2c2?

    Which board version are you building for?

    Would you be able to share a minimal code snippet that reproduces the error?

  • Hi.Thank you for the help. I have attached the test code source, plus the overlay and prj.conf, etc. Please let me know what I'm doing wrong. Thanks.

    -JamieuBlox_Test.zip

  • Hello. I was just checking in to see if you had a chance to review my attached project and if you had any advice on how to fix the problem. Thank you.

    -Jamie

Related