Commit graph

99553 commits

Author SHA1 Message Date
Andrew Boie
136687d26c test_build_sensors_a_m: disable app memory
We run into the limit of 32 object files on ARM when
CONFIG_APPLICATION_MEMORY is enabled.

Bug #7703 filed, meanwhile just disable it, it's not
needed for this test case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-22 15:59:07 -07:00
Andrew Boie
e144a68f54 elf_helper: fix member offset calculation
On some arches like ARC, the member location tag is a list with
the offset and then the member size. We just need the offset.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-22 15:59:07 -07:00
Andrew Boie
9f30a6caed tests: mem_protect: fix off-by-one
A test was trying to add the maximum number of partitions,
but when the domain was initialized there was already one
added which needed to be accounted for to avoid an
assertion failing.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-22 15:59:07 -07:00
Asbjørn Sæbø
f7a1ffe614 Bluetooth: GATT: Change attribute count from u16_t to size_t
The change changes the type of the attribute count in the
bt_gatt_service struct to size_t.

The background for the change is that with this variable being a
u16_t, we assign something that has been cast to an unsigned long
(from "ARRAY_SIZE") to an u16_t variable, and that Lint complains
about a loss of information (27 bits to 16 bits in the case I found).

(The issue seems to be not only about the cast, but about what is
casted. I suspect that Lint may be confused by the magic of
ZERO_OR_COMPILE_ERROR.)

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2018-05-22 13:33:00 -04:00
Ulf Magnusson
8e7a00512b doc: Makefile: Use phony targets and remove unneeded prereqs
Turn 'content', 'kconfig', and 'prep' into phony targets so that the
docs can be built even if there is a file called e.g. 'kconfig' in
zephyr/doc/.

Also remove the Python scripts as prerequisites from the rules and
reference them directly in the recipes instead. The phony targets are
always "out-of-date", and there are no rules to run for the Python
scripts themselves.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Ulf Magnusson
06ecb287fc genrest: Move from doc/scripts/genrest/ to doc/scripts/
Having a single directory with just genrest.py feels a bit pointless.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Ulf Magnusson
b45e152ff0 menuconfig/genrest: Exclude implicit submenus from menu paths
Make all menu paths ("(top menu) -> menu -> submenu -> ...") exclude
implicit submenus, which are shown indented in the menuconfig interface
and are created when items depend on the symbol before them.

Previously, implicit submenus were excluded in the menu path at the top
of the menuconfig interface, but were included in the menuconfig symbol
information dialog and in the docs generated by genrest.py.

This makes it consistent, and un-spams the documentation for some
symbols a bit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Joakim Andersson
81b964b619 doc: Update description of BT_RECV_IS_RX_THREAD.
Clarify why this option is needed and which restrictions it has if
disabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2018-05-22 13:30:45 -04:00
Diego Sueiro
dcc9cefe09 doc: i.MX7 updated doc for Zephyr release 1.12
i.MX7 updated doc sections for Zephyr release 1.12:

Architectures:
    nxp_imx/mcimx7_m4: Added support for i.MX7 Cortex M4 core

Boards:
    colibri_imx7d_m4: Added support for Toradex Colibri i.MX7 board

Drivers and Sensors:
    serial: Added support for i.MX UART interface
    gpio: Added support for i.MX GPIO

HALs:
    nxp/imx: imported i.MX7 FreeRTOS HAL

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-05-22 13:30:30 -04:00
David B. Kinder
a129f19bea doc: CODEOWNERS for .rst files
Move *.rst to end of the list to ensure all .rst files get reviewed by
our tech writer (last match takes precedence).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-22 12:43:24 -04:00
Kumar Gala
e0e188d3d3 samples: xtensa_asm2: Cleanup stray IS_TEST reference
We removed IS_TEST a while ago.  Remove this stray reference

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-22 12:36:58 -04:00
Sebastian Bøe
cde6bef778 kconfig: Drop support for CONFIG_TOOLCHAIN_VARIANT
The Kconfig option TOOLCHAIN_VARIANT (not to be confused with
ZEPHYR_TOOLCHAIN_VARIANT) is a legacy configuration option that has
very few use-cases and can easily be dropped.

It's functionality is easily covered by CONFIG_X86_IAMCU and
ZEPHYR_TOOLCHAIN_VARIANT.

This commit removes all references of it from Zephyr.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-05-22 11:15:36 -04:00
Andy Ross
dec163fe83 sanitycheck: Disable parallel builds with Ninja
Ninja and GNU make don't play well with each other.  Both try to start
enough processes to keep the system's CPUs busy, resulting in an
O(N^2) system load in the number of processors.

