question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting `zephyr.base` variable breaks parallel builds

See original GitHub issue

I’m attempting to run multiple west build commands in parallel (to save some time used by cmake). This breaks randomly with corrupted .west/config file. I tracked this down to this line:

https://github.com/zephyrproject-rtos/west/blob/618020d1979d07003d6df40ce59b413785ce3015/src/west/app/main.py#L692

Here multiple processes may attempt to write to the same file at the same time in my scenario. It would be good to get rid of this. Right now one have to run a zephyr-provided command with valid arguments before doing the build. west boards seems to work.

Note that I have ZEPHYR_BASE environment variable set during the build, but that does not prevent west from mangling the config file.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tejlmandcommented, Jun 23, 2020

@tejlmand mainly because west seems to be an official way to build zephyr apps.

Thanks for the reason. It is correct that Zephyr docs are describing the build process using west and it is an easy way to get started with Zephyr.

But actually west is an optional (but very convenient tool), so there is no problem in using cmake directly, especially if it solves your problems.

That being said, west should still be fixed so that this issue can be fixed. (we would like to remove zephyr.base from Cmake, but currently we need west to be backward compatible.)

0reactions
tejlmandcommented, Mar 7, 2022

@mbolivar-nordic with Zephyr 2.7.0 LTS out, it now the time to remove this in west ? Users on older Zephyr (for example 1.14 LTS ) can manually set zephyr.base if they need it.

I believe we don’t need to set this value automatically anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building, Flashing and Debugging
Zephyr provides several west extension commands for building, flashing, and interacting with Zephyr programs running on a board: build , flash , ...
Read more >
Setting Kconfig configuration values — Zephyr Project ...
Setting Kconfig configuration values¶. The menuconfig and guiconfig interfaces can be used to test out configurations during application development.
Read more >
Blinking an LED with the Zephyr RTOS
Setting up your development environment (installing prerequisite programs, obtaining Python scripts, setting environment variables, etc) ...
Read more >
Getting started — Zephyr-based Embedded controller ...
1) Set zephyr environment variables¶ ... Run the following command to indicate to Zephyr SDK tool active Zephyr path. ... Multiple zephyr trees...
Read more >
Zephyr Project Documentation - Read the Docs
The Zephyr OS is based on a small-footprint kernel designed for use on ... run the provided script to set up zephyr project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found