Date   

回复:[Zephyr-devel] Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

"曹子龙
 

I still cant understand this flow after read the code.
take cortex-m arch for exmaple, z_clock_isr, is hooked for NVIC vector table, so each cores would call this following the frequency.
so,  there must be a z_clock_announce invoked on each cpu, so the current tick would be duplicate caculated? although i know zephyr would nod be exsis such issue, but  i did not figure out
where am i wrong, from the coretex-m arch flow, i cant find where block the z_clock_announce calling from each cpu core?


    .word __pendsv
#if defined(CONFIG_SYS_CLOCK_EXISTS)
    .word z_clock_isr
#else
    .word __reserved
#endif

void z_clock_isr(void *arg)
{
    ARG_UNUSED(arg);
    u32_t dticks;

    cycle_count += last_load;
    dticks = (cycle_count - announced_cycles) / CYC_PER_TICK;
    announced_cycles += dticks * CYC_PER_TICK;

    overflow_cyc = SysTick->CTRL; /* Reset overflow flag */
    overflow_cyc = 0U;

    z_clock_announce(TICKLESS ? dticks : 1);
    z_ExcExit();
}



曹子龙

珠海全志科技股份有限公司      BU1-PSW

地址:广东省珠海市高新区唐家湾镇科技2路9号

TEL:13824125580

Email:caozilong@...

网址: http://www.allwinnertech.com

 


------------------------------------------------------------------
发件人:Andy Ross <andrew.j.ross@...>
发送时间:2019年8月23日(星期五) 23:35
收件人:曹子龙 <caozilong@...>; devel <devel@...>
主 题:Re: [Zephyr-devel] Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

This is the responsibility of the timer driver.  The ticks announced needs to be globally correct.  The existing drivers do this by locking a "last count" state variable and updating it, so they see the updates made by the other cores.


Andy


On 8/23/2019 8:14 AM, "曹子龙 wrote:
Hi  friends:
    
  a puzzle in the timer tick interrupt handler in SMP mode.  look at below,  the SMP mult cores share the same "cur_tick" object to remeber the current time, each cpu would increment it when the tick hander  excutes on each CPU.
so, could this would accelerate the timer compare with the realworld?  for example, if 4cores  exist, the cur_tick would 4 times incmrent than the read world, i cant fingure out where am a wrong, so, could you figure me out?  thanks for your kinldy supply. 

void z_clock_announce(s32_t ticks)
{
#ifdef CONFIG_TIMESLICING
 z_time_slice(ticks);
#endif

 k_spinlock_key_t key = k_spin_lock(&timeout_lock);

 announce_remaining = ticks;

 while (first() != NULL && first()->dticks <= announce_remaining) {
  struct _timeout *t = first();
  int dt = t->dticks;

  curr_tick += dt;
  announce_remaining -= dt;
  t->dticks = 0;
  remove_timeout(t);

  k_spin_unlock(&timeout_lock, key);
  t->fn(t);
  key = k_spin_lock(&timeout_lock);
 }

 if (first() != NULL) {
  first()->dticks -= announce_remaining;
 }

 curr_tick += announce_remaining;
 announce_remaining = 0;

 z_clock_set_timeout(next_timeout(), false);

 k_spin_unlock(&timeout_lock, key);
}




曹子龙

珠海全志科技股份有限公司      BU1-PSW

地址:广东省珠海市高新区唐家湾镇科技2路9号

TEL:13824125580

Email:caozilong@...

网址: http://www.allwinnertech.com

 




What branch should I be using for the 1.14 LTS release?

Manu R
 

when I do a zephyr (v1.14-branch) $ git checkout  v1.14<tab>
v1.14-branch   v1.14.0        v1.14.0-rc1    v1.14.0-rc2    v1.14.0-rc3    v1.14.1-rc1

Thanks
Manu


回复: [Zephyr-devel] Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

"曹子龙
 

could you show me where the logic you said locates? i still cant catches it, thank you

------------------------------------------------------------------
发件人:Andy Ross<andrew.j.ross@...>
日 期:2019年08月23日 23:32:07
收件人:曹子龙<caozilong@...>; devel<devel@...>
主 题:Re: [Zephyr-devel] Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

This is the responsibility of the timer driver.  The ticks announced needs to be globally correct.  The existing drivers do this by locking a "last count" state variable and updating it, so they see the updates made by the other cores.


Andy


