Date   

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@linaro.org>
Sent: Friday, August 16, 2019 2:36 AM
To: David Leach <david.leach@nxp.com>
Cc: zephyr-devel <zephyr-devel@lists.zephyrproject.org>
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@nxp.com> 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@nxp.com<mailto:david.leach@nxp.com>

[cid:image002.png@01D1496D.4A813660]

** 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 **

 


Re: STM32WB55 BLE address

Marcio Montenegro
 

Hello Erwan,

My code didn't work:
( hard coded ble address not the final version )
I checked STM32 ble app and on p2rsrv app  they send ACI_HAL_WRITE_CONFIG_DATA  just after hci reset.
Best regards,
Marcio


Bluetooth init failed (err -5)
[00:00:00.163,000] <err> hci_ipm: Err send sync
[00:00:00.163,000] <err> bt_hci_core: HCI driver open failed (-5)


struct aci_set_ble_addr {
u8_t cmd;
u8_t config_offset;
u8_t length;
u8_t value[6];
};

#define ACI_WRITE_SET_TX_POWER_LEVEL       BT_OP(BT_OGF_VS, 0xFC0F)
#define ACI_HAL_WRITE_CONFIG_DATA   BT_OP(BT_OGF_VS, 0xFC0C)
#define CONFIG_DATA_PUBADDR_OFFSET 0

static int wr_bd_addr (void)
{
struct aci_set_ble_addr *param;
struct net_buf *buf, *rsp;
int err;

buf = bt_hci_cmd_create(ACI_HAL_WRITE_CONFIG_DATA, sizeof(*param));
if (!buf) {
BT_ERR("Err buf");
return -ENOBUFS;
}
param = net_buf_add(buf, sizeof(*param));
param->cmd = 0x0C;
param->config_offset = CONFIG_DATA_PUBADDR_OFFSET;
param->length = 6;
param->value[0] = 0x57;
param->value[1] = 0x67;
param->value[2] = 0x00;
param->value[3] = 0x26;
param->value[4] = 0xe1;
param->value[5] = 0x80;

err = bt_hci_cmd_send_sync(ACI_HAL_WRITE_CONFIG_DATA, buf, &rsp);

if (err) {
BT_ERR("Err send sync");
return err;
}
net_buf_unref(rsp);
return 0;
}
static int bt_ipm_ble_init(void)
{
struct aci_set_tx_power *param;
struct net_buf *buf, *rsp;
int err;

/* Send HCI_RESET */
err = bt_hci_cmd_send_sync(BT_HCI_OP_RESET, NULL, &rsp);
if (err) {
return err;
}
/* TDB: Something to do on reset complete? */
net_buf_unref(rsp);

    err = wr_bd_addr();
if (err) {
return err;
}

/* Send ACI_WRITE_SET_TX_POWER_LEVEL */
buf = bt_hci_cmd_create(ACI_WRITE_SET_TX_POWER_LEVEL, 3);
if (!buf) {
return -ENOBUFS;
}
param = net_buf_add(buf, sizeof(*param));
param->cmd = 0x0F;
param->value[0] = 0x18;
param->value[1] = 0x01;

err = bt_hci_cmd_send_sync(ACI_WRITE_SET_TX_POWER_LEVEL, buf, &rsp);
if (err) {
return err;
}
net_buf_unref(rsp);

return 0;
}


