Commit graph

41120 commits

Author SHA1 Message Date
Alexander Wachter
c204f70540 net: increase mgmt event stack size
Increase the default mgmt event stack size from 512 to 768 because of
stack overflows.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-09 15:35:41 -04:00
Wayne Ren
1f0fc6d712 arch: arc: fix the bug of nest interrupt handling in int exit
* it's not reliable to use exc_nest_count to decide nest interrupt.
  A better option is to use IRQ_ACT

* ext_nest_count is just used to switch interrupt stack

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-04-09 15:35:17 -04:00
Adithya Baglody
d39e68d6b2 samples: code_relocation: Disable code coverage.
Currently coverage is enabled only in platforms which dont have
multiple memory regions. This sample was designed to emulate
different memory regions. This in conjunction with gcov which
might instrument data in different memory regions will not work
as expected. Therefore disabling gcov for this sample.

Fixes: GH-15107

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-04-09 12:46:24 -04:00
Andrew Boie
9f2188706c samples: remove mem_domain_apis_test
We have actual tests now under tests/kernel/mem_protect/userspace
and tests/kernel/mem_protect/mem_protect that exercise all the
memory domain APIs. This old test is superfluous.

Fixes: #15178

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-09 11:47:28 -04:00
Torsten Rasmussen
ad026c09b1 cmake: modules: using posix path for Kconfig generated file
Fixes: #15289

Kconfig requires posix style path when sourcing other files.
As abspath in python will use native host style, i.e. backslash '\' in
windows this will cause invalid paths in Kconfig generated file and
thus the file will never be loaded.

This commit uses PurePath to convert the path to posix style, ensuring
Kconfig can load the modules.

Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-04-09 16:47:45 +02:00
Anas Nashif
ceca823b59 doc: remove references to IRC
Remove references to IRC and mention Slack instead.

Fixes #15266

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-09 07:53:31 -04:00
Jim Paris
38ecf5b41f shell: Consume all input data
A transport may receive multiple bytes of data between shell_thread
wakeups, but state_collect is only called once per wakeup.  So it must
process all data, and only return when all data from the transport has
been consumed.  This is mostly handled correctly, but there were two
places where state_collect would return early instead.

Signed-off-by: Jim Paris <jim@jtan.com>
2019-04-08 19:38:01 -04:00
Piotr Mienkowski
d38ffedd4d doc: add example of how to build MCUBoot app with west
This commit extends existing documentation by providing an example
of how to build Hello World sample application for MCUboot using
west.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-04-08 19:37:39 -04:00
Anas Nashif
15ca53dbba doc: development process: feature tracking
Add section about adding features and feature tracking.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-08 19:00:12 -04:00
Anas Nashif
7946b88c2d doc: remove outdated and wrong merge-window description
This picture was wrong and outdated describing an old process we used to
have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-08 19:00:12 -04:00
Henrik Brix Andersen
35afc873fe dts: rv32m1_ri5cy: fix comment
Fix a comment in the rv32m1_ri5cy.dtsi file.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-08 16:50:22 -04:00
Andrzej Puzdrowski
bfb7e4531c tests/subsys/settings/fcb: fix unaligned test
Unaligned test might filed in case fcb area was not clen before
run.
The patch insert clean operation before this test.

fixes #15063

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-08 10:50:10 -04:00
Anas Nashif
7f378d6ef8 benchmarks: sched: capture output and evaluate
We were running this as a test and not evluating the output. Now we
verify the output and stop treating this as a ztest item.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-08 10:46:55 -04:00
Cinly Ooi
f874ac72e4 doc: Remove prj_single.conf from README.rst
Removed documentation about prj_single.conf from README.rst
as it is no longer needed and was removed.

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-04-08 10:45:52 -04:00
Jim Paris
7cdfe7f26f Bluetooth: shell: fix build warning if !BT_CENTRAL
Fixes:
  .../zephyr/subsys/bluetooth/shell/bt.c:906:12:
     warning: 'cmd_chan_map' defined but not used [-Wunused-function]