On 8/23/2019 8:14 AM, "曹子龙 wrote:
Hi  friends:
    
  a puzzle in the timer tick interrupt handler in SMP mode.  look at below,  the SMP mult cores share the same "cur_tick" object to remeber the current time, each cpu would increment it when the tick hander  excutes on each CPU.
so, could this would accelerate the timer compare with the realworld?  for example, if 4cores  exist, the cur_tick would 4 times incmrent than the read world, i cant fingure out where am a wrong, so, could you figure me out?  thanks for your kinldy supply. 

void z_clock_announce(s32_t ticks)
{
#ifdef CONFIG_TIMESLICING
 z_time_slice(ticks);
#endif

 k_spinlock_key_t key = k_spin_lock(&timeout_lock);

 announce_remaining = ticks;

 while (first() != NULL && first()->dticks <= announce_remaining) {
  struct _timeout *t = first();
  int dt = t->dticks;

  curr_tick += dt;
  announce_remaining -= dt;
  t->dticks = 0;
  remove_timeout(t);

  k_spin_unlock(&timeout_lock, key);
  t->fn(t);
  key = k_spin_lock(&timeout_lock);
 }

 if (first() != NULL) {
  first()->dticks -= announce_remaining;
 }

 curr_tick += announce_remaining;
 announce_remaining = 0;

 z_clock_set_timeout(next_timeout(), false);

 k_spin_unlock(&timeout_lock, key);
}




曹子龙

珠海全志科技股份有限公司      BU1-PSW

地址:广东省珠海市高新区唐家湾镇科技2路9号

TEL:13824125580

Email:caozilong@...

网址: http://www.allwinnertech.com

 




Re: Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

Andy Ross
 

This is the responsibility of the timer driver.  The ticks announced needs to be globally correct.  The existing drivers do this by locking a "last count" state variable and updating it, so they see the updates made by the other cores.


Andy


On 8/23/2019 8:14 AM, "曹子龙 wrote:

Hi  friends:
    
  a puzzle in the timer tick interrupt handler in SMP mode.  look at below,  the SMP mult cores share the same "cur_tick" object to remeber the current time, each cpu would increment it when the tick hander  excutes on each CPU.
so, could this would accelerate the timer compare with the realworld?  for example, if 4cores  exist, the cur_tick would 4 times incmrent than the read world, i cant fingure out where am a wrong, so, could you figure me out?  thanks for your kinldy supply. 

void z_clock_announce(s32_t ticks)
{
#ifdef CONFIG_TIMESLICING
 z_time_slice(ticks);
#endif

 k_spinlock_key_t key = k_spin_lock(&timeout_lock);

 announce_remaining = ticks;

 while (first() != NULL && first()->dticks <= announce_remaining) {
  struct _timeout *t = first();
  int dt = t->dticks;

  curr_tick += dt;
  announce_remaining -= dt;
  t->dticks = 0;
  remove_timeout(t);

  k_spin_unlock(&timeout_lock, key);
  t->fn(t);
  key = k_spin_lock(&timeout_lock);
 }

 if (first() != NULL) {
  first()->dticks -= announce_remaining;
 }

 curr_tick += announce_remaining;
 announce_remaining = 0;

 z_clock_set_timeout(next_timeout(), false);

 k_spin_unlock(&timeout_lock, key);
}




曹子龙

珠海全志科技股份有限公司      BU1-PSW

地址:广东省珠海市高新区唐家湾镇科技2路9号

TEL:13824125580

Email:caozilong@...

网址: http://www.allwinnertech.com

 



Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?

"曹子龙
 

Hi  friends:
    
  a puzzle in the timer tick interrupt handler in SMP mode.  look at below,  the SMP mult cores share the same "cur_tick" object to remeber the current time, each cpu would increment it when the tick hander  excutes on each CPU.
so, could this would accelerate the timer compare with the realworld?  for example, if 4cores  exist, the cur_tick would 4 times incmrent than the read world, i cant fingure out where am a wrong, so, could you figure me out?  thanks for your kinldy supply. 