STM32 BLE application code:
static void Ble_Hci_Gap_Gatt_Init(void){

  uint8_t role;
  uint8_t index;
  uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle;
  const uint8_t *bd_addr;
  uint32_t srd_bd_addr[2];
  uint16_t appearance[1] = { BLE_CFG_GAP_APPEARANCE };

  /**
   * Initialize HCI layer
   */
  /*HCI Reset to synchronise BLE Stack*/
  hci_reset();

  /**
   * Write the BD Address
   */

  bd_addr = BleGetBdAddress();
  aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET,
                            CONFIG_DATA_PUBADDR_LEN,
                            (uint8_t*) bd_addr);

  /* BLE MAC in ADV Packet */
  manuf_data[ sizeof(manuf_data)-6] = bd_addr[5];
  manuf_data[ sizeof(manuf_data)-5] = bd_addr[4];
  manuf_data[ sizeof(manuf_data)-4] = bd_addr[3];
  manuf_data[ sizeof(manuf_data)-3] = bd_addr[2];
  manuf_data[ sizeof(manuf_data)-2] = bd_addr[1];
  manuf_data[ sizeof(manuf_data)-1] = bd_addr[0];
 
  /**
   * Static random Address
   * The two upper bits shall be set to 1
   * The lowest 32bits is read from the UDN to differentiate between devices
   * The RNG may be used to provide a random number on each power on
   */
  srd_bd_addr[1] =  0x0000ED6E;
  srd_bd_addr[0] =  LL_FLASH_GetUDN( );
  aci_hal_write_config_data( CONFIG_DATA_RANDOM_ADDRESS_OFFSET, CONFIG_DATA_RANDOM_ADDRESS_LEN, (uint8_t*)srd_bd_addr );

  /**
   * Write Identity root key used to derive LTK and CSRK
   */
    aci_hal_write_config_data( CONFIG_DATA_IR_OFFSET, CONFIG_DATA_IR_LEN, (uint8_t*)BLE_CFG_IR_VALUE );
   
   /**
   * Write Encryption root key used to derive LTK and CSRK
   */
    aci_hal_write_config_data( CONFIG_DATA_ER_OFFSET, CONFIG_DATA_ER_LEN, (uint8_t*)BLE_CFG_ER_VALUE );

  /**
   * Set TX Power to 0dBm.
   */
  aci_hal_set_tx_power_level(1, CFG_TX_POWER);

  /**
   * Initialize GATT interface
   */
  aci_gatt_init();


On Tue, Aug 13, 2019 at 9:17 AM Marcio Montenegro via Lists.Zephyrproject.Org <mtuxpe=gmail.com@...> wrote:
Awesome, thanks!


On Tue, Aug 13, 2019 at 9:13 AM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Marcio,

Setting of public address based on flash registers should be done as part of controller init in hci driver.
In function bt_ipm_ble_init in drivers/bluetooth/hci/ipm_stm32wb.c

It should be done by sending a custom command to the controller (ACI_HAL_WRITE_CONFIG_DATA), which will provide the address that you can get by the piece of code you mentionned.
This proprietary command is described in following application note:

Hope it helps
Erwan



