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

  • Hi,

     

    Paultino_nordost said:

    I did not find the "manifest-repo" in the source code, and the documentation at this point is not clear to me.

    Do I need to write [manifest] path = manifest-repo in .west/config or does west automatically go to this folder?

    Just for reference, T3 is a forest topology:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/develop/west/workspaces.html#t3-forest-topology

    "manifest-repo" is a arbitrary name that matches where the west.yml is located.

    This could have been any name, as long as the initial west workspace (.west/config) points towards this path.

     

    Paultino_nordost said:
    Do I need to write [manifest] path = manifest-repo in .west/config or does west automatically go to this folder?

    This is done when you initialize your west workspace, as shown in the file view here:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/install_ncs.html#get-the-ncs-code

    .west will be automatically generated to point towards your workspace's west.yml. In the above case, it will be <west-workspace>/nrf/west.yml.

     

    Kind regards,

    Håkon

  • Hi all,

    Thanks everyone. I'm done. Came out.

    Apparently Zephyr doesn’t want to be friends with me. It was easier for me to find the reason for a non-working example and figure out how to write a driver than to configure it to work without errors. This happened first today

    Then, after the update of the West, this.

    Traceback (most recent call last):
      File "<frozen runpy>", line 198, in _run_module_as_main
      File "<frozen runpy>", line 88, in _run_code
      File "C:\Program Files\Python311\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\Program Files\Python311\Lib\site-packages\west\app\main.py", line 1085, in main
        app.run(argv or sys.argv[1:])
      File "C:\Program Files\Python311\Lib\site-packages\west\app\main.py", line 236, in run
        self.load_manifest()
      File "C:\Program Files\Python311\Lib\site-packages\west\app\main.py", line 254, in load_manifest
        self.manifest = Manifest.from_topdir(topdir=self.topdir,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\west\manifest.py", line 1207, in from_topdir
        return Manifest(topdir=topdir, config=config,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\west\manifest.py", line 1499, in __init__
        current_data=validate(self._ctx.current_data))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\west\manifest.py", line 541, in validate
        as_dict = _load(data)
                  ^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\west\manifest.py", line 207, in _load
        return yaml.safe_load(data)
               ^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\__init__.py", line 125, in safe_load
        return load(stream, SafeLoader)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\__init__.py", line 81, in load
        return loader.get_single_data()
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\constructor.py", line 49, in get_single_data
        node = self.get_single_node()
               ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\composer.py", line 36, in get_single_node
        document = self.compose_document()
                   ^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\composer.py", line 55, in compose_document
        node = self.compose_node(None, None)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\composer.py", line 84, in compose_node
        node = self.compose_mapping_node(anchor)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\composer.py", line 127, in compose_mapping_node
        while not self.check_event(MappingEndEvent):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\parser.py", line 98, in check_event
        self.current_event = self.state()
                             ^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\site-packages\yaml\parser.py", line 438, in parse_block_mapping_key
        raise ParserError("while parsing a block mapping", self.marks[-1],
    yaml.parser.ParserError: while parsing a block mapping
      in "<unicode string>", line 4, column 1:
        manifest:
        ^
    expected <block end>, but found '<block mapping start>'
      in "<unicode string>", line 11, column 3:
          remotes:
          ^
    

    I did everything according to the instructions, but apart from simple examples, nothing works for me.

    I need to make my way through the dark forest.

    Isn't it true that 100 days is a lot to build an example of display output? And most of them were spent looking for errors in the environment configuration.

    I even conducted an experiment on a clean installation of Ubuntu.

    "Application-example" west build -b nrf52840dk_nrf52840 had a build error.

    I went back to the SDK.

    I wanted two simple things.

    1. There is no duplicate of the original Zephyr files, since they are already on the disk.
    2. Don't publish my applications to Git.

  • Hi,

     

    This line:

    yaml.parser.ParserError: while parsing a block mapping

    Indicates that there might be a space/tab issue in the .yaml file itself. Have you checked if there is a mix of spaces and tabs in the file? Python (and yaml) is quite strict on this.

     

    1. There is no duplicate of the original Zephyr files, since they are already on the disk.
    2. Don't publish my applications to Git.

    Your original .zip is close to this, you just needed to make the changes that I posted to ensure that you do not have any symbol conflicts with the already present symbols in zephyr (ie. rename your "ILI9XXX" symbol and do the same with the corresponding .c file). Then you can add it as an application in vscode and use your already present ncs installation:

     

    Kind regards,

    Håkon

  • Thank you Håkon,  thank you for your time spent with me.
    The problem was with the "version". A space was needed before the word " version".


    Returning to point 2.
    What to write in the url-base?

    Should I remove the mention of applications?

    Not use my manifest file?

    manifest:
      defaults:
        remote: ncs
    
      version: "1.2"
    
      remotes:
        - name: ncs
          url-base: https://github.com/nrfconnect
        - name: zephyrproject
          url-base: https://github.com/zephyrproject-rtos
        - name: zephyrproject-rtos
          url-base: https://github.com/zephyrproject-rtos
        - name: remote1
          url-base: https://github.com/XXXX
        - name: remote2
          url-base: https://github.com/XXXX
    
      projects:
        - name: zephyr
          remote: zephyrproject-rtos
          revision: v3.5.0
          import:
        - name: testlcd
          description: the test LCD example project
          groups:
            - groupLearn
          remote: remote1      # The remote url-base is appended with a / and the project name to form the URL.
          path: applications/testlcd
        - name: testlaborigintft
          groups:
            - groupLearn
          description: the test LCD project from sample (not use ili9488 driver)
          remote: remote2
          path: applications/testlaborigintft
      self:
        path: manifest-store

  • Hi,

     

    Paultino_nordost said:
    Thank you Håkon,  thank you for your time spent with me.

    No need to thank me. Always happy to help out!

    Paultino_nordost said:
    The problem was with the "version". A space was needed before the word " version".

    Thanks for updating with the root-cause. Glad to hear that you found the issue, these syntax issues can be quite hard to identify.

    Paultino_nordost said:

    Returning to point 2.
    What to write in the url-base?

    Should I remove the mention of applications?

    Not use my manifest file?

    Right now, you're building an application that is a T3 type application, where the application is freestanding. This means that you will get a new clone of zephyr/ncs when initializing your application.

    If you want to compile your application with your current ncs-installation (ie. point to a pre-existing NCS installation), then you can add your current application, regardless of which path it is located in, to your vscode as an ncs application, as I previously mentioned:

    Håkon Alseth said:
    Your original .zip is close to this, you just needed to make the changes that I posted to ensure that you do not have any symbol conflicts with the already present symbols in zephyr (ie. rename your "ILI9XXX" symbol and do the same with the corresponding .c file). Then you can add it as an application in vscode and use your already present ncs installation:

     

    To answer your questions directly:

    1. The url-base must be the base of your repository, for instance https://github.com/my_user/my_newly_created_repository 

    This means that you will need to create a github-user and a repository to make this work.

     

    2. This highly depends, but based on your previous answers, you do not want several copies of the whole NCS tree. The easiest is to use a star topology, where you point towards a arbitrary version of zephyr (ie. whichever you have installed via the toolchain manager)

    Paultino_nordost said:
    Not use my manifest file?

    It does sound like you want to point to an existing installation as compared to having a completely standalone application (which clones the whole ncs-tree)

     

    Kind regards,

    Håkon

Related