Long term, Ninja seems likely to support the GNU make jobserver
mechanism for sharing access to parallelism.  But for now we can get
90% of the way there with a simple hack: just run ninja in serial mode
with -j1.  Sanitycheck when run in non-trivial circumstances has
PLENTY of parallelism just from the number of test cases.

One interesting note is that even with -j1, system loads under ninja
are rather higher.  That may be because of significant work done in
the (serial) makefiles that dilutes the parallelism of the eventual
build, or possibly because ninja itself is multithreaded in its setup
code.  So I tweaked the number of jobs down to keep the load roughly
where it is with make.

With this change, I see no difference in behavior or system load, and a
~24% improvement in runtime.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-22 10:17:22 -04:00
Ravi kumar Veeramally
d5df64722b samples: net: rpl_br: Fix coverity issues
Fixes: #7717
Fixes: #7720
Fixes: #7730

Coverity-CID: 186041
Coverity-CID: 186053
Coverity-CID: 186057

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-05-22 09:54:11 -04:00
Savinay Dharmappa
2ebb6a1fee dts: intel_s1000: use dts to set i2c0 priority.
patch removes Kconfig used i2c0 priority, instead use the
macro generated from dts.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-22 09:30:14 -04:00
Savinay Dharmappa
76676651f4 dts: intel_s1000: Enable generating IRQ priority.
patch enable generating IRQ priority for designware
interrupt controller used in intel_s1000

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-22 09:30:14 -04:00
Tomasz Bursztyka
2223160144 dts/bindings: Make use of RTC base in QMSI bindings
QMSI bindings were created prior to this base, and unfortunately not
updated to latest changes on last rebase.

Fixes #7694

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-22 08:28:55 -05:00
Ramakrishna Pallala
4c7a44b56d tests: posix: Fix pthread attribute initialization
Fix pthread_rwlock test pthread attributes initialization.

Fixes Issue #7569

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-22 08:58:59 -04:00
Jukka Rissanen
6180b904af net: Too long timeout was passed to k_sleep
The code was using MSEC() macro in few places instead of more
proper K_MSEC(). The MSEC() takes seconds as a parameter and
K_MSEC() takes milliseconds.

Fixes #7657

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-22 08:55:27 -04:00
Ravi kumar Veeramally
2c305d2cc5 samples: net: Remove unwanted code from coap-server
Probably left over from old ZOAP library. Stripping of headers
not required now.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-05-22 08:54:54 -04:00
Ravi kumar Veeramally
55680f884a samples: net: Fix coap-client sample
Removed unwanted code, fine tuned a bit. Original use case of
sample (verify CoAP GET, PUT and POST methods) against coap-server
not changed.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-05-22 08:54:54 -04:00
Ravi kumar Veeramally
ac3c6ba990 samples: net: Fix coap-server sample
If client removes observer then it reply with RESET message for
further observer notifications. That means coap-server should stop
sending further notifications to the client.

Current sample unref the packet as soon as it finds pending message
and doesn't bother about message type.

Fixes: #6534

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-05-22 08:54:54 -04:00
Ravi kumar Veeramally
6586dba334 net: coap: Fix CoAP observer helper function
sin6_scope_id is not set anywhere and not used. Probably left over
from old ZOAP library. Just address, port and family type are enough
to find registered CoAP observer.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-05-22 08:54:54 -04:00
Savinay Dharmappa
6701d44967 dts: xtensa: Fix build error due to dts changes for ns16550 driver.
patch add clock frequency and interrupt property to uart
node in intel_s1000.dtsi. Include soc.h after types.h to
prevent build error.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-22 08:51:59 -04:00
Daniel Egger
b1e06f2b3b net: lwm2m: remove silent fail for bad endpoint data in rd_client
The next error check is much more suitable to handle the error due to
the error message which lets the user know that something went wrong.

Fixes #7661.

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2018-05-21 22:50:12 -04:00
Ruslan Mstoi
4dd5867a79 net: conn: Fix is_invalid_packet
In switch statement break statement was missing causing IPv4 part to
execute even if the packet is IPv6. Also logical negation is wrong in
this context.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2018-05-21 22:49:19 -04:00
Savinay Dharmappa
3fb20eb8ed doc: updated doc for Zephyr release 1.12.
Updated doc for release 1.12 for :-

