Date   

c++ application development #nrf52840

Narendar Malepu
 

Hi,

we are developing an application in c++, for dynamic memory allocation using new as operator overloading as below

void *operator new(size_t size)
{
  void *p = malloc(size);
  return p;
}
 
void operator delete(void *ptr)
{
  free(ptr);
}

but as per documentation it is mention that new and delete are not supported, complier is not showing any error or warning for my usage.

Can you help regarding above new operator overloading whether to use it or not in my application.

Thanks


Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2

Paul Sokolovsky
 

Hello Marti,

On Fri, 6 Sep 2019 17:41:56 +0000
"Bolivar, Marti" <Marti.Bolivar@nordicsemi.no> wrote:

Hi Paul,

These are important questions, and I'm glad you've asked them. I will
try to provide a fair amount of detail along with short answers.
[]

Of course, no test suite is perfect, but I hope this addresses your
concerns, or at least answers your questions. We're always trying to
improve the test suite and welcome any suggestions.
It definitely does, and I much appreciate the detailed response
(hopefully you wrote it not just as a response, but also a checklist
for yourself, confirming there're no obvious things missed). It
actually took some time to go in detail thru it, and I agree that good
thought was put into various cases, it works close to the best possible
(and I'm conservative only because I didn't use it much enough).

To address a potential follow-up, I am looking into adding better
coverage metrics to the test suite (it's tricky because a lot of the
Sounds great, and even the test file you referred to is 20K, so testing
coverage is definitely not "bare". My only concern would be that
maintaining west has become a non-trivial endeavor, but I guess, that
part is covered, so all readers of the original and this thread should
be happy about it!


Thanks again!


Thanks,
Marti

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


RTIO API, Other potential uses

Tom Burdick
 

Hi Everyone,

I've been steadily and surely working on a new API, primarily aimed at sensors, but has been split in such a way that device drivers could extend the base API of configuring a stream with rules and triggering reads for other things.

It was always my intention that this base API potentially be useful for other things. Things like sensors that might also need DMA like transfers without actually copying things.

A look-see of how things are coming along, for sensors and this API, can be found


Note that the rtio_sensor prefix and requirements are an extension of the RTIO device API



I'd be interested in knowing if anyone has a potential use case for the base rtio_api besides the sensor use that I'm working on. If so I'll push hard to work on that with you to get it in for 2.1 perhaps.

Let me know your thoughts!

Cheers,

Tom


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

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

Reminder: Zephyr Project: APIs

When: Tuesday, 10 September 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:

- GPIO: Update on progress
- Roadmap for GPIO inclusion: https://github.com/zephyrproject-rtos/zephyr/issues/18530
- Merge https://github.com/zephyrproject-rtos/zephyr/pull/16648 to topic-gpio

- V4Z: Quick update on PR status https://github.com/zephyrproject-rtos/zephyr/pull/17194

- Sensor API: Update on progress

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,


Re: Dual ethernet interfaces on Zephyr OS ?

Jukka Rissanen
 

Hi,

there exists NET_DEVICE_INIT_INSTANCE() macro (in include/net/net_if.h)
that can be used for this purpose. You would need to edit the ethernet
driver and call that macro with suitable parameters.

You could also create ETH_NET_DEVICE_INIT_INSTANCE() (it does not
exists yet) from ETH_NET_DEVICE_INIT() (in include/net/ethernet.h) and
add instance support to that.


Cheers,
Jukka

On Tue, 2019-09-10 at 19:16 +0800, "Explorer wrote:
Hello,

I have got one I.MXRT1062 board with 2 ethernet port on it.

And I checked the I.MXRT1062 EVK BSP and it only support one ETH
port.

Is there anything (docs or code) I can refer to , so I can add dual
ethernet interfaces with tcp-ip stack to this board?

------
B.R.
PeterC


Dual ethernet interfaces on Zephyr OS ?

"Explorer
 

Hello, 

I have got one  I.MXRT1062 board with 2 ethernet port on it.

And I checked the I.MXRT1062 EVK BSP and it only support one ETH port.

Is there anything (docs or code)  I can refer to , so I can add dual ethernet interfaces with tcp-ip stack to this board?

------
B.R.
PeterC


Re: native_posix on MacOS? #builds

alpi@...
 

> Perhaps this is an area I could lend a hand. 

 

You’d be very welcome.

 

From: Allen Curtis <allen@...>
Sent: Monday 9 September 2019 16:23
To: Alberto Escolar Piedras (ALPI) <ALPI@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] native_posix on MacOS? #builds

 

Thanks Alberto,

 

Everything works great in my Linux VM. Perhaps this is an area I could lend a hand. 

 

Allen

 

On Mon, Sep 9, 2019 at 4:54 AM Alberto Escolar Piedras (ALPI) <ALPI@...> wrote:

Hi,

 

> could someone tell me if building Zephyr to run natively on MacOS is supported?

Unfortunately, not yet:

https://github.com/zephyrproject-rtos/zephyr/issues/10945

 

BR
Alberto

 

From: devel@... <devel@...> On Behalf Of allen via Lists.Zephyrproject.Org
Sent: Monday 9 September 2019 05:51
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] native_posix on MacOS? #builds

 

