• SupportZephyr 101
  • Please explain about workspaces for a dummies and non-native English speaker.

The documentation says
(first steps)
Get the Zephyr source code:
cd %HOMEPATH%
west init zephyrproject
cd zephyrproject
west update

I understand this as setting west workspace is referred to as a Zephyr repository application
which is as indicated: Application type: repository (T1: star topology)
and creates a folder structure
zephyrproject/
├─── .west/
│ └─── config
└─── zephyr/
├── west.yml

But in which folder to place my projects in this structure?

If you create a folder for your projects in zephyrproject folder.
There will be a case like this.
An application located within the zephyr source code repository in a Zephyr west workspace is referred to as a Zephyr repository application.

Zephyr workspace application (T2: star topology, a Zephyr application is the manifest repository)

zephyrproject/
├─── .west/
│ └─── config
├─── zephyr/
└─── applications/
└── app/
└── west.yml

In which folder should I run the west init command in this case?
In this case there will be all the code that west init brought when installing? (first steps)
Will there be duplication?
Does this mean that the first steps are redundant?

But comparing the first steps and the description of the west init command it will appear that a T2 - zephyr workspace application is created.
Which does not correspond to what was written earlier:
T1: Star topology, zephyr is the manifest repository
This is the default.

Zephyr freestanding application
<home>/
├─── zephyrproject/
│ ├─── .west/
│ │ └─── config
│ ├── zephyr/

└─── app/

but the other page has a slightly different structure
_(T3: Forest topology)

A workspace using this topology looks like this:_

west-workspace/
├── app1/ # .git/ project
├── app2/ # .git/ project
├── manifest-repo/ # .git/ never modified by west
│ └── west.yml # main manifest with optional import(s) and override(s)

└── zephyr/ # .git/ project
└── west.yml

In this case in which folder to run the west init command?
(in the installation instructions it was run in <zephyrproject> folder)
(with this folder organization and copying examples to app1, app2 the examples compile without errors.
But when using example-application structure in app1, compilation leads to unexpected errors.)

What value should then be in ZEPHYR_BASE?
What does manifest-repo mean here?
What should manifest look like if I don’t have access to github?

All examples contain github. Does anything work without it?
Is it possible to work with Zephyr without access to github?

Does the manifest have to be in every app folder?

(https://docs.zephyrproject.org/latest/develop/manifest/index.html)
In which folder do I need to run “west config manifest.project-filter – -hal_FOO”?

Thank you so much for your videos.

After a simple experiment began to feel even worse.

  1. Installing zephyr according to the documentation.
    https://docs.zephyrproject.org/latest/develop/getting_started/index.html

(windows)

  1. Get the Zephyr source code:
    cd %HOMEPATH%
    west init zephyrproject
    cd zephyrproject
    west update

(macos)

  1. get the Zephyr source code:
    west init ~/zephyrproject
    cd ~/zephyrproject
    west update

The result is T1 topology.
(https://docs.zephyrproject.org/latest/develop/west/workspaces.html)

<HOME>/zephyrproject/zephyr - completely, all source code.

Let’s check the installation.

This is where I deviated a bit from the documentation.

  1. Copy samples/basic/blinky to the folder where projects. (let’s say <ROOT-DRIVE>/TestZephyr.
  2. /ROOT-DRIVE>/TestZephyr/blinky/west build -b <board-name>

Successful. Does this tell us that Zephyr is configured? I assume so.

Page
https://docs.zephyrproject.org/latest/develop/application/index.html

says there is an example of a reference application.

Using a Reference Workspace Application
The example-application Git repository contains a reference workspace application. It is recommended to use it as a reference when creating your own application as described in the following sections.

Have you tried building this app?
After the first stages.

The first step is to initialize the workspace folder (my-workspace) where the example-application and all Zephyr modules will be cloned. Run the following command:

initialize my-workspace for the example-application (main branch)

west init -m https://github.com/zephyrproject-rtos/example-application –mr main my-workspace

update Zephyr modules

cd my-workspace
west update

I failed.
west init -m https://github.com/zephyrproject-rtos/example-application –mr main my-workspace
FATAL ERROR: already initialized in C:\Users\Admin\zephyrproject, aborting.
Hint: if you do not want a workspace there,
remove this directory and re-run this command

What?
It’s in the same documentation? No contradiction?

Delete the ZEPHYR_BASE variable.

west init -m https://github.com/zephyrproject-rtos/example-application –mr main my-workspace
cd my-workspace
west update

Why do I need another copy of Zephyr if it is already “getting_started”.
Am I right in thinking that in English “getting_started” is the beginning?

There are TWO copies of Zephyr on the computer.

Create the variable ZEPHYR_BASE=my-workspace.

west build -b nrf52840dk_nrf52840 app
Yeah, dreams, dreams.

CMake Error at C:/TestWest/my-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include):
include could not find requested file:
zephyr_default

Please show me the beam of light.
I’m not asking for much.
I am satisfied with the folder structure where “blinky” is built.
But it doesn’t build examples with driver-out-tree.

Sorry, if you write that long tickets/comments, it’s very hard to read and understand them. At least I don’t get the question.

I came to the conclusion that if git is not available, Zephyr can be forgotten.

For sure. Is there a specific reason, why you can’t use git?

I don’t know how to solve this problem without using “remotes:”.

west mainly manages a couple of different projects in different git repos. Among them zephyr and ncs. Not sure, how you want to deal with that without “remotes”. At least initially you need remotes. Once git fetched all source (in the configured versions), you may try to do an offline build. But that may fail then because too many tools also require to have network access. Some only once per day. So “west init” and one “west build” per day with network, and additional builds on that day without network may work, but you need to check that.

Terms and Conditions | Privacy Policy