Commit graph

41120 commits

Author SHA1 Message Date
Marti Bolivar
9802f883f5 doc: rewrite extract_content.py for better input/output tracking
Separate the phases of creating the list of outputs (and output
directories) from the actual creation of these outputs. This lays the
groundwork for just printing the inputs and outputs in a subsequent
patch, enabling CMake to track dependencies properly.

In the now-separate output generation phase, use shutil.copy2() to
preserve metadata like access and modification times when possible,
rather than re-reading every file and seeing if the contents are
different. This has the same semantics but is clearer and potentially
more efficient, as the initial copies have more accurate relative
timestamps.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
0d4ca68051 doc: clean up extract_content.py use of environment variables
Minor cleanups:

- Allow the user to run extract.content.py -h with ZEPHYR_BASE unset
  without crashing
- Replace the use of the ZEPHYR_BUILD environment variable with an
  --ignore argument (that can be given multiple times) which specifies
  a path to a directory whose files should *not* be copied, and use
  it to ignore the build directory
- rename, reorder, and tweak get_files() arguments a bit to go from
  source to dest, with extra configuration at the end, getting rid of
  local shadowing of global built-in functions

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
5336f30def doc: make extract_content.py flake8 clean
Address flake8's complaints.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
e3eb8e776a .gitignore: only ignore build directories
The "build*" pattern is ignoring any file that begins with
"build". Add a trailing "/" to limit the effect of the pattern
to directories.

This continues to ignore build directories, but allows adding files
whose names begin with build, which will be used later to create a
build.rst file for documenting west's build command.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Gil Pitney
00895795fa net: Fix assert on net_if_api send for NET_OFFLOAD drivers.
Recently, the wifi net offload driver has been asserting
as init_iface() was checking for api->send != NULL, even in
the case of NET_OFFLOAD