Hello,

Before I waste a lot of time, could someone tell me if building Zephyr to run natively on MacOS is supported? I am getting the following error messages regarding GEN_OFFSET_SYM() and GEN_ABSOLUTE_SYM().  Thanks

Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include -I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj   -c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt

In file included from /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c:32:

../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive

GEN_OFFSET_SYM(_kernel_t, current);

^

../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM'

        GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M))

        ^

../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM'

                "\n\t.type\t" #name ",@object" :  : "n"(value))

                   ^

<inline asm>:3:2: note: instantiated into assembly here

        .type   ___kernel_t_current_OFFSET,@object

--

Allen Curtis

Medical Device Architect

Critical Software Solutions, LLC

 


Re: native_posix on MacOS? #builds

Allen Curtis
 

Thanks Alberto,

Everything works great in my Linux VM. Perhaps this is an area I could lend a hand. 

Allen

On Mon, Sep 9, 2019 at 4:54 AM Alberto Escolar Piedras (ALPI) <ALPI@...> wrote:

Hi,

 

> could someone tell me if building Zephyr to run natively on MacOS is supported?

Unfortunately, not yet:

https://github.com/zephyrproject-rtos/zephyr/issues/10945

 

BR
Alberto

 

From: devel@... <devel@...> On Behalf Of allen via Lists.Zephyrproject.Org
Sent: Monday 9 September 2019 05:51
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] native_posix on MacOS? #builds

 

Hello,

Before I waste a lot of time, could someone tell me if building Zephyr to run natively on MacOS is supported? I am getting the following error messages regarding GEN_OFFSET_SYM() and GEN_ABSOLUTE_SYM().  Thanks

Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include -I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj   -c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt

In file included from /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c:32:

../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive

GEN_OFFSET_SYM(_kernel_t, current);

^

../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM'

        GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M))

        ^

../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM'

                "\n\t.type\t" #name ",@object" :  : "n"(value))

                   ^

<inline asm>:3:2: note: instantiated into assembly here

        .type   ___kernel_t_current_OFFSET,@object

--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Re: native_posix on MacOS? #builds

alpi@...
 

Hi,

 

> could someone tell me if building Zephyr to run natively on MacOS is supported?

Unfortunately, not yet:

https://github.com/zephyrproject-rtos/zephyr/issues/10945

 

BR
Alberto

 

From: devel@... <devel@...> On Behalf Of allen via Lists.Zephyrproject.Org
Sent: Monday 9 September 2019 05:51
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] native_posix on MacOS? #builds

 

Hello,

Before I waste a lot of time, could someone tell me if building Zephyr to run natively on MacOS is supported? I am getting the following error messages regarding GEN_OFFSET_SYM() and GEN_ABSOLUTE_SYM().  Thanks

Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include -I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj   -c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt

In file included from /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c:32:

../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive

GEN_OFFSET_SYM(_kernel_t, current);

^

../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM'

        GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M))

        ^

../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM'

                "\n\t.type\t" #name ",@object" :  : "n"(value))

                   ^