On Thu, 8 Aug 2019 at 20:29, Marcio Montenegro <mtuxpe@...> wrote:
Hello Rob,
I got the error below:
undefined reference to `bt_ctlr_set_public_addr'

Yes I included <bluetooth/controller.h>
I don't know if any config is missing and how public BLE address is assigned for this board.

My prj.conf:

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="P2PSRV1"
CONFIG_BT_GATT_BAS=y
CONFIG_BT_DEBUG=y

Anyway I can connect to nrf connect and ST BLE sensor android app.
The battery service is working.
Now I am finishing a custom service.
Best regards,
Marcio



On Wed, Aug 7, 2019 at 2:21 PM Marcio Montenegro via Lists.Zephyrproject.Org <mtuxpe=gmail.com@...> wrote:
Thanks, I'll check it out. 

On Wed, Aug 7, 2019, 13:57 Rob Weber <rob@...> wrote:
Hello,

On Tue, Aug 06, 2019 at 11:26:59AM -0300, Marcio Montenegro wrote:
> I am evaluating STM32WB55  board HCI driver.
> During my test I found that BLE  public address is  02:80:e1:00:00:00
> But this microcontroller has an internal flash register to store BLE
> address and device id.
> I would like to know the best way to change the address BLE in this case.
> Best regards,
> Marcio
>
> BLE Stack initialization:
>
> [00:00:00.015,000] <dbg> bt_settings.bt_settings_init:
> Bluetooth initialized
> Configuration mode: waiting connections...
> [00:00:00.187,000] <inf> bt_hci_core: Identity: 02:80:e1:00:00:00 (public)
> [00:00:00.187,000] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision
> 0x0026, manufacturer 0x0030
> [00:00:00.187,000] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x2126
>
> Get correct BLE address:
>
> udn = LL_FLASH_GetUDN();
> if(udn != 0xFFFFFFFF)
> {
>     company_id = LL_FLASH_GetSTCompanyID();
>     device_id = LL_FLASH_GetDeviceID();
>
>     bd_addr_udn[0] = (uint8_t)(udn & 0x000000FF);
>     bd_addr_udn[1] = (uint8_t)( (udn & 0x0000FF00) >> 8 );
>     bd_addr_udn[2] = (uint8_t)( (udn & 0x00FF0000) >> 16 );
>     bd_addr_udn[3] = (uint8_t)device_id;
>     bd_addr_udn[4] = (uint8_t)(company_id & 0x000000FF);;
>     bd_addr_udn[5] = (uint8_t)( (company_id & 0x0000FF00) >> 8 );
>     bd_addr = (const uint8_t *)bd_addr_udn;
>
> }

I have not yet worked with any of the bluetooth APIs, but this thread
peaked my interest because I am also evaluating the STM32WB55 for an
upcoming project.

I did a quick search through the bluetooth API and found the function
bt_ctlr_set_public_addr [1]. I started digging into its implementation,
but I was not able to figure out how this function relates to the rest
of the bluetooth system, or how it relates to the STM32WB55 LL/HAL.

I would recommend trying this function to see if it meets your needs.
Please let me know if it works! I'm definitely curious to know how this
might work with the STM32WB55.

Cheers,
Rob Weber

[1] https://docs.zephyrproject.org/latest/reference/bluetooth/controller.html#_CPPv323bt_ctlr_set_public_addrPK4u8_t


Re: west: multiple local west project installations

Paul Sokolovsky
 

Hello David,

On Fri, 16 Aug 2019 04:11:32 +0000
"David Leach" <david.leach@nxp.com> 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@nxp.com<mailto:david.leach@nxp.com>

[cid:image002.png@01D1496D.4A813660]

** PROPRIETARY & COMPANY-CONFIDENTIAL **





--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: west: multiple local west project installations

Wang, Steven L <steven.l.wang@...>
 

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

Jan Van Winkel
 

Hi David,

I use west for 3 different projects without any problems but I have to admit that I always created the new projects from a fresh shell, so maybe some environment variables are stuck.

Regards,
Jan

On Fri, Aug 16, 2019 at 6:11 AM 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

 

David Leach

 

NXP Semiconductors

phone: +1.210.241.6761

Email: david.leach@...

 

 

** PROPRIETARY & COMPANY-CONFIDENTIAL **

 


west: multiple local west project installations

David Leach
 

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 **

 


Zephyr SDK 0.10.3

Kumar Gala
 

Hi,

Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.10.3

Please download and try things out and report any issues.

Changes since the last release:

• Fixes a Linker issue found on RISC-V.

- k


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

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

Cancelled: Zephyr Project: Dev Meeting

This event has been cancelled.

When:
Thursday, 15 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


About the Behavior of "z_clock_announce" in SMP, Is it dupulicate caculated?

"曹子龙
 

Hi  folks:

    
  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

 




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

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

Reminder: Zephyr Project: APIs

When: Tuesday, 13 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: agenda

Carles Cufi
 

Hi all,

This week we will look at:

Agenda:

- Sensor API: Update on progress
rtio PR: https://github.com/zephyrproject-rtos/zephyr/pull/17434

- GPIO: Update on implementation and way forward

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

Regards,

Carles


About the Behavior of "z_clock_announce" in SMP?

"曹子龙
 

Hi  folks:
    
  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: STM32WB55 BLE address

Marcio Montenegro
 

Awesome, thanks!


On Tue, Aug 13, 2019 at 9:13 AM Erwan Gouriou <erwan.gouriou@...> wrote:
Hi Marcio,

Setting of public address based on flash registers should be done as part of controller init in hci driver.
In function bt_ipm_ble_init in drivers/bluetooth/hci/ipm_stm32wb.c

It should be done by sending a custom command to the controller (ACI_HAL_WRITE_CONFIG_DATA), which will provide the address that you can get by the piece of code you mentionned.
This proprietary command is described in following application note:

Hope it helps
Erwan



On Thu, 8 Aug 2019 at 20:29, Marcio Montenegro <mtuxpe@...> wrote:
Hello Rob,
I got the error below:
undefined reference to `bt_ctlr_set_public_addr'

Yes I included <bluetooth/controller.h>
I don't know if any config is missing and how public BLE address is assigned for this board.

My prj.conf:

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="P2PSRV1"
CONFIG_BT_GATT_BAS=y
CONFIG_BT_DEBUG=y

Anyway I can connect to nrf connect and ST BLE sensor android app.
The battery service is working.
Now I am finishing a custom service.
Best regards,
Marcio