This patch suggests a fix to handle the NET_OFFLOAD case.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-12 09:58:16 +03:00
Vinayak Kariappa Chettimada
ae8649c5ec Bluetooth: controller: Fix connection failed to be established
Fix connection failed to be established regression
introduced by the commit 350c569aba ("Bluetooth:
controller: Avoid offseting to lldata").

As the Rx-ed PDU buffer is re-used to construct the
connection complete message towards HCI, the fields in the
Rx-ed PDU need to be backup for future use in the control
path. Here the channel selection bit is backup now.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-10-11 20:50:44 +02:00
Daniel Leung
6ba4488c7c linker: more .rel for orphan sections
There are sections defined in common-rom/ram.ld where they are
showing up as orphan sections. So add these as known sections.

Fixes #10493

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-10-11 14:50:23 -04:00
Armando Visconti
770197925b board: 96b_argonkey: Add on-board MP34DT05 microphone support in BSP
This commit is taking care of following stuff:

1. pinmux: STM32F4 micro is using I2S5_CK and I2S_SD to interface with
   on-board microphone.

2. default configuration:
     - enable I2S5 and configure PLLI2S properly to generate
       I2SxCLK = 128MHz.
     - enable DMA

Note:
 As stated in issue #9028 we needed to take care of a known SPI/I2S bug
 implementing the following two actions:

 A. APB2 clock has been slowed down to 42MHz.
 B. The SPI/I2S clock gpio speed has been set to very_high_speed.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 14:46:56 -04:00
Andrei Emeltchenko
cfa04c318e netusb: Remove ifdef registration for functions
netusb functions are now registered when interface is selected or
configured.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Andrei Emeltchenko
216b1457ed netusb: Move init() to separate functions
Move init() invocation to function code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Andrei Emeltchenko
91fc0bcd50 netusb: Register each function
Register each function found in the linker USB data cfg section.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Andrei Emeltchenko
6b3c096a95 netusb: Refactor RNDIS code
Move RNDIS functionality from netusb to function_rndis.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Andrei Emeltchenko
0db9062cdb netusb: Refactor EEM code
Move EEM functionality from netusb to function_eem.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Andrei Emeltchenko
fd1ac0f209 netusb: Refactor ECM code
Move ECM functionality from netusb to function_ecm making defines not
needed in many cases.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-11 14:45:26 -04:00
Jukka Rissanen
2c69edc149 net: Remove obsolete config options from samples and tests
Removed obsolete CONFIG_SYS_LOG_* and CONFIG_NET_DEBUG_* options
from various sample and test applications.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-11 14:44:14 -04:00
Jukka Rissanen
bdbf551e8a samples: net: coap_client: Remove obsolete prj_bt.conf file
The conf file contained obsolete config options and it was
not really used. Cleaned also the sample.yaml file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-11 14:44:14 -04:00
Vinayak Kariappa Chettimada
a11868fea9 Bluetooth: controller: Fix conn param req procedure response
Fix Connection Parameter Request Procedure implementation
to respond with sent interval_min and interval_max so that
certain peer devices dont reject the response as Invalid LL
Parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-10-11 20:30:02 +02:00
Jun Li
08d5c5ef1d soc: stm32f4: enable dma options for soc
Enable "CONFIG_DMA_STM32F4X" when "CONFIG_DMA" is enabled.

Signed-off-by: Jun Li <jun.r.li@intel.com>
2018-10-11 12:58:30 -05:00
Armando Visconti
7b82e9f2d0 drivers: i2s: Add support for I2S stm32
STM32 I2S driver implementation. It has been designed in the most
generic way possible, with the possibility of using it in master/slave
and rx/tx mode. Currenty it has been tested for master rx mode only
using the microphone on ArgonKey board.

The configuration file permits to compile it for STM32F4xx product
family only, but it should be easy to extend it also for other
families.

It supports all 5 STM32F4xx I2S controllers (I2S 1/4/5 on APB2 and
I2S 2/3 on APB1).
It makes uses of the available DMA channels for rx/tx streams.

The clock source can be selected among one of the following two choices:

  - PLLI2S pll, with possibility to configure PLLM/PLLN/PLLR
  - HSE/HSI clock

Interrupt is triggered only in case of errors (FRM/OVR/UDR).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 16:55:00 +02:00
Armando Visconti
31f2e81e10 soc/arm/stm32f4xx: Add I2S defines to dts.fixup
For the stm32f4xx family the SPI and I2S are sharing same
controller, so we can reuse same definitions.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 16:55:00 +02:00
Armando Visconti
ab10f417d8 dts/arm/st/stm32f4: Add I2S support to DTS
Add I2S bus initial support to stm32f4 SOC family.
On stm32f4 the I2S shares same controller as SPI, so
the declarations have been adapted from SPI ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 16:55:00 +02:00
Armando Visconti
411dc003ee arch: arm: soc: stm32f4xx: Add LL include file also for I2S case
stm32f4xx_ll_spi.h include file is shared between I2S and SPI
(controller is same). So we need to include it even when I2S_STM32
is enabled.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 16:55:00 +02:00
Anas Nashif
a3be0945fe west: runner: fix naming and paths to xt-ocd
Fix naming of boards supported by this runner.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04:00
Anas Nashif
98da95571a intel_1000_crb: fix path to xt-ocd
Capitilised Tensilica is not what we have in the documentation. should
be /opt/tensilica.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04:00
Anas Nashif
1e788a5142 boards: intel_s1000_crb: polish docs
Few structure changes and use CRB in the name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04:00
Anas Nashif
b5a51f8b01 tests: s1000: rename board
Instead of Intel_S1000, use correct name "Intel S1000 CRB"

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-11 10:49:56 -04:00
Erwan Gouriou
76cba5d5ea scripts: cleanup unwanted updstreamed file
scripts/dts_sanity/edts_ref.json_save has been pushed by error
in commmit a429104095
Clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-10-11 09:24:02 -05:00
Adithya Baglody
4f78d86eb7 arch: arm: linker.ld: Fixed incorrect placement of noinit section
This was causing an incorrect hash for privileged stack.

Fixes: GH-10473
Fixes: GH-10474
Fixes: GH-10475
Fixes: GH-10476

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-10-11 09:56:37 -04:00
Jukka Rissanen
fd25c8b59b net: wifi: Allow mgmt interface to compile if not offloaded
Even if we do not have wifi network offloading enabled, allow the
application to be compiled just fine. This allows easier
testing of the application even if the board does not support
wifi offloading.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-11 16:28:55 +03:00
Kumar Gala
011b93011e dts: yaml: remove unused id field
The 'id' field was never used and tended to just have the compat of the
node.  Lets remove it and removed some code in extract_dts_includes.py
related to it.  Added a warning if 'id' is set in a yaml so we can
remove it going forward.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-11 08:03:44 -05:00
Gil Pitney
0633a1c294 drivers: wifi: simplelink: More fixes after logging update
Previously, '\n' in LOG_DBG statements were added to
improve readability, by ensuring IP address weren't printed
across typical console terminal line boundaries.

But with the logging updates, '\n' is no longer
getting automatically expanded to \r\n, and a new timestamp
is automatically added, throwing off attempts at alignment.

This patch finally just removes the '\n''s from the log messages,
and cuts a few longer messages into separate messages.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-11 15:51:57 +03:00
Gil Pitney
ab09674e4c samples: net: include sockets echo sample build in cc3220sf sanitycheck
Previously, wifi-enabled samples were not built by sanitycheck for the
cc3220sf_launchxl.

This patch gets the sockets echo sample to build.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-11 15:51:57 +03:00
Gil Pitney
c2cdbbafd7 net: sockets: Get socket offload to build after net logging overhaul.
Also, defines one LOG_MODULE_NAME for the simplelink WiFi driver, and
uses the same name for all files in this driver (module).

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-11 15:51:57 +03:00
Gil Pitney
7520bb21bc drivers: wifi: simplelink: Move NWP configuration to iface_init
Previously, the NWP (Network Coprocessor) was configured during
simplelink_init().

Since the SimpleLink "FastConnect" feature was added,
meaning an automatic reconnect can occur at this time, this
results in early callbacks into the network stack
before it was fully initialized, resulting in a NULL iface
ptr being sent in as argument.

Now, for safety, the NWP startup is moved later to iface_init,
where it more logically belongs.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-10-11 14:32:48 +03:00
Krzysztof Chruscinski
05b854c168 logging: Postpone log processing when no backends enabled
In initial state of the system it is possible that no backends are
yet enabled and log processing is triggered. In that case logs were
discarded. A flag has been added to the log core to do processing
only if at least one backend is enabled. It is applicable only to
initial phase. If backends are disabled in application lifetime
logs will be discarded.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-11 13:29:50 +03:00
Krzysztof Chruscinski
5f6070e2f7 logging: Add autostart option to LOG_BACKEND_DEFINE
Extended macro to accept flag indicating if given backend must be
initialized and enabled when log subsystem starts. Typically, simple
backends will have autostart flag set. More complex may require
explicit enabling (e.g. shell over BLE can only be enabled when
BLE connection is established).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-11 13:29:50 +03:00
Michael Scott
518444487c logging: init strdup mem_slab with aligned buffer size
We are using a non-32-bit aligned value as the block size
when initializing the strdup mem_slab for Logger.

When the non-aligned pointer is being freed, it's converted
to a u32_t and this generates the following:
***** USAGE FAULT *****
  Unaligned memory access

Let's use the aligned buffer size as the block size instead.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-10-11 13:20:32 +03:00
Jakub Rzeszutko
5b6f6e3ae5 doc: shell: update documentation for shell init procedure
User do not need to initialize shell instance manually now
and this change has been reflected in the documentation.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-11 12:08:04 +02:00
Jakub Rzeszutko
f6197c4f3c shell: create instances automatically basing on enabled backend
If user will enable shell than for each backend shell instance
will be created automatically.

Update all shell examples according to the new initialization
procedure.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-11 12:08:04 +02:00
Ajay Kishore
2a103ea674 tests: add tests to validate interrupt nesting feature
This test is intended to verify the interrupt nesting.
Interrupt nesting feature allows an ISR to be preempted
in mid-execution if a higher priority interrupt is signaled.
The lower priority ISR resumes execution once the higher
priority ISR has completed its processing.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-10-10 19:59:47 -04:00
Praful Swarnakar
963c7a5c64 doc: Add description for harness and its various configs
Document how to use harness and it's various configurations
such as type, regex and fixture that can be used to pick specific
board setup that fulfills external dependency for test case.

Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
2018-10-10 19:11:29 -04:00
Praful Swarnakar
cf89e2883d sanitycheck: Add fixture option for external hardware dependecy
Add a new option as fixture in harness configurations for utilizing
sanitycheck to identify test cases that require external hardware
such as sensor, ble, networking for validation. The config will be
added to yaml files with unique fixture name to identify each hardware
and allow automation to trigger test execution on setup having the
specific fixture enabled. Also, remove the default required for type and
regex configs that is not essential in case of ztest based test cases.

Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
2018-10-10 19:11:29 -04:00
Anas Nashif
6cb52b97fe tests: boards: intel_s1000_crb: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Anas Nashif
e1508ae21f tests: ring_buffer: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Anas Nashif
5f74f142a9 samples: usb: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Anas Nashif
7853c32b81 samples: dfu: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Anas Nashif
6f20aa1aaa samples: olimex_stm32_e407: move to new logger
Move to new logger and use new logger macros/Kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-10 18:32:13 -04:00
Aurelien Jarno
124f5776a7 usb: device: fix the log level of a debug message
When using composite devices, an error is printed during the
initialization:

| [00:00:00.000,000] <err> usb_device: set cb, ep: 0x81
|
| [00:00:00.000,000] <err> usb_device: set cb, ep: 0x1
|
| [00:00:00.000,000] <err> usb_device: set cb, ep: 0x82
|
| [00:00:00.000,000] <err> usb_device: set cb, ep: 0x2

This is actually not an error, but rather a debug message. In addition
it should not contain a new line as it is automatically added by the
logger subsystem.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-10-10 17:48:55 -04:00
Paul Sokolovsky
5955996e7a libc: minimal: fcntl.h: Fix include guards for the current path
The file was moved, but include guards still referred to the old
path.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-10 16:38:13 -04:00
Paul Sokolovsky
7f7bed0eed boards: nios2: altera_max10: Don't force Newlib libc.
Arch nios2 as a whole no longer depends on Newlib, so propagate that
to all boards.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-10-10 16:38:13 -04:00