<inline asm>:3:2: note: instantiated into assembly here

        .type   ___kernel_t_current_OFFSET,@object


native_posix on MacOS? #builds

Allen Curtis
 

Hello,

Before I waste a lot of time, could someone tell me if building Zephyr to run natively on MacOS is supported? I am getting the following error messages regarding GEN_OFFSET_SYM() and GEN_ABSOLUTE_SYM().  Thanks


Allens-MacBook-Pro:build-posix allencurtis$ /usr/bin/clang -DBUILD_VERSION=zephyr-v1.14.0-2172-g3f057403cb43 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR__=1 -I../../../kernel/include -I../../../arch/posix/include -I../../../include -I../../../include/drivers -Izephyr/include/generated -I../../../soc/posix/inf_clock -I../../../boards/posix/native_posix -Os -imacros/Users/allencurtis/zephyrproject/zephyr/samples/hello_world/build-posix/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/Users/allencurtis/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -m32 -MMD -MP -include /Users/allencurtis/zephyrproject/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj   -c /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c 2> error.txt

In file included from /Users/allencurtis/zephyrproject/zephyr/arch/posix/core/offsets/offsets.c:32:

../../../kernel/include/kernel_offsets.h:27:1: error: unknown directive

GEN_OFFSET_SYM(_kernel_t, current);

^

../../../kernel/include/gen_offset.h:80:2: note: expanded from macro 'GEN_OFFSET_SYM'

        GEN_ABSOLUTE_SYM(__##S##_##M##_##OFFSET, offsetof(S, M))

        ^

../../../include/toolchain/gcc.h:369:6: note: expanded from macro 'GEN_ABSOLUTE_SYM'

                "\n\t.type\t" #name ",@object" :  : "n"(value))

                   ^

<inline asm>:3:2: note: instantiated into assembly here

        .type   ___kernel_t_current_OFFSET,@object


NRF1802

Miguel Wisintainer <tcpipchip@...>
 

Sir,

Can you help me ? I tried to implement the ADC on that chip but now success!

Can you send a simple example that enable a analog input (for example 10 bits, and intern 3.3V reference) and read it ? 

P0.04 AIN5 Digital I/O Analog input General purpose I/O pin. ADC

Today i implemented the BLE and works very fine! The board used was BLE400! But i want to send the analog value!

Thank you so much!

Miguel
Livre de vírus. www.avast.com.


Zephyr 2.0 Released

Glaropoulos, Ioannis
 

Hi,

We are excited to announce the release of Zephyr RTOS version 2.0.0!

 

The 2.0.0 is the first Zephyr release after the 1.14.0 LTS release in April 2019.

Major enhancements with this release include (but are not limited to):

 

  • Kernel support of both 32- and 64-bit architectures.
  • Support for SOCKS5 proxy. SOCKS5 is an Internet protocol that exchanges network packets between a client and server through a proxy server.
  • Support for 6LoCAN, a 6Lo adaption layer for Controller Area Networks.
  • Support for Point-to-Point Protocol (PPP) . PPP is a data link layer (layer 2) communications protocol used to establish a direct connection between two nodes.
  • Support for UpdateHub, an end-to-end solution for large scale over-the-air device updates.
  • Support for ARM Cortex-R Architecture (Experimental).


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

I would like to thank all the contributors to this release. In total 215 contributors participated in the development of 2.0. It has taken a lot of hard work from everyone in the Zephyr community!

Starting now, the tree is open for new features targeting 2.1 release, which is tentatively scheduled for November 29th 2019.

 

Thank you again,

 

Ioannis Glaropoulos


Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2

Bolivar, Marti
 

Hi Paul,

These are important questions, and I'm glad you've asked them. I will
try to provide a fair amount of detail along with short answers.

Paul Sokolovsky <paul.sokolovsky@linaro.org> writes:

Hello Marti,

On Wed, 4 Sep 2019 16:39:22 +0000
"Bolivar, Marti" <marti.bolivar@nordicsemi.no> wrote:

Marti Bolivar <marti.bolivar@nordicsemi.no> writes:

Hi,

West v0.6.1 contains a ... bug ...

It won't cause data loss, but it will cause west update to fail to
check out the correct revision in some cases.
Speaking of data loss... I figure I have local changes in modules
managed (stroked thru) initially checked out by west. Can west be
trusted:

1) To never touch those changes during normal development process, i.e.
building and running apps?
Short answer is "yes".