Signed-off-by: Jim Paris <jim@jtan.com>
2019-04-08 12:36:15 +03:00
Anas Nashif
318a98a7fb doc: fix ztest code samples
Remove extra commas and close brackets in code samples.

Fixes #14098

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 12:22:00 -04:00
Anas Nashif
a520266e44 tests: remove unused defaults.tc
This file is not used and was originally added to support TCF hardware
testing. We use harness now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 10:26:27 -04:00
Anas Nashif
f6a163fc5c ci: remove unused script merge_junit.py
This script is now part of ci-tools repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 10:26:27 -04:00
Anas Nashif
073e017c75 tests: use correct kconfig in help message
CONFIG_TEST_HAS_USERSPACE was removed, fix the help the text to reflect
that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 10:26:27 -04:00
Anas Nashif
83ceb4953a net: telnet: remove obsolete code
Remove obsolote telnet console code. We now have a proper shell backend
for telnet.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 10:26:27 -04:00
Johan Hedberg
309b7ff3b4 Bluetooth: Mesh: Update TODO to match current situation
Persistent storage is done. So are the configuration and health
clients. We're also not actively looking to optimize the provisioning
protocol & mesh networking memory usage anymore.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-07 09:39:30 -04:00
Anas Nashif
b01f023d86 drivers: gpio: fix wrong rename of literal
_REG here is not a variable, it is a string in the macro. It should have
not been renamed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:50:43 -04:00
Anas Nashif
3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif
8287f7c855 scripts: remove old xtools config files
Those files are outdated. We now have them as part of the sdk-ng git
repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif
e81fdb83d6 drivers: adc: fix license
This is a leftover license header from when we used a third party
driver that had since been replaced.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Anas Nashif
cfc962bba0 net: kconfig: relicense kconfig file
The license in this file is a leftover from old IP stack. Relicense
it to Apache 2.0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Rajavardhan Gundi
6c6217e8b3 boards: intel_s1000_crb: declare some variables as global
write_buf and flash_content should be defined as global inside
main. Otherwise Python treats them as local variables and ends
up throwing an error because it thinks they are being used
without being defined.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2019-04-06 18:13:10 -04:00
Andrew Boie
9f04c7411d kernel: enforce usage of CONFIG_TEST_USERSPACE
If a test tries to create a user thread, and the platform
suppors user mode, and CONFIG_TEST_USERSPACE has not been
enabled, fail an assertion.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
7b1ee5cf13 tests: CONFIG_TEST_USERSPACE now off by default
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.

Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.

This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.

tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.

Fixes: #15103 (and probably others)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
3b53e69249 tests: bluetooth: tester: workaround build error
For mysterious reasons this test fails cmake if
CONFIG_TEST_USERSPACE=n.

Enable it for now, bug tracked in #15232

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
027b6aaf89 tests: set userspace tag for all tests that use it
This lets us quickly filter tests that exercise userspace
when developing it.

Some tests had a whitelist with qemu_cortex_m3; change
this to mps2_an385, which is the QEMU target with an
MPU enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
ce6b80470d net: add missing syscall for gethostname()
We need all the socket APIs to work from user mode.
tests/net/socket/misc now runs in userspace.

Fixes: #15227

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
1d0369f606 tests: net: getnameinfo: run in user mode
The test is designed to run in user mode, but was disabled
for some reason.

Re-enable, and add mps2_an385 to the whitelist as this is
the QEMU target that emulates an MPU.

Fixes: #15228

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
ad71c2fc44 tests: poll: reduce memory usage
We can re-use thread/stack objects between cases, no
need to have separate ones.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andrew Boie
49d2812f3e arc: fix invalid parameter check
The desired value is 0x24, not 24. Express all these as hex.