1. Added device tree support for nios2 based boards.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-21 22:48:31 -04:00
Ioannis Glaropoulos
0b7081859d misc: improve description of BOOTLOADER_SRAM_SIZE
This commit improves the help text of the BOOTLOADER_SRAM_SIZE
K-config option, to reflect its actual usage.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-05-21 22:47:54 -04:00
Marti Bolivar
e047775664 scripts: west: downgrade missing ZEPHYR_BASE to a warning
This is not strictly necessary for flashing and debugging, and is
causing issues in Linux environments where users run "make flash" as
root instead of installing udev rules.

Fixes: #7676

(Though we will need to revisit this when adding commands that run
CMake).

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-21 22:46:29 -04:00
Alberto Escolar Piedras
a21a075c1d native: ethernet: fix k_sleep() wait time
The input of k_sleep was wrongly converted from ms to ticks.
Fixed.

Fixes: #7656

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-05-21 22:34:17 -04:00
Kumar Gala
edf7c4fd08 arch: arm: kw41z: Set DTS fixup for CONFIG_RTC_0_NAME
Recent change to RTC core now gets CONFIG_RTC_0_NAME from device tree.
So we need a fixup for KW41Z for that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-21 14:06:57 -05:00
Maureen Helm
b5db62ca94 frdm_kl25z: Remove incorrect references to spi
The kl25z does not have the same spi hardware as the k64f and therefore
cannot use the same spi driver. Remove all references to spi for the
kl25z soc and frdm_kl25z board until we have a valid spi driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-21 13:26:10 -05:00
Spoorthi K
c182520ee1 tests: kernel: Add description for test cases
Add description to test cases in tests/kernel/mem_heap,
    tests/kernel/mem_slab and tests/kernel/mem_pool

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-05-21 11:23:09 -04:00
Maureen Helm
e7509c17c5 release: Move version to 1.12.0-rc1
Updates the VERSION file to 1.12.0-rc1

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-19 13:30:25 -05:00
Alexander Wachter
2de9f2f8fd samples: can: Add example code for CAN driver
This adds example and testing code for CAN driver.
Tested on stm32f072b disco.
Examples are given for:
- can_configure
- can_attach_isr
- can_attach_msgq
- can_send

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
e73637af24 boards: stm: Add CAN support for stm32f072b micro controller
This commit adds the can device to the stm32f072b device tree and pinmux

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
2976ac351d drivers: can: Add CAN driver support for STM32
This commit adds low level driver support for STM32 micro controllers.
It is tested on stm32f072b in loopback and normal mode.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
50f8296baa drivers: can: Add dts bindings for CAN
This commit adds generic device tree bindings for can devices.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
d3101b1fa4 drivers: can: Add syscall handlers for CAN API
This commit adds generic syscall handlers for the CAN API

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
023e4518f2 drivers: can: Add Kconfig for CAN driver
This commit adds the Kconfig for generic CAN drivers.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Alexander Wachter
9e12807a6b API: can: Add API for Controller Area Network driver
This API defines following calls

- can_configure
- can_send
- can_attach_isr
- can_attach_msgq
- can_detach

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Kristian Klomsten Skordal
5eb882980d sample: add OpenAMP sample application
This commit adds a sample application using OpenAMP for remote procedure
calls on the LPCXpresso54114. It is adapted from the RPMsg-Lite sample
application added in PR #5960, and uses the IPM driver to provide
interprocessor interrupts.

Signed-off-by: Kristian Klomsten Skordal <kristian.skordal@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-19 12:56:36 -05:00
Kumar Gala
17b64bafae ext: Import OpenAMP for IPC
Origin:
   https://github.com/OpenAMP/open-amp

Status:
   de361adee09cd31793c60218a0ec49bc307a7410 [v2018.04]

   When we import open-amp we removed the apps dir to reduce the amount
   of code imported.

Purpose:
   IPC layer that implements rpmsg communication between cores.

Description:

This repository is the home for the Open Asymmetric Multi Processing
(OpenAMP) framework project. The OpenAMP framework provides software
components that enable development of software applications for
Asymmetric Multiprocessing (AMP) systems. The framework provides the
following key capabilities.

* Provides Life Cycle Management, and Inter Processor Communication
  capabilities for management of remote compute resources and their
  associated software contexts.
* Provides a stand alone library usable with RTOS and Baremetal software
  environments
* Compatibility with upstream Linux remoteproc and rpmsg components
* Following AMP configurations supported:
  a. Linux master/Generic(Baremetal) remote
  b. Generic(Baremetal) master/Linux remote
* Proxy infrastructure and supplied demos showcase ability of proxy on
  master to handle printf, scanf, open, close, read, write calls from
  Bare metal based remote contexts.

