Commit graph

99553 commits

Author SHA1 Message Date
Marti Bolivar
d4ac7cb948 boards: fix up reel_board Kconfig warnings
When I2C and SPI are not used (such as when building a simple
bootloader for this target), the current Kconfig is generating a fair
bit of warning spew. Clean it up by moving some explicit _defconfig
settings into defaults.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-06 09:58:38 -04:00
Jukka Rissanen
42a23e2b83 net: gptp: Set stack size correctly for handler thread
The gptp stack size was not properly set, one must use
the K_THREAD_STACK_SIZEOF() macro to calculate stack size.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-09-06 09:56:51 -04:00
Paul Sokolovsky
5cd3e5905f CODEOWNERS: Add @pfalcon for drivers/ethernet/
As I'm a reviewer for net/ip/, be sure to review also changes to
drivers/ethernet/, as that's closely related to the IP stack.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-09-06 08:52:11 -04:00
Anas Nashif
52f82fa2cb doc: esp32: update flashing instructions
Details about using west for flashing instead of relying on environment
variables.

Fix #9389.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-06 08:23:27 -04:00
Sebastian Bøe
19845a7489 cmake: Don't use the environment variable CFLAGS
Some distros set the environment variable CFLAGS, this will
accidentally affect Zephyr builds.

To fix this we clear the environment variable from within the Zephyr
build system for the duration of the CMake execution.

Until now we have been instructing the user to clear it, but it is
easier for the user if we clear it for him.

The same applies to CXXFLAGS.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-09-05 18:40:32 -04:00
Alexander Polleti
f7d32d483f net: fix return type of net_addr_type2str
As we return stuff that is probably in the flash the return type should
be const char * and not char * as the user better doesn't try to change
them!

Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
2018-09-05 18:39:53 -04:00
Daniel Leung
0340d66847 samples: grove: re-add Quark D2000 to sample.yaml
Since we now have a working ADC driver for Quark D2000,
add the whitelist back.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
c1db146b27 Revert "boards: quark_d2000_crb: Remove adc support"
This reverts commit b0d3b560238fac09e63064620de9ff820cf8cc47.

Since we now have a working ADC driver for Quark D2000,
re-add the tag.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
0c55752687 tests/drivers: adc: add config for Quark D2000
Add the configuration block for Quark D2000 for the adc_api
test.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
acc40d990a adc: remove adc_qmsi driver
We now have a native driver for Quark D2000 so the QMSI
one can be removed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
8708611fab adc: add native driver for Quark D2000
This adds a native ADC driver for Quark D2000.

Original: origin

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
ab1b61aa1e drivers: grove/light: change ADC resolution to 12-bit
The driver itself expects the ADC resolution to be 12-bit.
So set it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Daniel Leung
af00501478 drivers: grove/temperature: ADC resolution to be 12-bit
The driver itself expects the ADC resolution to be 12-bit.
So set it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Carles Cufi
618b97fefc doc: Add Bluetooth release notes for 1.13
Add the relevant highlights from the 1.13 development cycle for the
Bluetooth subsystem and its samples.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-05 18:26:06 -04:00
David B. Kinder
41bc9cf012 doc: give nicer error if env not set up
If one forgets to source the zephyr-env.sh script before starting a doc
build (using the top-level Makefile), a long screenful of error messages
go by and you can miss what the actual problem is.

Check if ZEPHYR_BASE is not set and give a nice short error message.

(Updated to a more generic error message in anticipation of #9801
deprecating use of zephyr-env.sh)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 18:24:47 -04:00
Anas Nashif
a9f32d66cf tracing: remove stray event_logger code
Remove obsolete kernel event logger code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-05 16:05:08 -04:00
Adithya Baglody
984ce023cc subsys: random: xoroshiro128: Use entropy get isr during init
Current implementation of the xoroshiro depends on the ISR being
triggered when the interrupts is locked. This patch proposes
implementing the init with entropy_get_isr. This implementation
can be called at PRE_KERNEL_2 stage, even when the interrupts
are locked.

Fixes: GH-8199

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-05 13:04:20 -04:00
Anas Nashif
d3bdc85112 boards: arduino_101: remove mention of boot stub
The stub is used for testing only and is not compatible anymore with the
usage documented here.

Fixed #9772

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-05 12:06:37 -04:00
Carles Cufi
022f9157e8 Bluetooth: mesh: Fix missing semicolon
Fix a missing semicolon at the end of a statement.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-05 10:45:19 -04:00
Vinayak Kariappa Chettimada
67786e3270 usb: device: nrf5: Fix HF clock enable check
Fixed return value check after HF clock is requested in
non-blocking mode.