Fixes: #15221

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:10 -04:00
Anas Nashif
ed139948a5 license: add missing licences to source code
Add missing license to source code files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-05 23:45:51 -04:00
Andrei Emeltchenko
8ed215e011 usb: usb_dc_stm32: Fix reading invalid EP
Fix crash when reading invalid endpoint found in harness test.

Fixes #13560

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 16:12:46 -04:00
Andrei Emeltchenko
06ef0ca0fc usb: usb_dc_stm32: Add placeholders for missing API
Fix build error when executing sanitycheck on stm32 devices.

Command to execute tests:
sanitycheck --device-testing --device-serial /dev/ttyACM0 -p <board>
    -t usb

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 16:12:46 -04:00
Ravi kumar Veeramally
06159d3bcf net: samples: ipv4_autoconf: Need more buffers for same_70
More buffers are need to build for sam_e70_xplained board
to work out of the box. Added board specific conf file.

Fixes #15096

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-04-05 16:11:37 -04:00
Adithya Baglody
b33dd7ebde tests: benchmark: timing_info: Fixed incorrect results.
The results were incorrect because the timer was firing the
interrupts before the measurement was made.

Fixes: GH-14556

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-04-05 16:10:27 -04:00
Andrew Boie
4e5c093e66 kernel: demote K_THREAD_STACK_BUFFER() to private
This macro is slated for complete removal, as it's not possible
on arches with an MPU stack guard to know the true buffer bounds
without also knowing the runtime state of its associated thread.

As removing this completely would be invasive to where we are
in the 1.14 release, demote to a private kernel Z_ API instead.
The current way that the macro is being used internally will
not cause any undue harm, we just don't want any external code
depending on it.

The final work to remove this (and overhaul stack specification in
general) will take place in 1.15 in the context of #14269

Fixes: #14766

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-05 16:10:02 -04:00
David B. Kinder
b379030724 doc: tweak index and release notes index for 1.14
Update the release notes page to include the 1.14 release notes
(currently a draft in progress), and update the main index page to
clarify how to get to documentation for other Zephyr versions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-05 14:49:19 -04:00
Cinly Ooi
cf22c74405 tests: Removed legacy directory /compliance
Removed as it is no longer needed

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-04-05 09:52:59 -04:00
David B. Kinder
aebed7aada doc: fix misspellings in flashmap.h
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-05 09:51:30 -04:00
Joakim Andersson
fa20ac3693 Bluetooth: controller: Fix assert in raising event during proc collision
The fix done in #14938 introduced a later assert when raising an HCI
event for the procedure that was terminated during the procedure
collision handling. This assert happens because the unknown rsp
has information that is needed when raising the event.
Solve this by copying the scratch packet into the node buffer so that
we keep the data.

Fixes #15183

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-04-05 09:31:22 -04:00
Cinly Ooi
8cce685bbc tests: bluetooth: Improve test case names
Improvement in test case name is needed to make it easier
to navigate from test case name to the actual test
folder.

This is useful as some tools that consume tests directory
will only output test case name without directory names

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-04-05 08:25:33 -04:00
Andrei Emeltchenko
0f03730882 usb: wpanusb: Simplify and cleanup sample
Remove old unused code blocks and simplify initialization.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko
ed97cb7601 usb: wpanusb: Use usb_transfer mechanism
Refactor wpanusb to use usb_transfer().

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko
08da6b261a usb: wpanusb: Fix crash in the sample
Patch 8af3df3519 changed logic and did not take into account 2 extra
bytes.

...
  Precise data bus error
  BFAR Address: 0x766e4900
***** Hardware exception *****
Current thread ID = 0x200004e8
Faulting instruction address = 0xddf4
Fatal fault in thread 0x200004e8! Aborting.
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko
721f3d1cd0 usb: Refactor USB status callback
Merge cb_usb_status_composite and cb_usb_status and use common
forward_status_cb for both composite and normal devices.

Fixes #14882

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00