Commit graph

99049 commits

Author SHA1 Message Date
Sebastian Bøe
6d8d4442b0 mergehex: Improve the error feedback when merged hex files overlap
When merging hex files, and there is an overlap between the hex files,
display the hex file that failed to merge.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-29 17:04:42 +01:00
Savinay Dharmappa
3bec750268 dts: xtensa: esp32: Add device tree support.
add device tree support for esp32

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-29 09:47:17 -06:00
Anas Nashif
401395f0fd ci: install v0.6 docker image
This image has both west in pytest and most recent sdk-ng release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-29 10:20:38 -05:00
Kumar Gala
dfa350e7fd boards: arm: mps2_an385: Fix dtc warning
Fix dtc warning related to ethernet node name not matching the reg
property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 08:51:54 -06:00
Kumar Gala
ae3abda801 led_strip: apa102: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert apa102 led_strip driver to use new defines so we can remove
the dts_fixup.h code for it.

Also update the driver to set the slave spi address as specified by the
device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 08:06:07 -06:00
Jukka Rissanen
09365adced net: shell: Fix network interface type for OpenThread
The "net iface" net-shell command printed "<unknown type>" for
OpenThread based technology. After this commit, the network
interface type is set to "OpenThread".

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-01-29 16:03:47 +02:00
Johan Hedberg
1c171ec283 Bluetooth: Add identifiers for Bluetooth 5.1
The Bluetooth 5.1 specification was recently released, and has a new
version identifier (10) assigned to it in the Bluetooth Assigned
Numbers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-01-29 16:00:57 +02:00
Jukka Rissanen
581261334c net: mqtt: Remove legacy MQTT library
The old and deprecated net-app based MQTT library is removed.
See the BSD socket based MQTT library for a replacement.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-01-29 07:11:23 -05:00
Robert Lubos
e0d4036f53 drivers: ieee802154: nrf5: Align to new radio driver API
Align ieee802154_nrf5 driver to a new radio driver API.
Utilize new radio driver features (CCA).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-29 10:37:47 +01:00
Robert Lubos
6093b88809 ext: hal: nordic: Update ieee802154 radio driver to version 1.2.3
Update nRF ieee802154 radio driver to version 1.2.3. See
https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/1.2.3/release_notes/nrf_802154_1.2.3.md
for a list of changes.

Origin: nRF-IEEE-802.15.4-radio-driver
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/tree/1.2.3
commit: 359cff11e6b4101f2c9433a952aa35705ca7b567
Purpose: Provide up-to-date version of the radio driver
Maintained-by: External

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-29 10:37:47 +01:00
Carles Cufi
c2bea66764 doc: getting_started: Clarify what west does
Add additional details about what running `west init` and `west update`
actually does in the local filesystem.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Marti Bolivar
808028b46f scripts: west commands: add text for "west --help"
Although each of these command implementations has good output for
"west <command> --help", the "west --help" output is missing the
one-line descriptions.

Add them by modifying west-commands.yml to use a new 'help' key in
each command name. These need to be kept in sync with the Python
sources. For now just do that by copy/pasting. We could add fancy
logic to load the help from west-commands.yml later if we want.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Marti Bolivar
ecae1e9b17 west_commands: add information on running tests
Add information to the README on how to run the tests, and note that
they are part of Zephyr's CI.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Carles Cufi
89ee604836 scripts: west: Add support for nRF91 in nrfjprog
Extend the list with the new nRF91 SoC.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
6162e93a00 doc: west: Do not fail doc build if west not used
In case west is not present or was not used to initialize the local
zephyr repository, avoid failing the documentation build by including a
placeholder file.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
0fa1db9416 doc: west: Misc formatting fixes
Miscellaneous formatting fixes in the west documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
6b00bc9357 west: Multiple CI fixes for the topic-west branch
In order to be able to merge the topic branch, we require a few
fixes to CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Marti Bolivar
e03ae5ba7e .shippable.yml: HACK: install latest west
After some discussion, we've decided to ensure that shippable runs
with the latest west bootstrapper on PyPI by making that happen in
.shippable.yml for now, rather than updating our CI container.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Marti Bolivar
e7eb798cf1 west: add west.yml
This is the west manifest file for mainline zephyr.

For a burn-in period, we are going to keep west pointing at master to
avoid deps rolls as we iron out any kinks.  We can then set its
revision to a SHA after things settle down.