void z_clock_announce(s32_t ticks)
{
#ifdef CONFIG_TIMESLICING
 z_time_slice(ticks);
#endif

 k_spinlock_key_t key = k_spin_lock(&timeout_lock);

 announce_remaining = ticks;

 while (first() != NULL && first()->dticks <= announce_remaining) {
  struct _timeout *t = first();
  int dt = t->dticks;

  curr_tick += dt;
  announce_remaining -= dt;
  t->dticks = 0;
  remove_timeout(t);

  k_spin_unlock(&timeout_lock, key);
  t->fn(t);
  key = k_spin_lock(&timeout_lock);
 }

 if (first() != NULL) {
  first()->dticks -= announce_remaining;
 }

 curr_tick += announce_remaining;
 announce_remaining = 0;

 z_clock_set_timeout(next_timeout(), false);

 k_spin_unlock(&timeout_lock, key);
}




曹子龙

珠海全志科技股份有限公司      BU1-PSW

地址:广东省珠海市高新区唐家湾镇科技2路9号

TEL:13824125580

Email:caozilong@...

网址: http://www.allwinnertech.com

 



Re: Md5 hash

Carles Cufi
 

Hi there,

 

Mbedtls comes with an MD5 implementation:

https://github.com/zephyrproject-rtos/mbedtls/blob/master/include/mbedtls/md5.h

 

Carles

 

From: <devel@...> on behalf of "Ruben Kertesz via Lists.Zephyrproject.Org" <rubenk=gmail.com@...>
Reply-To: "rubenk@..." <rubenk@...>
Date: Thursday, 22 August 2019 at 19:59
To: "devel@..." <devel@...>
Cc: "devel@..." <devel@...>
Subject: [Zephyr-devel] Md5 hash

 

Any recommendations on best methods to write a md5 hash function?

I didn't find one built in but maybe I overlooked.


Md5 hash

rubenk@...
 

Any recommendations on best methods to write a md5 hash function?
I didn't find one built in but maybe I overlooked.


Cancelled Event: Zephyr Project: Dev Meeting - Thursday, 22 August 2019 #cal-cancelled

devel@lists.zephyrproject.org Calendar <devel@...>
 

Cancelled: Zephyr Project: Dev Meeting

This event has been cancelled.

When:
Thursday, 22 August 2019
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/j/993312203

Organizer:
devel@...

Description:
Join Zoom Meeting
https://zoom.us/j/993312203

One tap mobile
+16699006833,,993312203# US (San Jose)
+16465588656,,993312203# US (New York)

Dial by your location
        +1 669 900 6833 US (San Jose)
        +1 646 558 8656 US (New York)
        +1 877 369 0926 US Toll-free
        +1 855 880 1246 US Toll-free
Meeting ID: 993 312 203
Find your local number: https://zoom.us/u/ankEMRagf


Upcoming Event: Zephyr Project: APIs - Tue, 08/20/2019 9:00am-10:00am, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: APIs

When: Tuesday, 20 August 2019, 9:00am to 10:00am, (GMT-07:00) America/Los Angeles

Where:https://zoom.us/j/177647878

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description: Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/177647878

Or iPhone one-tap :
    US: +16465588656,,177647878# or +16699006833,,177647878# 
Or Telephone:
    Dial(for higher quality, dial a number based on your current location): 
        US: +1 646 558 8656 or +1 669 900 6833 or +1 855 880 1246 (Toll Free) or +1 877 369 0926 (Toll Free)
    Meeting ID: 177 647 878
    International numbers available: https://zoom.us/zoomconference?m=ioAR9GK1OE5LkN1ojt-heTCl7yPcJrhY


 Live meeting minutes: https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit?usp=sharing


API meeting 2019-08-20: Agenda

Peter A. Bigot
 

I'll be coordinating the API meeting today as Carles has a conflict.

Agenda:
- GPIO: Current status, planning for a way forward (scope, breakdown, resources) so we know what we're intending to have in 2.1

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Peter


Re: BUS FAULT happened, when try the ADC on nrf52832 board with adc_read_async() #adc #nrf52832

hotkernel@...
 

I have found the root cause: need init the k_poll_signal before it was used in the k_poll_event array.
k_poll_signal_init(&async_sig);
struct k_poll_event async_evt = K_POLL_EVENT_INITIALIZER(K_POLL_TYPE_SIGNAL, K_POLL_MODE_NOTIFY_ONLY, &async_sig);

I ported these demo code from the surce file test_adc.c from the zephyr master branch, so there is a bug in that test file.


Re: shipable ...

Marc Herbert
 

On 31 Jul 2019, at 18:16, Kumar Gala <kumar.gala@...> wrote:

On Jul 30, 2019, at 10:36 PM, Nicolas Pitre <npitre@...> wrote:

