Why doesn't the build include driver files?

Followed the instructions for Zephyr workspace application.

the structure follows the example-application and video "tutorial: mastering Zephyr Driver Development" by Gerald Paretas.

at the file search stage, the cmake function message() shows that it goes into the driver folder.

But the application builds successfully only when this driver file is copied to \zephyrproject\zephyr\drivers\display
and add the line to the CMakeLists.txt file, which is located in this folder:
zephyr_library_sources_ifdef(CONFIG_ILI9486 display_ili9486.c).

I'm using windows 11, zephyr-v3.5.0-3682-gd7af6f371034

I'm going through the Getting Started Guide completely.
Applications are located in Zephyr workspace.
Simple examples are built successfully.
But if it’s a little more complicated, then errors appear inside Zephyr.

So, the Example application builds with errors out of the box. To avoid errors, I need to specify additional Kconfig parameters. (Case ID: 320177)

5707.test-origin-tft.zip

  • Does not work.

    I experimented with the app/Zephyr folder earlier, as in the examples I linked to earlier.

    I understand that I am not alone. github.com/.../27048

    And there is no solution that works either.

    In Zephyr git community, it is customary to transfer the problem to someone else, rather than solve it. (See the issues on the git.)

    I'll try to write to the Teslabs Engineering to fix ili9xxx.

    Thank you for your time, Håkon.

    I'm closing the ticket.

    I'll work with SDK for now and choose another RTOS.

    Best regards, Paul

    P.S.

    You need to work for the Linux Foundation, Intel, or any large company that is involved in the development of Zephyr, do something well in it and get results. This opinion was formed from reading the Git.

    This is what we are talking about here, What is this variable?

    Note also having a separate COMMON_OVERLAY_CONFIG_DIR which defaults to somewhere in tree will be necessary to allow out-of-tree common configuration overlays, so I still think it is a good idea. And actually, might as well make it a list, COMMON_OVERLAY_CONFIG_DIRS, to allow site-specific values in addition to in-tree ones.

    github.com/.../14740

    ...

    The Zephyr build system is already quite complex with Kconfig and devicetree files being picked up from a number of different places. There is a learning curve for new developers starting out with Zephyr.
    Extending this complexity with more locations will make it even more difficult, so we should be very careful.

    github.com/.../14740

    I was ready to pay for training, but I couldn’t find anyone. Disappointed

  • In my opinion, I understood what was going on.
    In theory.

    We were looking in the wrong place and solving the problem in the wrong place.

    This line makes Zephyr look inside the tree, and not at the application.

    chosen 
    { zephyr,display = &ili9486_waveshare_3_5_tft_sku_13506; };


    developer.nordicsemi.com/.../api.html

    This line makes Zephyr look inside the tree, not at the application.

    But lvgl module depends on this line. This is the maze. How do we get out of it?

    Maybe my theory isn't right.
    I don't have any other suspects.

  • Hi,

     

    The board_dir is set in your CMakelists.txt, and the shield is properly added at my end, when I add this to the build configuration:

    -DSHIELD=waveshare_3_5_tft_sku_13506

    I'm using the formerly attached .zip file:

    Håkon Alseth said:

    Here is the .zip with the above changes. I was not able to successfully test it, but it does compile now:

    testlcd_outoftree_driver.zip

    As I do not have the shield itself, I cannot test it, but it does indeed pull in the correct files at my end.

      

    Could you share your build configuration and/or build generation error(s)?

     

    Kind regards,

    Håkon

  • Hi Håkon,

    I have to close this ticket.

    I can't find a working solution for Zephyr about two simple things.

    1. Not using Git.
    2. Have only one copy of Zephyr.

    I can't build a T3 application as described in the documentation.
    By any means.

    Now with this manifest taken from documentation even blinky is not going to build.

    Workspaces — Zephyr Project documentation (nRF Connect SDK) (nordicsemi.com)

    manifest:
      version: "1.2"
    
      remotes:
        - name: zephyrproject-rtos
          url-base: https://github.com/zephyrproject-rtos
    
        - name: MyCompany
          url-base: https://github.com/MyCompany
    
      defaults:
        remote: MyCompany
    
      projects:
        - name: zephyr
          remote: zephyrproject-rtos
          revision: main
          import: 
    
        - name: testlcd
          revision: main
          description: the test LCD example project
          groups:
            - groupLearn
          path: applications/testlcd
    
        - name: testlaborigintft
          revision: main
          groups:
            - groupLearn
          description: the test LCD project from sample (not use ili9488 driver)
          path: applications/testlaborigintft
    
        - name: ledblinky
          revision: main
          groups:
            - groupLearn
          description: the first project
          path: Lemmus/ledblinky
    
      self:
        path: Lemmus-manifest

    Is that why the linker went into a neighboring application?

    PS C:\zephyrproject\Lemmus\ledblinky> west build -b nrf52840dk_nrf52840
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/zephyrproject/Lemmus/ledblinky
    
    -- Generated devicetree_generated.h: C:/zephyrproject/Lemmus/ledblinky/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/zephyrproject/Lemmus/ledblinky/build/zephyr/dts.cmake
    Parsing C:/ncs/v2.5.1/zephyr/scripts/kconfig
    C:/ncs/v2.5.1/zephyr/scripts/kconfig/kconfig.py: C:/zephyrproject/applications/testlcd/Kconfig:12: recursive 'source' of 'Kconfig.zephyr' detected.
    Include path:
    C:/ncs/v2.5.1/zephyr/scripts/kconfig:8
    Kconfig.zephyr:41
    modules/Kconfig:13

    It's a simple blinky for the T3 test.  Disappointed

    All the best.

  • Hi,

     

    Paultino_nordost said:

    I have to close this ticket.

    I can't find a working solution for Zephyr about two simple things.

    1. Not using Git.
    2. Have only one copy of Zephyr.

    I can't build a T3 application as described in the documentation.
    By any means.

    I am sorry to hear that the process has been this painful. I will raise this as an issue internally with our UX group and product owners/management.

     

    Kind regards,

    Håkon

Related