Migration from SDK v2.7.0 to v2.8.0 (and v2.9.0) failing

We have a project that includes a custom board definition and out of tree driver with folder structure as follows:

.
├── boards
└── my_project
    ├── CMakeLists.txt
    ├── build_r01
    ├── drivers
    │   ├── display
    │   │   ├── ssd1322.c
    │   │   ├── ssd1322_regs.h
    │   │   └── zephyr
    │   │       ├── CMakeLists.txt
    │   │       ├── Kconfig
    │   │       ├── Kconfig.ssd1322
    │   │       └── module.yml
    │   └── brand
    │       ├── device.c
    │       ├── device.h
    │       └── zephyr
    │           ├── CMakeLists.txt
    │           ├── Kconfig
    │           ├── Kconfig.dcb1m
    │           └── module.yml
    ├── dts
    │   └── bindings
    │       ├── display
    │       │   └── solomon,ssd1322fb.yaml
    │       └── brand
    │           └── brand-device.yaml
    ├── prj.conf
    └── src
        ├── file1.c
        ├── file2.c
        ├── file3.c
        ├── inc
        │   ├── file1.h
        │   ├── file2.h
        │   ├── file3.h
        ├── main.c
 

Our project builds successfully with SDK v2.7.0 and toolchain v2.7.0

Upgrading the toolchain so we have SDK v2.7.0 and toolchain v2.9.0 works fine.

 

Upgrading the SDK so we have SDK v2.9.0 and toolchain v2.9.0 fails to build the application.

We see this at the end of the build output in the terminal:

CMake Warning at /opt/nordic/ncs/v2.9.0/zephyr/CMakeLists.txt:952 (message):
  No SOURCES given to Zephyr library: drivers__display

  Excluding target from build.


-- Configuring done
-- Generating done
-- Build files have been written to: /my_project/build_r01/my_project
-- Configuring incomplete, errors occurred!
See also "/my_project/build_r01/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/b8efef2ad5/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/b8efef2ad5/opt/[email protected]/bin/python3.12 -B/my_project/build_r01 -GNinja -DBOARD=my_board_r01 -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/ -S/opt/nordic/ncs/v2.9.0/zephyr/share/sysbuild -DAPP_DIR:PATH=/my_project

As can be seen, the drivers in the src folder (which are referenced from the board definition) are not being found.

If we roll the SDK back to v2.7.0 the same project builds ok again so this is definitely a difference between v2.7.0 and what follows.

Please note we also tried with v2.8.0 with the same result as v2.9.0 so wherever I have mentioned v2.9.0 I also tried the same with v2.8.0

So, the breaking change seems to have occurred between v2.7.0 and v2.8.0 and the breaking change remains in v2.9.0 

  • Hey Alex,

    I had a similar error to this today because in my own custom "flash.c" and "flash.h" I had defined the module logging prefix as "flash". With `LOG_MODULE_REGISTER(flash);`

    This apparently conflicts with a similar definition in zephyr /workdir/zephyr/drivers/flash/flash_util.c.

    When I changed it, the error was resolved.

    Hope this helps you.

    Clayton

  • Hi Clayton.

    Thank you so much. You were spot on. I renamed 'display' in the following and my build gets much further. It still won't build due to another, unrelated, issue which I'll work through or raise a separate support ticket for but you unblocked something that has been an issue for months so thank you! In hindsight it is obvious you can't declare a module with a conflicting name but it was not at all obvious this was the issue from the build output.

    LOG_MODULE_REGISTER(display, LOG_LEVEL_DBG);

Related