Commit graph

99049 commits

Author SHA1 Message Date
Håkon Øye Amundsen
611b0d1e80 cmake: Move helper function up, inline variable.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
a449439504 cmake: Move check for TOTP property up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
2a3f43458b cmake: Move check for '-nostdinc' up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
d6551b5dea cmake: Move MPU userspace declaration up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
d85efe0b10 arch: arm: Add symbol for flash used
Add symbol which contains the number of bytes contained
in the image.

Using '_image_rom_end' will not work, as there are
symbols loaded after its value.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 14:07:59 +01:00
Andrei Laperie
35a95a9b2f net: gptp: Replace calls to power function with pre-computed values
gPTP subsystem was calling pow(x,y) function with X and Y being
constants; these are replaced with the pre-computed values.

Signed-off-by: Andrei Laperie <andrei.laperie@intel.com>
2018-12-04 15:05:36 +02:00
Paweł Zadrożniak
6e460ca64f drivers: usb: nordic: Fix class/vendor request handling
SetAddress request (0x05) is ignored and not propagated, because it
is handled by nRF hardware. Curently, request type is not checked
causing class or vendor request 0x05 to be inappropiately ignored.
Only standard requests (type = 0) shoud be ignored. This commit
fixes the issue.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-12-04 13:53:48 +01:00
Sigvart M. Hovland
3fc497ac9a ext: debug: segger: Add missing include directories
Fix #11812 by adding include paths to the `CMakeLists.txt`

Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
2018-12-04 13:46:27 +01:00
Håkon Øye Amundsen
bd2edd0eac ext: segger: Use system include directive for configuration header.
By using system include directive, we allow
the user to place external SEGGER_RTT_conf.h files to the
include path in order to override the zephyr version.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 13:45:49 +01:00
Bub Wei
c9db778042 samples: net: zperf: Refactor zperf_*_receiver_init
Drop tcp and udp rx threads which are just setting
and returning.

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2018-12-04 14:01:23 +02:00
Paul Sokolovsky
6a2853f9f4 net: ipv4: Clarify basic IPv4 packet drop logging
1. Clarify message telling that the actual packet length fed by the
driver differs from what specified in IPv4 header, and that leads to
drop.
2. Debug log any dropped packets in general.