hci_usb sample on nRF52840 SoC failed to enumerate USB
device on cold reset, the clock_control_on interface would
return -EINPROGRESS when clock is enabled in non-blocking
mode.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-09-05 15:26:18 +02:00
David B. Kinder
13a210355e doc: fix reference to log.h
logger api header file reference was incorrect

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 00:41:58 -04:00
David B. Kinder
5f4cb3fd69 doc: fix reference to props file
Fix reference to misspelled file name in nsim_em documentation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 00:41:40 -04:00
Ravi kumar Veeramally
42c19497b6 samples: net: coap: Remove apps using raw mbedtls APIs
This removes these network sample applications
  samples/net/coaps_client
  samples/net/coaps_server

as they are using low level mbedtls APIs. You should use
preferably socket based or net-app based applications.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-09-04 16:17:37 -04:00
Ulf Magnusson
af6af0fb8a scripts: kconfig: Put a blank line before warnings and errors
Since the warnings generated by this script are so spammy, it can be
difficult to tell where they start and end. Put a blank line before each
one to make it clearer.

Also put blank lines around the non-whitelisted-warning error.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-04 14:28:15 -04:00
Ulf Magnusson
49fa4d5627 scripts: kconfig: Use unique_{defined_syms,choices} and clean up a bit
- Use Kconfig.unique_{defined_syms,choices} to avoid redundant checks
   for symbols/choices defined in multiple locations. These were
   recently added to Kconfiglib.

 - Remove the comment about the alldefconfig starting state. It probably
   isn't useful here.

 - Print the messages about loading configuration files just before they
   are actually loaded. That looks less confusing if one of them fails
   to load.

 - Line-wrap the error message about non-whitelisted warnings.

 - Misc. other minor code cleanup.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-04 14:28:15 -04:00
Sathish Kuttan
c5f04d7c24 arch: xtensa: remove extra #endif
Remove extra #endif that should have been removed when the
corresponding #ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP was
removed in commit a2248782a2

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-09-04 14:27:33 -04:00
Ioannis Glaropoulos
56312cdd19 doc: fix minor typo in clock.rst
Remove redundant "is" in the description of Kernel system clock.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-09-04 11:56:03 -04:00
Ravi kumar Veeramally
005f014ce4 net: ipv6: Initialize memory
Fix accessing uninitialized memory. Fixes coverity issue.

Coverity-CID: 187902
Fixes: #9768

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-09-04 08:10:18 -04:00
Ravi kumar Veeramally
9c605c1711 samples: net: Fix out-of-bound access
Payload variable can hold max 64 bytes but value of size can be more
than that. Memsetting using value of size can overrun payload array.
Fixes coverity issue.

Coverity-CID: 187823
Fixes: #9638

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-09-04 08:10:18 -04:00
Piotr Mienkowski
b68cf999d6 board: efr32_slwstk6061a: add support for flashing via OpenOCD
The version of OpenOCD provided by Zephyr SDK is too old and does not
contain support for EFR32FG1P chip. This patch assumes that user
compiles and installs the newest version of OpenOCD.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-09-03 12:47:26 -04:00
Istvan Bisz
1642c45717 scripts: dts: extract: clock.py fix node alias name
A node alias name should be applied to the all property names.

Before this patch, the alias name is applied erroneously
just for CLOCK_CONTROLLER, skipping the CLOCK_BITS and CLOCK_BUS
property names.

Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
2018-09-03 12:46:44 -04:00
Praful Swarnakar
bbad5c3fad lib: cmsis_rtos_v1: Minor refactor of CMSIS implemetation
Add few missing NULL checks to avoid crash. Also, minor
refactor of signal code and disable osFeature_Wait to
signify osWait function not implemented.

Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
2018-09-03 12:45:42 -04:00
Adithya Baglody
41a0fb937e tests: benchmarks: timing_info: Fixed userspace benchmarks for nrf52
In NRF52 we need to write to a capture register to retrieve the current
counter value. This was missing for userspace implementation.

Fixes: GH-9676

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-09-03 12:43:07 -04:00
Paul Sokolovsky
9fe831476e doc: relnotes-1.13: Condense/cleanup networking section
Merged closely related items into one bullet point, improve
description of some items, try to sort items a bit better
(that can be further improved).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-09-03 11:43:31 -04:00
Vinayak Kariappa Chettimada
1359992d1a drivers: entropy: nrf5: Fix ENTROPY_BUSYWAIT from hanging
Missing clear pending RNG_IRQn when generating multiple
random numbers caused CPU to hang at __WFE call in the
loop waiting for new value.