First, west doesn't change the contents of the manifest repository,
ever. In upstream zephyr's case, that means builtin west commands won't
edit files in the zephyr repository, only read them. The lone exception
is "west init", which is used upstream to clone the zephyr repository
itself. And if you try to run "west init" again in a way that would
touch an existing installation, it aborts without doing anything -- in
part, to avoid touching existing files in unexpected ways.

This behavior is tested, e.g.:

https://github.com/zephyrproject-rtos/west/blob/master/tests/test_project.py#L227

You can of course shoot yourself in the foot with something like this:

$ west forall -c "rm -rf .git *" # DO NOT RUN THIS

but I don't think that's what you're asking about.

Side note:
this is unlike Google repo, which pulls and can rebase the
manifest repository when you run "repo sync", then attempts to
rebase all your local working copies. I've seen this cause lots of
problems, so not touching zephyr (and not rebasing modules by
default) was an important constraint when we were designing west.

Second, none of the west extension commands in the zephyr repository
(completion, boards, build, sign, flash, debug, debugserver, attach) run
git, so they won't check out any changes that way.

There are of course ways to shoot yourself in the foot with the zephyr
extensions by asking them to overwrite a file in your working copy or
build directory you care about, e.g.:

$ west sign [...] -B some-file-i-care-about
$ west build --pristine=always -d build-dir-with-unsaved-.config-changes

But, well, "you asked for it, you got it" (YAFIYGI).

2) To likewise never overwrite those changes on "west update"?
Not by default; see below.


I guess it boils down to questions: a) "Is it true that west never tries
to perform any unattended module updates, and does that only if
explicitly asked (west update)" and
Updates to modules via git only happens during west update -- again,
barring YAFIYGI commands like:

$ west forall -c "git reset --hard HEAD"

West doesn't perform unattended updates. I personally hate tools that
update me without asking first. West won't download updates and ask you
if you want to apply them (like a web browser), either: you need to
explicitly ask west to pull changes from the network and/or apply them to
your working trees.

b) "Is it true that west, when
asked to update modules, doesn't run any workcopy-destructive commands,
like git reset, some forms of git checkout; or, if it does, it first
performs (regression-tested) check for local changes in the
corresponding modules ?"
The default "west update" behavior uses "git checkout --detach".

From git-checkout(1):

Prepare to work on top of <commit>, by detaching HEAD at
it (see "DETACHED HEAD" section), and updating the index
and the files in the working tree. Local modifications to
the files in the working tree are kept, so that the
resulting working tree will be the state recorded in the
commit plus the local modifications.

Beyond preserving working tree state (unless there is a bug in git
itself), this leaves your existing branches behind untouched.

This is also tested, e.g.:

https://github.com/zephyrproject-rtos/west/blob/master/tests/test_project.py#L186

Note that if local changes conflict with what would be checked out, git
checkout --detach simply fails with "Your local changes to the following
files would be overwritten by checkout: <list-of-files>".

In that case, "west update" fails on that project, keeps going to the
others, and ultimately exits with an error. I would argue it has done
the right thing by leaving your code alone in the problematic project,
while trying to do its job everywhere it can.

When that happens, "west update" also prints an error at the very end of
the command output alerting you that something went wrong, like this:

ERROR: update failed for projects: <list-of-failed-projects>

This is meant to help the user in case the error output scrolls past
their terminal window too quickly.

Now, you *can* ask west to rebase locally checked out branches with
"west update --rebase" -- YAFIYGI.

Of course, no test suite is perfect, but I hope this addresses your
concerns, or at least answers your questions. We're always trying to
improve the test suite and welcome any suggestions.

To address a potential follow-up, I am looking into adding better
coverage metrics to the test suite (it's tricky because a lot of the
code is run in python subprocesses, as is the case in the above
test_project.py example, so coverage from those runs needs to be
collected and combined to produce meaningful results). From there, we
can look at what's missing and make improvements.