These changes come from the experience of developing a networking
driver, where figuring out why packets get dropped may require
quite a head-scratching.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-12-04 12:29:03 +02:00
Jukka Rissanen
3ac7c12b4f drivers: eth: native_posix: Enable PTP clock support for gPTP
If gPTP is enabled, then enable also PTP clock driver so that
gPTP sync starts to work properly for native_posix board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-04 01:15:38 -05:00
Jukka Rissanen
e694b1a5f9 drivers: eth: native_posix: Fix PTP driver init priority
The PTP driver was init too late which prevented gPTP from
working in native_posix board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-04 01:15:38 -05:00
Andrei Emeltchenko
1bf0870d2a doc: up_squared: Add network booting documentation
Add instructions for booting Zephyr over network.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
9c144e9c0a doc: up_squared: Use contents instead of hardcoded toc
Use contents instead of hardcoded chapters in TOC.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
32655ae2e7 doc: up_squared: Clean up documentation
Cleanup documentation following common standards

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
b05c6834ad scripts: Add net and tftp to grub
This allows to boot over network for up_squared board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Anas Nashif
fa963a94a1 ci: do not use pull request branch with commit based CI
Use correct variable for branch when not in pull request mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 19:28:01 -05:00
Anas Nashif
3a361ecdc7 ci: do not build btsim if not installed
Do not attempt to build btsim if software is not installed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 19:28:01 -05:00
Anas Nashif
e81c902488 ci: PULL_REQUEST is reserved, use something else
Use PULL_REQUEST_NR instead of PULL_REQUEST which is reserved by
shippable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 18:45:26 -05:00
Krzysztof Chruscinski
d3c651d748 tests: subsys: logging: Add test for message drop notification
Extended logger suite to test correctness of reporting dropped
log messages.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Krzysztof Chruscinski
e781daacbf logging: Clean up in log_backend.h (asserts and doxygen)
Cleaning up doxygen comments. Replacing assert() with __ASSERT_NO_MSG.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Krzysztof Chruscinski
a211c42a29 logging: Add dropped messages notification to backends
Extended backend interface to allow notifying backend
that log messages has been dropped due to insufficient
internal buffer size. Notification contains number of
log messages dropped since last notification. It
is optional for a backend to implement handler.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Diego Sueiro
f7f31b1e13 boards: enable UART_INTERRUPT_DRIVEN for i.MX7 and i.MX6 boards
This patch enables the UART_INTERRUPT_DRIVEN by default for
colibri_imx7d_m4, udoo_neo_full_m4 and warp7_m4 boards.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-12-03 15:15:36 -05:00
Diego Sueiro
f1caf676ca drivers/serial: Fix uart issues for i.MX7 and i.MX6
This patch fixes the uart isr calling the callback with wrong data
(#11465) and the uart_poll_in checking the wrong status flag.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-12-03 15:15:36 -05:00
Andrew Boie
e48bc56b11 elf_helper: skip SYS_INIT() "devices"
SYS_INIT instantiates a device struct, but this is really
just used to run some functions at boot, it does not correspond
to a device driver belonging to a subsystem. Don't put them in
the kernel object table.

These are easy to filter since they are all named with the
_SYS_NAME macro.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:44:01 -08:00
Andrew Boie
cf268c39a2 kernel: add note in device.h
DEVICE_AND_API_INIT() is preferred over DEVICE_INIT() since
DEVICE_INIT() does not set the API struct at build time.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:32:58 -08:00
Andrew Boie
0bf3e38be1 CODEOWNERS: add owners to mem protection scripts
Based on original author/organization.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:32:22 -08:00
Peter A. Bigot
5bb18ac719 kernel: update documentation referencing old init levels
A couple references to the old PRIMARY and SECONDARY levels were left in
place when everything moved to the new levels.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-12-03 11:29:43 -08:00
Anas Nashif
d1bca4e056 ci: use set -x for verbosity
set -v was too verbose, so change to -x and remove extra sourcing of
zephyr-env.sh.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
45cbc81160 ci: pass pull request number to CI script
For further processing, pass pull request number to the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
5dd2593bcd ci: remove sanitycheck options from .shippable
They are now defined in CI script directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
d95ce03c1d ci: define BSIM_* variables in ci script directly
Rather than pass them as options, just set it directly in the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
a0a1bffd1c ci: move pos processing to the CI script
Move post processing to script and remove duplicatated code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Aurelien Jarno
6fd1691b94 kernel: Add a "nocache" read-write memory section
Add a "nocache" read-write memory section that is configured to
not be cached. This memory section can be used to perform DMA
transfers when cache coherence issues are not optimal or can not
be solved using cache maintenance operations.

This is currently only supported on ARM Cortex M7 with MPU.

Fixes #2927

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-12-03 09:54:31 -08:00
Yurii Hamann
2c363bddfe dts: arm: stm32: USART1 fix in device tree for STM32F7 series devices
Fixed mask value for RCC_APB1ENR register.

Signed-off-by: Yurii Hamann <yurii@hamann.site>
2018-12-03 11:36:01 -06:00
Andrew Boie
c7b7363da8 userspace: add additional debug to elf_helper
Devices are identified as belonging to a particular subsystem
by looking at device->driver_api.

Print some debug information if this is NULL or points to an
unrecognized API struct.

This is normal in a lot of cases, for example any use of SYS_INIT().
However, for real devices this may be an indication of mis-
configuration.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 09:26:20 -08:00
Peter A. Bigot
1fa00f3b36 kernel: remove outdated comment in _Cstart
The comment explaining why _IntLibInit was being invoked was left in
place after the invocation itself was removed.  Remove it too.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-12-03 09:18:06 -08:00
Andrzej Głąbek
965128bab1 drivers: usb_dc_nrfx: Align with nrfx version 1.4.0
A typo in the name of the bmRequest field in the nrfx_usbd_setup_t
structure was fixed in nrfx version 1.4.0. Update the driver to use
the new correct name: bRequest.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-03 17:56:15 +01:00
Andrzej Głąbek
b7b6e65885 ext: hal: nordic: Update nrfx to version 1.4.0
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.4.0/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.4.0
commit: 595e79f63f21224f6a42325095be9940a4a62ffb
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-03 17:56:15 +01:00
Bub Wei
a127984613 samples: net: zperf: Remove invalid forever sleep
We are not expecting forever k_sleep in multithreading.
And k_sleep is empty in non-multihreading.
So remove invalid forever sleep to avoid the below issue.

ASSERTION FAIL [duration != (-1)] @ zephyr/kernel/sched.c:807

Please refer to _impl_k_sleep api in zephyr/kernel/sched.c:807

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2018-12-03 14:43:49 +02:00
Håkon Øye Amundsen
d270f08956 soc: nordic: Add BPROT and MPU to list of supported HW.
Add configuration values for HAS_HW_NRF_BPROT and HAS_HW_NRF_MPU.
Select these configurations where applicable.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-03 13:39:27 +01:00
Jukka Rissanen
d641ac6eee drivers: eth: native_posix: Fix gPTP compile error
If compiling with gPTP support for native_posix board, then avoid
compile error that is seen with gptp sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-03 14:24:36 +02:00
Krzysztof Chruscinski
65b5e86c52 logging: Fix RTT backend being enabled with shell RTT
If USE_SEGGER_RTT option was enabled then LOG_BACKEND_RTT was
enabled by default. In case shell RTT was also used then both
write to RTT. Updated Kconfig to prevent such situation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 11:55:33 +01:00
Vinayak Kariappa Chettimada
a2f2d23c9f Bluetooth: controller: Fix conn update assert in slave role
Explicitly track the connection update related ticker stop
and start to avoid asserting due to ticker update being done
at the same time for compensating the clock drift.

The compensation related ticker update failure in this case
can be safely ignored as new anchor point is used anyway
at the instant of the connection update.

Fixes #8796

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-12-03 10:38:57 +01:00
Paweł Zadrożniak
1da367b5bf drivers: nordic: usbd: Fix long (fragmented) control OUT transfers
Fragmented long CTRL OUT transfers does not work properly, because
they were not handler properly by the shim. In such transfers,
a special call (nrfx_usbd_setup_data_clear()) must be performed
before every data packet and not just before the first one.
This patch adds a byte counter which is set while processing setup
packet (host->device only) to be able to decide whether there will
be more data packets coming (and to call_data_clear() or not).

Fixes #11232 .

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-12-03 10:28:11 +01:00
Anas Nashif
0754c67b3d samples: http_server: fixed test dependencies
depend on USB device and increase RAM requirements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-02 22:36:41 -05:00
Anas Nashif
f3f91f88d6 samples: zperf: expand test coverage
depend on USB device and increase RAM requirements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-02 22:36:41 -05:00
Jukka Rissanen
e9364d52fe net: Discard received extra data at the end of the IP message
If we receive extra data at the end of the IP message, then
discard that data and accept the packet.

Fixes #11649

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-02 14:23:13 -05:00
David B. Kinder
b645194cd3 doc: add sphinx extension improving only directive
The Sphinx ``.. only::`` directive is limited to handling only
conditional text and can't handling conditional use of directives
For example,

```
.. only:: test

   .. automodule:: west.runners.core
      :members:
```

is not handled. This PR monkey patches the handling of the existing
``.. only::`` directive done by Sphinx.

See https://github.com/pfalcon/sphinx_selective_exclude for details.
Licensing amended to Apache 2.0 with permission from the author.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-02 14:17:24 -05:00