On Wed, Aug 7, 2019 at 2:21 PM Marcio Montenegro via Lists.Zephyrproject.Org <mtuxpe=gmail.com@...> wrote:
Thanks, I'll check it out. 

On Wed, Aug 7, 2019, 13:57 Rob Weber <rob@...> wrote:
Hello,

On Tue, Aug 06, 2019 at 11:26:59AM -0300, Marcio Montenegro wrote:
> I am evaluating STM32WB55  board HCI driver.
> During my test I found that BLE  public address is  02:80:e1:00:00:00
> But this microcontroller has an internal flash register to store BLE
> address and device id.
> I would like to know the best way to change the address BLE in this case.
> Best regards,
> Marcio
>
> BLE Stack initialization:
>
> [00:00:00.015,000] <dbg> bt_settings.bt_settings_init:
> Bluetooth initialized
> Configuration mode: waiting connections...
> [00:00:00.187,000] <inf> bt_hci_core: Identity: 02:80:e1:00:00:00 (public)
> [00:00:00.187,000] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision
> 0x0026, manufacturer 0x0030
> [00:00:00.187,000] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x2126
>
> Get correct BLE address:
>
> udn = LL_FLASH_GetUDN();
> if(udn != 0xFFFFFFFF)
> {
>     company_id = LL_FLASH_GetSTCompanyID();
>     device_id = LL_FLASH_GetDeviceID();
>
>     bd_addr_udn[0] = (uint8_t)(udn & 0x000000FF);
>     bd_addr_udn[1] = (uint8_t)( (udn & 0x0000FF00) >> 8 );
>     bd_addr_udn[2] = (uint8_t)( (udn & 0x00FF0000) >> 16 );
>     bd_addr_udn[3] = (uint8_t)device_id;
>     bd_addr_udn[4] = (uint8_t)(company_id & 0x000000FF);;
>     bd_addr_udn[5] = (uint8_t)( (company_id & 0x0000FF00) >> 8 );
>     bd_addr = (const uint8_t *)bd_addr_udn;
>
> }

I have not yet worked with any of the bluetooth APIs, but this thread
peaked my interest because I am also evaluating the STM32WB55 for an
upcoming project.

I did a quick search through the bluetooth API and found the function
bt_ctlr_set_public_addr [1]. I started digging into its implementation,
but I was not able to figure out how this function relates to the rest
of the bluetooth system, or how it relates to the STM32WB55 LL/HAL.

I would recommend trying this function to see if it meets your needs.
Please let me know if it works! I'm definitely curious to know how this
might work with the STM32WB55.

Cheers,
Rob Weber

[1] https://docs.zephyrproject.org/latest/reference/bluetooth/controller.html#_CPPv323bt_ctlr_set_public_addrPK4u8_t


Re: STM32WB55 BLE address

Erwan Gouriou
 

Hi Marcio,

Setting of public address based on flash registers should be done as part of controller init in hci driver.
In function bt_ipm_ble_init in drivers/bluetooth/hci/ipm_stm32wb.c

It should be done by sending a custom command to the controller (ACI_HAL_WRITE_CONFIG_DATA), which will provide the address that you can get by the piece of code you mentionned.
This proprietary command is described in following application note:

Hope it helps
Erwan