That of course does not address behavioral concerns like "what happens
to my working tree in this situation?", which is a separate and ongoing
effort. If you have any specific concerns, please let me know and I'll
do my best to add missing tests as needed.

Thanks,
Marti


west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2

Paul Sokolovsky
 

Hello Marti,

On Wed, 4 Sep 2019 16:39:22 +0000
"Bolivar, Marti" <marti.bolivar@nordicsemi.no> wrote:

Marti Bolivar <marti.bolivar@nordicsemi.no> writes:

Hi,

West v0.6.1 contains a ... bug ...

It won't cause data loss, but it will cause west update to fail to
check out the correct revision in some cases.
Speaking of data loss... I figure I have local changes in modules
managed (stroked thru) initially checked out by west. Can west be
trusted:

1) To never touch those changes during normal development process, i.e.
building and running apps?
2) To likewise never overwrite those changes on "west update"?

I guess it boils down to questions: a) "Is it true that west never tries
to perform any unattended module updates, and does that only if
explicitly asked (west update)" and b) "Is it true that west, when
asked to update modules, doesn't run any workcopy-destructive commands,
like git reset, some forms of git checkout; or, if it does, it first
performs (regression-tested) check for local changes in the
corresponding modules ?"

Thanks.


Marti
[]

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


Video 4 Zephyr - call for reviews

Loic Poulain
 

Hi all,

Reviews are welcome on the Video Zephyr API PR:

This pull request introduces a generic Video API, highly inspired by existing API/frameworks like V4L2, gstreamer, and OpenMAX. A video device can be a video capture device (e.g. camera) a memory-to-memory device (e.g. encoder) or an output device (e.g. display). The main operation consists of enqueuing and dequeuing video buffer(s) to video device's endpoint(s). The video buffer can then be filled (capture), or consumed (output) depending endpoint type. The API is designed for 'zero-copy' and easy pipeline creation (e.g. camera->encoder->display).

In order to keep the API simple but scalable, each video device can implement video 'controls' identified by control-id (CID) which can either be video generic, class generic (camera, encoder...) or vendor/device specific.

This PR adds the definition of the API, support for NXP MCUX CSI (CMOS sensor interface) and MT9M114 sensor. Allowing to capture frames with the mimxrt1064-evk board. For testing purpose, It also adds a software pattern generator which outputs a static colorbar pattern.

Two samples have been implemented, a simple 'capture' sample counting captured frame from any available video device and a 'tcpserversink' sample forwarding captured frames to a TCP client, which can then display the frames with e.g. gstreamer.

Regards,
Loic


why the reschrdule not permitted if lock key nested ?

"曹子龙
 