The projects key is mandatory (if there's only one repository, there
wouldn't be much need for west!) so we'll start things off with the
net-tools repository at its current master SHA.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Marti Bolivar
63841df184 scripts: run_ci.sh: add pytest-based testing for west commands
Incorporate these into run_ci.sh the same way that btsim results were
done. This adds a dependency on pytest.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Marti Bolivar
9cecb5df4a scripts: run_ci.sh: remove dead code
Commit 88ece494 ("ci: do not build docs in main CI job") removed the
call to build_docs but not the function itself. That makes it
confusing to try to find where it's called; remove it.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Marti Bolivar
ab82264ace scripts: add west build, flash, and debug commands
West now supports a mechanism for extension commands. Use it to move
the command implementations that are tightly coupled with boards and
the zephyr build system back into the Zephyr repository.

This patch doesn't include test cases. Those will be moved over in a
subsequent patch.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Carles Cufi
6aa87b6f5b ci: Update to the new west model
The new west is able to initialize itself from an existing zephyr clone
without modifying it, adapt the CI script accordingly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
7335ef9142 doc: west: Overhaul documentation to match current model
Overhaul the west documentation so that it matches the model that is
currently implemented in the west repository.
This model is no longer subject to change in the short or mid term,
since it has been selected as the only viable one for multi-repo
management using west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
323280a18e doc: west: Move files to the correct location
West documentation files now belong in doc/tools/west and not doc/west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Anas Nashif
ca51ac916c ci: Use west to clone zephyr
West right now modifies the zephyr tree and points to master. In CI we
need to point to the pull-request HEAD instead, so so whatever shippable
does after cloning with west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-29 10:15:01 +01:00
Carles Cufi
29b5eb3581 doc: Use west instead of Git to clone Zephyr
Since west is no longer included in the Zephyr repository, instruct
users to install and use west in order to obtain the Zephyr source code.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
8d5259af04 doc: scripts: Retrieve west path at runtime
Since west is no longer part of the Zephyr tree, we can no longer
hardcode its path anymore. Instead, use west itself to retrieve its
path, in order to point the documentation build to the correct
active west installation.
This is optional, and the documentation build will still work if west is
not installed on the system.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
1b5bed04e2 cmake: Use west installation directly
Since we install west from pip and it becomes an executable, use it
directly assuming it's in the user's PATH.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
9b4eb37f38 scripts: remove west from scripts/
west will now be installed via pip in order for the bootstrapper to be
decoupled from the west runners.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Aurelien Jarno
33dae59a57 drivers: eth: gmac: fix race condition in packet reference counting
The SAM E70 GMAC ethernet driver reference a packet with net_pkt_ref()
when queueing a packet, and unreference it with net_pkt_unref() in the
ISR when it has been fully sent.

The call to net_pkt_ref() is done just after re-enabling the
interruptions, so there is however a small race condition that might
cause the packet to be unreference before being referenced. This is
only theoretical and has not been seen in practice.

Fix that by moving the call to net_pkt_ref() just before re-enabling
the interruptions.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-01-29 09:23:52 +02:00
Daniel Glöckner
d678f309b8 net: pkt: convert remaining users of ref to atomic_ref
The previous commit replaced the net_pkt element ref with an element
atomic_ref. CI tests turned up more places where ref was used directly.
This commit converts them to use the new element.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
2019-01-29 09:22:14 +02:00
Daniel Glöckner
5ef825fdf6 net: pkt: fix race condition in packet reference counting
It has been observed that some network drivers, f.ex. the SAM E70 GMAC,
call net_pkt_unref from inside the interrupt that signals the successful
transmission of a packet. This conflicts with the net_pkt_unref call
made by ethernet_send after the packet has been given to the driver.

We fix this by using an atomic_t to hold the reference count as there
might be other, difficult to find cases of net_pkt_(un)ref being used
across threads and interrupts.

The name of the element has been changed from "ref" to "atomic_ref" to
cause a compile error when code still has not been converted to use the
atomic_* functions.

Fixes #12708

Signed-off-by: Daniel Glöckner <dg@emlix.com>
2019-01-29 09:22:14 +02:00
Paul Sokolovsky
3e6d7d382a net: sockets_select: Fix build without CONFIG_NET_SOCKETS_POSIX_NAMES
The implementation code itself should not rely on plain POSIX names
and use zsock_ and ZSOCK_ prefixed versions of symbols.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-01-29 09:19:54 +02:00
Paul Sokolovsky
364751e029 drivers: eth_mcux: Optimize check if received frame too large
For some reason, there was sequence like:

1. Get size of RX packet.
2. Allocate pkt buffer.
3. Check if the size of RX packet is too large, then deallocate pkt
buffer and error out.

Instead, reorder operations to check size before allocating buf.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-01-29 09:18:43 +02:00
Robert Lubos
43a431e149 net: openthread: Set mesh_local flag in mesh-local OT addresses
Mark automatically and statically configured mesh-local addresses
with mesh_local flag, so that they are not used as a source for
off-mesh destinations.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-28 21:24:26 -05:00
Robert Lubos
83b8abaf8a net: ip: Introduce mesh_local address flag
This commit introduces a concept of mesh-local IPv6 addresses. Such
addresses should only be used for mesh-local communication, therefore
should not be used to communicate with different subnets (i. e.
destinations outside the mesh).

As `addr_type` field already holds different kind of information
(whether address was created automatically/manually) it was not used in
this case.

Instead a mesh_local flag was added, so that we do not lose information
on how address was created. Address with such flag set will only be
selected as a source address automatically if the destination address
is within the same subnet it belongs to.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-28 21:24:26 -05:00
Francesco Franchina
2433956500 doc: Removed doc reference to non-existing HW PWM
From the documentation of the SoC and the DevKit it turns out that
there's no hardware PWM controller.

Signed-off-by: Francesco Franchina <cescus92@gmail.com>
2019-01-28 21:23:08 -05:00
Maureen Helm
501db1e0b9 soc: nxp_imx: Promote driver defaults to soc series level
Streamlines repetitious code enabling default drivers by promoting it to
the soc series level.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-28 21:21:01 -05:00
Maureen Helm
605e599b1a ext: mcux: Add HAS_MCUX_ENET config
Adds a new config HAS_MCUX_ENET to constrain which socs can enable the
mcux ethernet driver. This will prevent users from enabling the driver
on socs like kl25z or kw41z which do not have ethernet mac hardware.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-28 21:21:01 -05:00
Sebastian Bøe
5bd5e4e440 cmake: userspce: Always compile priv_stacks_hash.c as -Os
The gperf hash table 'kobject_hash.c' is always compiled as -Os to
resolve bug #5226, the same bug also affects the gperf hash table
'priv_stacks_hash.c'.

In this patch we copy over the fix from 'kobject_hash.c' to also fix
'priv_stacks_hash.c'.

See #5672 for more discussion on the original fix.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-28 14:16:50 -08:00
Armando Visconti
69a3566868 samples/96b_argonkey: divided test into sensor and microphone
We have now two code samples available for ArgonKey board:

    1. sensors sample, fetching data from accel/gyro/mag,
       barometer, humidity and proximity sensors

    2. microphone sample, acquiring 5s audio @16KHz from the
       on-board microphone.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
c4b3583afd board/argonkey: Add MP34DT05 microphone in DTS
Add MP34DT05 pdm microphone in DTS under i2s_5 node.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
7c32f3091b dts/bindings: audio: add binding for ST MPXXDYYY pdm microphones on I2S
Provide dts yaml bindings for ST MPXXDYYY microphones family on I2S.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
f322c0b0ab dts/i2s: Extend the I2S dts binding with subnodes capability
This commit introduces the possibility to have multiple
device nodes attached to the same I2S controller. For this
purpose a new i2s-device.yaml description has been introduced
with the a 'reg' property to define the logic number of the
device. For example, if two microphones are attached to the
same I2S port (say 1) to achieve stereo audio, the two microphones
might be described in dts as:

    &i2s1 {
        status = "ok";

        mic@0 {
            compatible = "...";
            reg = <0>;
            label = "...";
        };
        mic@1 {
            compatible = "...";
            reg = <1>;
            label = "...";
        };
    };

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
c788aa5254 drivers/audio: Add support to ST digital microphones (MPxxDTyy)
This driver supports ST Microelectronics digital pdm microphones
(MPxxDTyy) connected through different peripherals. Currently only
I2S is supported.

The driver makes use internally of the OpenPDM2PCM library
to convert the PDM audio stream to PCM. Currently the
oversampling factor is fixed to 64.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
3a625ff3d4 ext: Added OpenPDM2PCM ST external library
This library, written by STMicroelectronics, is used to convert an
audio stream from PDM format to PCM format through a signal filtering
and decimation.

Library is located in ext/hal/st/lib/audio.

Origin: ST Microelectronics
License: Apache 2.0
URL: https://os.mbed.com/
Commit: 25:f2c04f757003
Purpose: reconstruct the audio signal produced by ST MEMS microphone
Maintained-by: External

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Sebastian Bøe
361fdaac1a cmake: Fix the generation of fixup files
A recent change in how the fixup mechanism works caused several
regressions. See
https://github.com/zephyrproject-rtos/zephyr/pull/12680 for more
details about the regressions.

The core of the matter is that using defines to pass on include paths
causes interopability issues when integrating with external build
systems.

To resolve this we re-write the fixup mechanism to instead generate an
aggregated fixup file that is ready to be included at build time. Then
no paths are passed through defines and we resolve the regressions
reported.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-28 12:18:38 -05:00
Kumar Gala
94e02794f3 dts: intel_s1000: Fix dtc warnings
Fix the following dtc warnings on S1000:

	Warning (simple_bus_reg): /soc/pinmux@81C30: simple-bus unit
	address format error, expected "81c30"

	Warning (alias_paths): /aliases: aliases property name must
	include only lowercase and '-'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-28 10:42:20 -06:00
Kumar Gala
f054ba2b65 flash: w25qxxdv: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert w25qxxdv driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-28 10:40:31 -06:00