On Thu, 8 Aug 2019 at 20:29, Marcio Montenegro <mtuxpe@...> wrote:
Hello Rob,
I got the error below:
undefined reference to `bt_ctlr_set_public_addr'

Yes I included <bluetooth/controller.h>
I don't know if any config is missing and how public BLE address is assigned for this board.

My prj.conf:

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="P2PSRV1"
CONFIG_BT_GATT_BAS=y
CONFIG_BT_DEBUG=y

Anyway I can connect to nrf connect and ST BLE sensor android app.
The battery service is working.
Now I am finishing a custom service.
Best regards,
Marcio



On Wed, Aug 7, 2019 at 2:21 PM Marcio Montenegro via Lists.Zephyrproject.Org <mtuxpe=gmail.com@...> wrote:
Thanks, I'll check it out. 

On Wed, Aug 7, 2019, 13:57 Rob Weber <rob@...> wrote:
Hello,

On Tue, Aug 06, 2019 at 11:26:59AM -0300, Marcio Montenegro wrote:
> I am evaluating STM32WB55  board HCI driver.
> During my test I found that BLE  public address is  02:80:e1:00:00:00
> But this microcontroller has an internal flash register to store BLE
> address and device id.
> I would like to know the best way to change the address BLE in this case.
> Best regards,
> Marcio
>
> BLE Stack initialization:
>
> [00:00:00.015,000] <dbg> bt_settings.bt_settings_init:
> Bluetooth initialized
> Configuration mode: waiting connections...
> [00:00:00.187,000] <inf> bt_hci_core: Identity: 02:80:e1:00:00:00 (public)
> [00:00:00.187,000] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision
> 0x0026, manufacturer 0x0030
> [00:00:00.187,000] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x2126
>
> Get correct BLE address:
>
> udn = LL_FLASH_GetUDN();
> if(udn != 0xFFFFFFFF)
> {
>     company_id = LL_FLASH_GetSTCompanyID();
>     device_id = LL_FLASH_GetDeviceID();
>
>     bd_addr_udn[0] = (uint8_t)(udn & 0x000000FF);
>     bd_addr_udn[1] = (uint8_t)( (udn & 0x0000FF00) >> 8 );
>     bd_addr_udn[2] = (uint8_t)( (udn & 0x00FF0000) >> 16 );
>     bd_addr_udn[3] = (uint8_t)device_id;
>     bd_addr_udn[4] = (uint8_t)(company_id & 0x000000FF);;
>     bd_addr_udn[5] = (uint8_t)( (company_id & 0x0000FF00) >> 8 );
>     bd_addr = (const uint8_t *)bd_addr_udn;
>
> }

I have not yet worked with any of the bluetooth APIs, but this thread
peaked my interest because I am also evaluating the STM32WB55 for an
upcoming project.

I did a quick search through the bluetooth API and found the function
bt_ctlr_set_public_addr [1]. I started digging into its implementation,
but I was not able to figure out how this function relates to the rest
of the bluetooth system, or how it relates to the STM32WB55 LL/HAL.

I would recommend trying this function to see if it meets your needs.
Please let me know if it works! I'm definitely curious to know how this
might work with the STM32WB55.

Cheers,
Rob Weber

[1] https://docs.zephyrproject.org/latest/reference/bluetooth/controller.html#_CPPv323bt_ctlr_set_public_addrPK4u8_t


Re: how to make zephyr as a ble mesh provisioner?

Johan Hedberg
 

Hi Rahul,

On 24 Jul 2019, at 8.01, rahul tiwari <rahultiwari30694@gmail.com> wrote:
what are the steps required to make zephyr OS as a provisioner.
There’s a preliminary pull request to add this feature, but it’s not yet merged upstream:

https://github.com/zephyrproject-rtos/zephyr/pull/17729

I flashed the sample board example of mesh over nordic pca10040 , and i cant provision it from BlueZ meshctl
Kindly provide me the way to provision it
Were you asking for provisioner support as a workaround for the above issue, or these are two independent requests? meshctl should be able to provision Zephyr as long as you have PB-GATT support enabled in Zephyr. Nordic’s nRF Mesh app (available for Android & iOS) should work as well.

Johan


Zephyr 2.0.0-rc1 tagged

Glaropoulos, Ioannis
 

Hi Zephyr developers,

 

We have just tagged Zephyr 2.0.0-rc1.

 

All required features scheduled for 2.0 release are now merged into master. As of now we are in the stabilization phase for 2.0 release; the merge window is closed for new features and enhancements, and will remain closed until the release date. We will also start working on filling in the existing skeleton for the release notes.

 

During the stabilization period bug-fix, documentation, and stabilization-related patches may be merged to master. Additional features or enhancements for 2.0 release will need to be approved by TSC.

 

As we need to reduce bug counts for the release, you are all encouraged to submit PRs that close existing bug reports, and to help reviewing such PRs submitted by other contributors or maintainers.

Testing Zephyr release candidate branches is also highly appreciated; please, test the code base and file bug reports so they can be addressed before the release deadline.

 

The full release log can be found here: https://github.com/zephyrproject-rtos/zephyr/releases/tag/v2.0.0-rc1

 

More details about Zephyr releases is found here: https://github.com/zephyrproject-rtos/zephyr/wiki/Program-Management

 

The final release is tentatively scheduled for August 30th.

 

Thanks to everybody who contributed to this release!

 

Ioannis Glaropoulos

 

1641 - 1660 of 7815