HI guys:
   
  in kerne impl. many scenarios would call the z_reschedule to yield volunteer if the thread`s resource request did not meets.

but the "resched" condition check confuse me, it seems only the case that the l"z_arch_irq_unlocked" is true, which means the previous irq lock status is
unlock, can the schedule be permitted. in this case, the irq lock depth only 1 is permitted.
but Why design like this, in many rtos impl.  the voluteer yield operation can happen without care bout how depth the lock level, why zephyr need care about this?
static inline int resched(u32_t key)                                                                                                                                                                      |-
{                                                                                                                                                                                                         |-
#ifdef CONFIG_SMP                                                                                                                                                                                         |-
        if (!_current_cpu->swap_ok) {                                                                                                                                                                     |-
                return 0;                                                                                                                                                                                 |-
        }                                                                                                                                                                                                 |-
        _current_cpu->swap_ok = 0;                                                                                                                                                                        | 
#endif                                                                                                                                                                                                    | 
                                                                                                                                                                                                          | 
        return z_arch_irq_unlocked(key) && !z_is_in_isr();                                                                                                                                                | 
}                                                                                                                                                                                                         | 
                                                                                                                                                                                                          | 
void z_reschedule(struct k_spinlock *lock, k_spinlock_key_t key)                                                                                                                                          | 
{                                                                                                                                                                                                         |-
        if (resched(key.key)) {                                                                                                                                                                           |-
                z_swap(lock, key);                                                                                                                                                                        |-
        } else {                                                                                                                                                                                          |-
                k_spin_unlock(lock, key);                                                                                                                                                                 |-
        }                                                                                                                                                                                                 |-
}                                                                                                                                                                                                         |-
  


曹子龙

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

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

TEL:13824125580

Email:caozilong@...

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

 



Re: OpenThread development guide

Lubos, Robert
 

Hi Arun,

 

I’m afraid I’m not in the position to make any statements about OpenThread integration roadmap at this point.

 

Regards,

Robert

 

From: Benjamin Lindqvist [mailto:benjamin.lindqvist@...]
Sent: Friday, September 6, 2019 08:46
To: Arun Kumar <arun.ece.nitp@...>
Cc: Lubos, Robert <Robert.Lubos@...>; devel@...
Subject: Re: [Zephyr-devel] OpenThread development guide

 

Hi Arun,

 

The NCP should probably not be high in the list of priorities - I doubt it makes a huge difference for the infrastructure that the NCP was compiled from some Nordic SDK or whatever.

 

This is just the opinion from a Thread non-expert but what I feel should be prioritized is making sure there's plenty of clean samples and good documentation. It would be nice with an actual Zephyr control interface as well, possibly utilizing the IFUP/IFDOWN signaling mechanisms, options for delaying Thread initialization until credentials are added and of course an API for altering the credentials.

 

On Fri, Sep 6, 2019 at 8:37 AM Arun Kumar <arun.ece.nitp@...> wrote:

Hi Robert,

 

Do we have clear road map for openthread integration in zephyr (I mean integration of NCP like things we are lacking so far) ?

 

with regards,

 

On Mon, Sep 2, 2019 at 4:21 PM Lubos, Robert <robert.lubos@...> wrote:

Hi Benjamin,

 

Sorry for late reply, I’ve just came back from holiday. See my responses inline.

 

Regards,

Robert

 

From: devel@... [mailto:devel@...] On Behalf Of Benjamin Lindqvist via Lists.Zephyrproject.Org
Sent: Tuesday, August 27, 2019 13:31
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] OpenThread development guide

 

Hi,

 

I've verified basic OT functionality using the echo_client/server samples with the openthread overlays. That's nice, but it's not obvious to me how I proceed after this. A few things that had me confused:

 

- how do I configure my Zephyr device as a sleepy end device?

 

It is not possible to configure Sleepy End Device on current master, there is a PR that adds this functionality though (https://github.com/zephyrproject-rtos/zephyr/pull/15552). It’s been open for some time now, feel free to comment in there if it’s a desired feature for you.

 

- can I setup my west.yml to clone openthread + dependencies as a module to prevent cmake from doing it at build every time?

 

This has already been done recently, make sure to check out the current master. West will now download OpenThread for you as a Zephyr module, and use it during OT samples builds.

 

- can I modify the network credentials at run-time? Or in other words, does Zephyr support anything but hardcoded OT commissioning?

 

Zephyr supports two ways of obtaining network credentials (commissioning):

  1. Use a preconfigured, hardcoded defaults, specified by Kconfig (good for samples, not really for real applications),
  2. Or perform a commissioning procedure defined by Thread specification during startup (see CONFIG_OPENTHREAD_JOINER_AUTOSTART option).

 

Both methods will configure your device during initial startup, and store network parameters in the flash. If, for whatever reason, you’d want to modify the network credentials afterwards, you’d need to call OpenThread API directly, there’s no support in Zephyr for that. See https://github.com/zephyrproject-rtos/openthread/blob/0dbecf508e7a79aae8ed9631f1a63fc65478b213/include/openthread/thread.h#L393 for available API functions. Just note, that in order to use OT API directly, you’d need to obtain OT context first from the OT network interface.

 

- can I build NCP firmware for a border router using Zephyr?

 

No, Zephyr cannot be configured as a NCP. For a NCP application, check the OpenThread repository.

 

etc. Right now I get the impression that the openthread integration is in a sort of proof-of-concept stage. Is this the case? If not, it would be nice with some more documentation, perhaps even a sample app...

 

Well, for sure I’d not call it a proof-of-concept at this point, yet indeed there’s still work to do. Lack of time/resources to push it forward is the only answer I can provide for now.


 

--

Arun kumar

Bachelor of Technology

Electronics & Communication Engineering

Nit Patna

Contact: +91-8877229320

Email: arun.ece.nitp@...

Linkedinhttps://www.linkedin.com/in/arunkumar31/


Re: OpenThread development guide

Arun kumar
 

Hi Benjamin,

I agree with you about priorities and all. I was looking of an overall road map for further developments around openthread and zephyr. As Robert mentioned the lack of resources, i was thinking of contributing into that. So, it would be a bit easy if there will be a clear road map. 

On Fri, Sep 6, 2019 at 12:16 PM Benjamin Lindqvist <benjamin.lindqvist@...> wrote:
Hi Arun,

The NCP should probably not be high in the list of priorities - I doubt it makes a huge difference for the infrastructure that the NCP was compiled from some Nordic SDK or whatever.

This is just the opinion from a Thread non-expert but what I feel should be prioritized is making sure there's plenty of clean samples and good documentation. It would be nice with an actual Zephyr control interface as well, possibly utilizing the IFUP/IFDOWN signaling mechanisms, options for delaying Thread initialization until credentials are added and of course an API for altering the credentials.

On Fri, Sep 6, 2019 at 8:37 AM Arun Kumar <arun.ece.nitp@...> wrote:
Hi Robert,

Do we have clear road map for openthread integration in zephyr (I mean integration of NCP like things we are lacking so far) ?
 
with regards,

On Mon, Sep 2, 2019 at 4:21 PM Lubos, Robert <robert.lubos@...> wrote:

Hi Benjamin,

 

Sorry for late reply, I’ve just came back from holiday. See my responses inline.

 

Regards,

Robert

 

From: devel@... [mailto:devel@...] On Behalf Of Benjamin Lindqvist via Lists.Zephyrproject.Org
Sent: Tuesday, August 27, 2019 13:31
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] OpenThread development guide

 

Hi,

 

I've verified basic OT functionality using the echo_client/server samples with the openthread overlays. That's nice, but it's not obvious to me how I proceed after this. A few things that had me confused:

 

- how do I configure my Zephyr device as a sleepy end device?

 

It is not possible to configure Sleepy End Device on current master, there is a PR that adds this functionality though (https://github.com/zephyrproject-rtos/zephyr/pull/15552). It’s been open for some time now, feel free to comment in there if it’s a desired feature for you.

 

- can I setup my west.yml to clone openthread + dependencies as a module to prevent cmake from doing it at build every time?

 

This has already been done recently, make sure to check out the current master. West will now download OpenThread for you as a Zephyr module, and use it during OT samples builds.

 

- can I modify the network credentials at run-time? Or in other words, does Zephyr support anything but hardcoded OT commissioning?

 

Zephyr supports two ways of obtaining network credentials (commissioning):

  1. Use a preconfigured, hardcoded defaults, specified by Kconfig (good for samples, not really for real applications),
  2. Or perform a commissioning procedure defined by Thread specification during startup (see CONFIG_OPENTHREAD_JOINER_AUTOSTART option).

 

Both methods will configure your device during initial startup, and store network parameters in the flash. If, for whatever reason, you’d want to modify the network credentials afterwards, you’d need to call OpenThread API directly, there’s no support in Zephyr for that. See https://github.com/zephyrproject-rtos/openthread/blob/0dbecf508e7a79aae8ed9631f1a63fc65478b213/include/openthread/thread.h#L393 for available API functions. Just note, that in order to use OT API directly, you’d need to obtain OT context first from the OT network interface.

 

- can I build NCP firmware for a border router using Zephyr?

 

No, Zephyr cannot be configured as a NCP. For a NCP application, check the OpenThread repository.

 

etc. Right now I get the impression that the openthread integration is in a sort of proof-of-concept stage. Is this the case? If not, it would be nice with some more documentation, perhaps even a sample app...

 

Well, for sure I’d not call it a proof-of-concept at this point, yet indeed there’s still work to do. Lack of time/resources to push it forward is the only answer I can provide for now.



--

Arun kumar

Bachelor of Technology

Electronics & Communication Engineering

Nit Patna

Contact: +91-8877229320

Email: arun.ece.nitp@...

Linkedinhttps://www.linkedin.com/in/arunkumar31/



--

Arun kumar

Software Engineer

Contact: +91-8877229320

Email: arun.ece.nitp@...

Linkedinhttps://www.linkedin.com/in/arunkumar31/


Re: OpenThread development guide

Benjamin Lindqvist
 

Hi Arun,

The NCP should probably not be high in the list of priorities - I doubt it makes a huge difference for the infrastructure that the NCP was compiled from some Nordic SDK or whatever.

This is just the opinion from a Thread non-expert but what I feel should be prioritized is making sure there's plenty of clean samples and good documentation. It would be nice with an actual Zephyr control interface as well, possibly utilizing the IFUP/IFDOWN signaling mechanisms, options for delaying Thread initialization until credentials are added and of course an API for altering the credentials.

On Fri, Sep 6, 2019 at 8:37 AM Arun Kumar <arun.ece.nitp@...> wrote:
Hi Robert,

Do we have clear road map for openthread integration in zephyr (I mean integration of NCP like things we are lacking so far) ?
 
with regards,

On Mon, Sep 2, 2019 at 4:21 PM Lubos, Robert <robert.lubos@...> wrote:

Hi Benjamin,

 

Sorry for late reply, I’ve just came back from holiday. See my responses inline.

 

Regards,

Robert

 

From: devel@... [mailto:devel@...] On Behalf Of Benjamin Lindqvist via Lists.Zephyrproject.Org
Sent: Tuesday, August 27, 2019 13:31
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] OpenThread development guide

 

Hi,

 

I've verified basic OT functionality using the echo_client/server samples with the openthread overlays. That's nice, but it's not obvious to me how I proceed after this. A few things that had me confused:

 

- how do I configure my Zephyr device as a sleepy end device?

 

It is not possible to configure Sleepy End Device on current master, there is a PR that adds this functionality though (https://github.com/zephyrproject-rtos/zephyr/pull/15552). It’s been open for some time now, feel free to comment in there if it’s a desired feature for you.

 

- can I setup my west.yml to clone openthread + dependencies as a module to prevent cmake from doing it at build every time?

 

This has already been done recently, make sure to check out the current master. West will now download OpenThread for you as a Zephyr module, and use it during OT samples builds.

 

- can I modify the network credentials at run-time? Or in other words, does Zephyr support anything but hardcoded OT commissioning?

 

Zephyr supports two ways of obtaining network credentials (commissioning):

  1. Use a preconfigured, hardcoded defaults, specified by Kconfig (good for samples, not really for real applications),
  2. Or perform a commissioning procedure defined by Thread specification during startup (see CONFIG_OPENTHREAD_JOINER_AUTOSTART option).

 

Both methods will configure your device during initial startup, and store network parameters in the flash. If, for whatever reason, you’d want to modify the network credentials afterwards, you’d need to call OpenThread API directly, there’s no support in Zephyr for that. See https://github.com/zephyrproject-rtos/openthread/blob/0dbecf508e7a79aae8ed9631f1a63fc65478b213/include/openthread/thread.h#L393 for available API functions. Just note, that in order to use OT API directly, you’d need to obtain OT context first from the OT network interface.

 

- can I build NCP firmware for a border router using Zephyr?

 

No, Zephyr cannot be configured as a NCP. For a NCP application, check the OpenThread repository.

 

etc. Right now I get the impression that the openthread integration is in a sort of proof-of-concept stage. Is this the case? If not, it would be nice with some more documentation, perhaps even a sample app...

 

Well, for sure I’d not call it a proof-of-concept at this point, yet indeed there’s still work to do. Lack of time/resources to push it forward is the only answer I can provide for now.



--

Arun kumar

Bachelor of Technology

Electronics & Communication Engineering

Nit Patna

Contact: +91-8877229320

Email: arun.ece.nitp@...

Linkedinhttps://www.linkedin.com/in/arunkumar31/

1661 - 1680 of 7924