Dependencies:
   libmetal (https://github.com/OpenAMP/libmetal) - provides HAL layer
   between OpenAMP and RTOS or OS environment.

URL:
   https://github.com/OpenAMP/open-amp/

commit:
   de361adee09cd31793c60218a0ec49bc307a7410

Maintained-by:
   External

License:
   BSD-3-Clause
   BSD-2-Clause

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-19 12:56:36 -05:00
Kumar Gala
3ddfd1714e ext: Import libmetal for IPC/open-amp
Origin:
   https://github.com/OpenAMP/libmetal

Status:
   606c31438025b9fb1515dace1c642d5835d8d33c [v2018.04]

   When we import libmetal we removed the tests/ and examples/ dir to
   reduce the amount of code imported.

Purpose:
   HAL abstraction layer used by open-amp

Description:
   Libmetal provides common user APIs to access devices, handle device
   interrupts and request memory across the following operating
   environments:

   * Linux user space (based on UIO and VFIO support in the kernel)
   * RTOS (with and without virtual memory)
   * Bare-metal environments

Dependencies:
   Depends on Zephyr itself as it utilizes Zephyr's APIs to provide an
   abstraction to open-amp.

URL:
   https://github.com/OpenAMP/libmetal

commit:
   606c31438025b9fb1515dace1c642d5835d8d33c

Maintained-by:
   External

License:
   BSD-3-Clause

License Link:
   https://github.com/OpenAMP/libmetal/blob/master/LICENSE.md

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-19 12:56:36 -05:00
Ulf Magnusson
aa26289458 kconfig: Get rid of leading/trailing whitespace in prompts
Leading/trailing whitespace in prompts requires ugly workarounds in
genrest.py, as e.g. *prompt * is invalid RST. strip() all prompts in
Kconfiglib and get rid of the genrest.py workarounds. Add a warning too.

The Kconfiglib update has some unrelated cleanups and fixes (that won't
affect Zephyr).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-19 09:26:39 +03:00
David B. Kinder
f93ca23765 doc: mark bt_test_cb API as not documented
add a comment so the script for checking undocumented defgroups doesn't
report this internal API as not documented

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:23:10 +03:00
David B. Kinder
ef927a87ec doc: fix missing networking API documentation
Inspired by #7666, I scanned for other doxygen defgroups that weren't
mention in the documentation and found these:

   vlan  (defined in net/ethernet_vlan.h)
   ieee802154_mgmt  (defined in net/ieee802154_mgmt.h)
   ethernet_mgmt  (defined in net/ethernet_mgmt.h)

Added these to networking .rst, and also added one more level to the
toctree directive to show these nested groups in the table of contents.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:22:40 +03:00
David B. Kinder
d1d0dd45ed doc: fix missing NVS API documentation
Sphinx only displays API documentation for items within the specified
doxygen defgroup, and importantly, not the subgroups of this defgroup.

If you define a defgroup with defgroup children, you need to tell Sphinx
to display API information about the child defgroups too.  (If the
parent defgroup has no entities of it's own, you can leave that out.)

This patch replaces the (empty) display of the parent defgroup with that
of its two child defgroups.

It also fixes an unnecessarily long text line while I was in there.

Fixes: #7666

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:22:14 +03:00
Marti Bolivar
38e8f06fdb scripts: west: add context-sensitive runner help
Though commands like "west flash -h" now have help for generic runner
configuration options, runner-specific context is not printed.

In order to print this information, we would ideally want to know the
currently available runners from a build directory. Otherwise, we
can't print the current cached configuration, and the user will likely
be overwhelmed by a giant list of options etc. available for all the
runners in the package.

However, we can't print that information out without re-doing the
build, which is not safe to do when the user just gives '--help'.

To provide more complete help without causing side effects in the
default help output, add a new -H/--context option, which explicitly
re-runs the build (unless --skip-rebuild was given), parses the cache,
and prints context-sensitive help. This can be combined with the -r
option to restrict help to a particular runner.

Examples:

- Print context for all available flash runners:

      west flash -H --build-dir build-frdm_k64f/

- Print context for just one runner:

      west flash -H --build-dir build-frdm_k64f/ -r jlink

- Print context for all available debug runners, if current
  working directory is a build directory:

      west debug -H

If no context is available because there is no CMake cache file, this
command can still be used to obtain generic information about
runners. It emits a warning in this case.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00
Marti Bolivar
68e5933e97 scripts: west: add build directory to runner configuration
Add the build directory to the central runner configuration.
This is commonly useful information.

The first place we can use it is to eliminate guessing the current
working directory when building objects to parse .config.

It's not necessary to modify the build system for this, so leave the
relevant command line flag among the general options.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00