... or the reason why I wish I could smash my keyboard with a 12-foot H-beam.

Accessibility wise, this shipable web interface thingy is a complete
abomination. Every of my attempts to get to test failure logs ended up
in a failure of its own. And recursive failure is not good.

Is there a way to bypass the web UI?

I found http://docs.shippable.com/ci/email-notifications/ which looked
promising. But that affects the entire project for everybody. All I want
is access to failure reports for my own commits without the dreaded web
UI.

Any help would be greatly appreciated!
No sure, but probably can ask on https://github.com/Shippable/support

Shippable's "rich" UI affects not just accessibility but also
any user trying to perform simple things like searching for some
specific error message across all 5 shards or (let's go crazy) across
different runs. Don't even think about gathering data about sporadic
failures like for instance the ones described in
https://github.com/zephyrproject-rtos/zephyr/issues/12553

One important CI principle is "automate everything" but
Shippable web UI is not meant for that. Maybe there's a another,
lower level way to access CI logs and results?


Re: west: multiple local west project installations

Bolivar, Marti
 

"David Leach via Lists.Zephyrproject.Org"
<david.leach=nxp.com@...> writes:

For historical tracking, the error is because I have ZEPHYR_BASE
environment variable set. Carles and I agree that the error message is
not very helpful.
FTR, I rarely have ZEPHYR_BASE set in my parent environment because I
only need it to run sanitycheck, which I usually do in a new terminal
window since it takes forever. All the usual west-based workflows
(build, flash, debug, etc.) work just fine without ZEPHYR_BASE set as
long as you are running them from a directory in the installation.

Since I don't keep my applications in ~, but rather in ~/zephyrproject,
this works for me and I never run into this problem.

I have a hopefully more helpful error message for people who do run into
this proposed here:

https://github.com/zephyrproject-rtos/west/pull/290

This PR adds the following to the error message:

Note:
In your environment, ZEPHYR_BASE is set to:
<whatever>
This forces west to search for an installation there.
Try unsetting ZEPHYR_BASE and re-running this command.

If you have some suggestions, please feel free to comment there.

Sorry for the trouble.

Thanks,
Marti


Re: west: multiple local west project installations

David Leach
 

For historical tracking, the error is because I have ZEPHYR_BASE environment variable set. Carles and I agree that the error message is not very helpful.

 

David

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 10:27 AM
To: Cufi, Carles <Carles.Cufi@...>; steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Carles,

 

See the following:

 

dleach@dleach-test:~/work$ west init zephyrproject2

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 10:23 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

That is actually incorrect, you can have as many installations as you want. In your case:

 

cd ~/work

west init zephyrproject

west init mytestzephyrproject

cd zephyrproject

west update

cd ../mytestzephyrproject

west update

 

and then do whatever you want in each of the installations, and choose one by either going into one:

 

vim west.yml

<edit>

west update // will only affect mytestzephyrproject

and so on.

 

I am not sure what makes you think that you cannot have multiple west/zephyr installations in your system, I have several myself without any problems at all.

Note that the zephyr.base-prefer setting will affect how ZEPHYR_BASE is determined though: https://docs.zephyrproject.org/latest/guides/west/config.html

 

Carles

 

 

From: David Leach <david.leach@...>
Sent: 16 August 2019 17:12
To: Cufi, Carles <Carles.Cufi@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I want to be able to have multiple installations on my system. To expand out my example:

 

  • /home/dleach/work/zephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west
  • /home/dleach/work/mytestzephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west

 

I understand that I can’t instantiate a separate project directory tree from within a west created project area but I think I should be able to create multiple project directory trees. But the indication is that using west commits your whole machine to a single project.

 

David

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 9:08 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I am not quite sure I understand David.

 

“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.

Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:

 

west config manifest.path zephyr (&& west update)

west config manifest.path myrepo (&& west update)

 

to switch between manifest repos while remaining in a single installation.

 

Carles

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: 16 August 2019 15:58
To: steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


Re: west: multiple local west project installations

David Leach
 

Carles,

 

See the following:

 

dleach@dleach-test:~/work$ west init zephyrproject2

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 10:23 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

That is actually incorrect, you can have as many installations as you want. In your case:

 

cd ~/work

west init zephyrproject

west init mytestzephyrproject

cd zephyrproject

west update

cd ../mytestzephyrproject

west update

 

and then do whatever you want in each of the installations, and choose one by either going into one:

 

vim west.yml

<edit>

west update // will only affect mytestzephyrproject

and so on.

 

I am not sure what makes you think that you cannot have multiple west/zephyr installations in your system, I have several myself without any problems at all.

Note that the zephyr.base-prefer setting will affect how ZEPHYR_BASE is determined though: https://docs.zephyrproject.org/latest/guides/west/config.html

 

Carles

 

 

From: David Leach <david.leach@...>
Sent: 16 August 2019 17:12
To: Cufi, Carles <Carles.Cufi@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I want to be able to have multiple installations on my system. To expand out my example:

 

  • /home/dleach/work/zephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west
  • /home/dleach/work/mytestzephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west

 

I understand that I can’t instantiate a separate project directory tree from within a west created project area but I think I should be able to create multiple project directory trees. But the indication is that using west commits your whole machine to a single project.

 

David

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 9:08 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I am not quite sure I understand David.

 

“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.

Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:

 

west config manifest.path zephyr (&& west update)

west config manifest.path myrepo (&& west update)

 

to switch between manifest repos while remaining in a single installation.

 

Carles

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: 16 August 2019 15:58
To: steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


Re: west: multiple local west project installations

Carles Cufi
 

That is actually incorrect, you can have as many installations as you want. In your case:

 

cd ~/work

west init zephyrproject

west init mytestzephyrproject

cd zephyrproject

west update

cd ../mytestzephyrproject

west update

 

and then do whatever you want in each of the installations, and choose one by either going into one:

 

vim west.yml

<edit>

west update // will only affect mytestzephyrproject

and so on.

 

I am not sure what makes you think that you cannot have multiple west/zephyr installations in your system, I have several myself without any problems at all.

Note that the zephyr.base-prefer setting will affect how ZEPHYR_BASE is determined though: https://docs.zephyrproject.org/latest/guides/west/config.html

 

Carles

 

 

From: David Leach <david.leach@...>
Sent: 16 August 2019 17:12
To: Cufi, Carles <Carles.Cufi@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I want to be able to have multiple installations on my system. To expand out my example:

 

  • /home/dleach/work/zephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west
  • /home/dleach/work/mytestzephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west

 

I understand that I can’t instantiate a separate project directory tree from within a west created project area but I think I should be able to create multiple project directory trees. But the indication is that using west commits your whole machine to a single project.

 

David

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 9:08 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I am not quite sure I understand David.

 

“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.

Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:

 

west config manifest.path zephyr (&& west update)

west config manifest.path myrepo (&& west update)

 

to switch between manifest repos while remaining in a single installation.

 

Carles

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: 16 August 2019 15:58
To: steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


Re: west: multiple local west project installations

David Leach
 

I want to be able to have multiple installations on my system. To expand out my example:

 

  • /home/dleach/work/zephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west
  • /home/dleach/work/mytestzephyrproject
    • modules
    • zephyr
    • net-tools
    • tools
    • .west

 

I understand that I can’t instantiate a separate project directory tree from within a west created project area but I think I should be able to create multiple project directory trees. But the indication is that using west commits your whole machine to a single project.

 

David

 

From: Cufi, Carles <Carles.Cufi@...>
Sent: Friday, August 16, 2019 9:08 AM
To: David Leach <david.leach@...>; steven.l.wang@...; devel@...
Subject: RE: [Zephyr-devel] west: multiple local west project installations

 

I am not quite sure I understand David.

 

“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.

Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:

 

west config manifest.path zephyr (&& west update)

west config manifest.path myrepo (&& west update)

 

to switch between manifest repos while remaining in a single installation.

 

Carles

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: 16 August 2019 15:58
To: steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


Re: west: multiple local west project installations

Carles Cufi
 

I am not quite sure I understand David.

 

“west init” initializes an installation. It creates a top-level folder which then contains a .west/ subfolder and a bunch of other folders that correspond to the manifest repo and west projects.

Once you are inside that installation you cannot really refer to another installation, but you *can* switch the path to the manifest repository by using your ~/.westconfig or the “west config” command. Say you have a zephyrproject/ top-level installation folder and there’s a zephyr/ folder inside it, at the same level as the .west/ folder. Say also that you have a myrepo/ folder at the same folder level that contains a myrepo/west.yml with your own manifest. Then you can do:

 

west config manifest.path zephyr (&& west update)

west config manifest.path myrepo (&& west update)

 

to switch between manifest repos while remaining in a single installation.

 

Carles

 

From: devel@... <devel@...> On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: 16 August 2019 15:58
To: steven.l.wang@...; devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


Re: west: multiple local west project installations

David Leach
 

Yeah, I'm trying to do some work to add a module when requires 1) adding the module, 2) updating west.yaml, and 3) making changes to the zephyr CMakeLists.txt tree to build the module. But I didn't want to muck with my current project area so hoped that I could just create a new project area.

Unfortunate that it is global if that is true.

David

-----Original Message-----
From: Paul Sokolovsky <paul.sokolovsky@...>
Sent: Friday, August 16, 2019 2:36 AM
To: David Leach <david.leach@...>
Cc: zephyr-devel <zephyr-devel@...>
Subject: Re: [Zephyr-devel] west: multiple local west project installations

Hello David,

On Fri, 16 Aug 2019 04:11:32 +0000
"David Leach" <david.leach@...> wrote:

Can I use west to initialize multiple working directories?

I'm experimenting with adding a module and I wanted to a setup so I
created a 'zephyrproject_2' directory and ran a 'west init' command
with some additional parameters to use the west.yaml of my url/branch
but it returns an error which leads me to think a system can only have
one installation:

FATAL ERROR: already in an installation
(/home/dleach/work/zephyrproject), aborting
My understanding is that *west* installation (i.e. the tool itself) is indeed single/global (though you probably can work that around using Python virtualenv's). But west can definitely manage multiple local "workspaces". I figure the requirement for those is that they don't overlap (which includes containment).

For example, I historically had Zephyr checkout under ~/projects-3rdparty/Embedded/Zephyr/ , and when west became unavoidable, I converted that path to a west "workspace".

Recently, I wanted to create another workspace, and tried to do that under the same ~/projects-3rdparty/Embedded/Zephyr/, but it failed with a message similar to the above. So, I went to create another workspace under ~/projects-3rdparty/Embedded/zephyr-googleiot/ , which worked.



David Leach

NXP Semiconductors
phone: +1.210.241.6761
Email: david.leach@...<mailto:david.leach@...>

[cid:image002.png@...]

** PROPRIETARY & COMPANY-CONFIDENTIAL **





--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.facebook.com%2Fpages%2FLinaro&;data=02%7C01%7Cdavid.leach%40nxp.com%7Ce9d2c87148654f168c7908d7221c5493%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637015377391350705&amp;sdata=8HqSPZCEGE8sXzLzJ3J6R3%2BUfBLCrt6EQ3PMZuCBILw%3D&amp;reserved=0
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftwitter.com%2F%23!%2Flinaroorg&amp;data=02%7C01%7Cdavid.leach%40nxp.com%7Ce9d2c87148654f168c7908d7221c5493%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637015377391350705&amp;sdata=1hfXId%2Ffe70iNsIyCJ2xAUKNephzxux%2BiN52rSDe8mQ%3D&amp;reserved=0 - https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linaro.org%2Flinaro-blog&;data=02%7C01%7Cdavid.leach%40nxp.com%7Ce9d2c87148654f168c7908d7221c5493%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637015377391350705&amp;sdata=sFpqi%2BGwnrcW9ya8h3VZf9lXI4NnTYu0BqwOyOkWILI%3D&amp;reserved=0


Re: west: multiple local west project installations

David Leach
 

no. I want to initialize a second Zephyr project area in parallel. So for example:

 

/home/dleach/work/zephyrproject

/home/dleach/work/zephyrproject2

 

David

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Friday, August 16, 2019 12:52 AM
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] west: multiple local west project installations

 

Hi David:

I'm not sure if I understand your question correctly.

Do you mean that you  created "zephyrproject_2" under "/home/dleach/work/zephyrproject" and run "west init"? If so, I don't think you should create "zephyrproject_2" like this. You should create it in another directory, rather than "/home/dleach/work/zephyrproject".

-Steven

On 8/16/2019 12:11 PM, David Leach wrote:

Can I use west to initialize multiple working directories?

 

I’m experimenting with adding a module and I wanted to a setup so I created a ‘zephyrproject_2’ directory and ran a ‘west init’ command with some additional parameters to use the west.yaml of my url/branch but it returns an error which leads me to think a system can only have one installation:

 

FATAL ERROR: already in an installation (/home/dleach/work/zephyrproject), aborting

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 

2601 - 2620 of 8790