This fixes commit ddb7f88f9e ("drivers: entropy: nrf5: Fix
ENTROPY_BUSYWAIT implementation")

Fixes #9523.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-09-03 12:58:40 +02:00
Johan Hedberg
697919c5ba Bluetooth: Mesh: Fix checking for subnet when recovering App Key
The ordering of items in flash is not guaranteed, so it's possible we
get an App Key before the corresponding Net Key. Remove the check for
a Net Key, since the storing code should never store an App Key if
there is no corresponding Net Key.

Fixes #9670

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-09-02 21:44:54 -04:00
Henrik Brix Andersen
be7d2768cb doc: settings: fix inline sample code
Fix a couple of issues in the code examples for the settings
subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-09-02 21:44:33 -04:00
Anas Nashif
3298905bfe xtensa: removed obsolete headers
Went in by mistake in a bad rebase, fixes #9753.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-01 13:58:46 -04:00
Frank Li
4934323931 drivers: eth: enc28j60: Fix read error when ERDPT < ERXRDPT
After read first packet and if ERDPT < ERXRDPT,cause read Rx FIFO error.
The fix is to set ERDPT properly before reading next packet.

Fixed #9537

Signed-off-by: Frank Li <lgl88911@163.com>
2018-08-31 15:46:42 -04:00
Anas Nashif
f2883ec169 tests: rename test entry functions
Be compatible with the rest and enable parsing of sub-cases.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-31 15:11:39 -04:00
Ismael Fillonneau
84908fa2ff doc: kernel: usermode: fix macro name
_SYSCALL_HANDLER macro has not been updated to Z_SYSCALL_HANDLER

Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
2018-08-31 13:53:44 -04:00
Anas Nashif
c8402bc3ce tests: preempt: increase stack size for test
Failed with:

Running test suite suite_preempt
===================================================================
starting test - test_preempt
***** Stack Check Fail! *****
Current thread ID = 0x0040019c
eax: 0x00400254, ebx: 0x00400254, ecx: 0x004002b0, edx: 0x00000001
esi: 0x004001f8, edi: 0x00401080, ebp: 0x00408024, esp: 0x00408000
eflags: 0x00000046 cs: 0x0008
call trace:
eip: 0x00002115
     0x000021b8 (0x40019c)
     0x00002685 (0x4001f8)
     0x00004f65 (0x401120)
     0x00005187 (0x401120)
     0x000051c2 (0x40019c)
     0x000052be (0xffffffff)
     0x00005bab (0x246)
     0x000019c4 (0x400078)
Fatal fault in thread 0x0040019c! Aborting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-31 11:14:39 -04:00
Vinayak Kariappa Chettimada
c7d2734455 kernel: Improve precision of ticks and ms conversions
The following 2 improvements are contained in this patch:

- When converting from ms to ticks, instead of using hardware cycles
  per tick, use hardware cycles per second. This ensures that the
  multiplication is done before the division, increasing precision.
- When converting from ticks to ms, instead of using cycles per tick
  and cycles per sec, use ticks per sec. This too increases the
  precision.

The concept is to make the dividend as large as possible compared to the
divisor in order to lose as little precision as possible.

Fixes #8898
Fixes #9459
Fixes #9466
Fixes #9468

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-31 11:14:39 -04:00
Flavio Ceolin
19b7eaaa65 misc: mempool: Fix bit mask value
SYS_MEM_POOL_KERNEL and SYS_MEM_POOL_USER are used by k_mem_pool flags
and should be defined as a bit mask.

It was defined as zero failing in all places checking for this
bit. e.g pool_irq_lock and pool_irq_unlock were not working correctly
because the check for this flag was always returning false.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-08-30 19:46:28 -04:00
Anas Nashif
8f7990de98 release: Zephyr 1.13rc2
Bump to 1.13rc2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-30 16:15:08 -04:00
Andy Ross
8dcd5f8c77 kernel: Disable tick handling when !MULTITHREADING
The kernel timer subsystem isn't part of the !MULTITHREADING
environment (no threads to wake up, though in principle it should be
possible to support timeout callbacks with some work in the future).
Protect it against platforms that select this but still enable a timer
driver.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-08-30 16:14:50 -04:00
Anas Nashif
af17c195b4 tests: syscalls: ignore faults, they are intentional
We are blowing up the kernel here intentionally, so ignore the faults on
some platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-30 15:05:30 -04:00
Anas Nashif
77837e8107 sanitycheck: do not abort logging on faults
We have been dropping lines after finding a fault which resulted in
missing information in the log. Make sure we continue and only report
failure at the end of the execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-30 15:05:30 -04:00
Anas Nashif
39ae72b4cb sanitycheck: capture delayed faults
Do not close console after PASS is reported, wait a bit for any
remaining messages from the tests, sometimes we have faults that need to
be parsed.
This now works for Qemu handler, support for other handlers to follow.

Fixes #9646

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-30 15:05:30 -04:00
Jukka Rissanen
350026e8c8 doc: Add networking information to 1.13 release note
Contains major networking changes between 1.12 and 1.13 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-08-30 14:28:17 -04:00