Commit graph

41120 commits

Author SHA1 Message Date
Johan Hedberg
5a8b143028 Bluetooth: host: Fix command buffer corruption
A recent patch increased struct cmd_data from 8 to 12 bytes, which is
more than the default user data for Bluetooth. We generally don't want
the core stack to require more than 8, so instead of increasing the
requirement, move the data out from the buffer into its own array with
the help of the net_buf_id() API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-11-26 16:08:00 +02:00
Peter Bigot
e563c3d89b usb: dfu: default progressive erase on Nordic
The instructions for samples/usb/dfu fail on Nordic platforms if the
erase is not progressive.  Default to enable that on Nordic.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-26 08:25:02 -05:00
Peter Bigot
4592ac8ca4 drivers: timer: nrf_rtc_timer: fix lost ticks from unannounced elapsed
The original code assumed that limiting the tick count to the maximum
cycle value representable without wrapping would guarantee that adding
the resulting cycle offset to last_count would not lap the counter.
This is not true when elapsed time, which is also added to the cycle
offset, exceeds one tick.  Cap the maximum offset at the number of
cycles corresponding to the maximum number of ticks without wrapping.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-26 08:23:50 -05:00
Ravi kumar Veeramally
bb40f9b0cd samples: net: Fix WS client Coverity issue
Close the socket and return the error.

Fixes #20508
Coverity CID :205634

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-11-26 08:22:35 -05:00
Ravi kumar Veeramally
434a92e48f tests: net: Fix CoAP coverity issues
Fix unintended sign extension (SIGN_EXTENSION).

The result of "coap_block_size_to_bytes() * (iter - 1)"
extending the sign type.

Issue is the conversion of iter from u8_t to int because it's
an unsigned operand in an binary subtraction with 1 which is
a signed operand with higher conversion rank (int).

Fixes #20880
Fixes #20881
Fixes #20882
Fixes #20883

Coverity CID :205780
Coverity CID :205786
Coverity CID :205806
Coverity CID :205808

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-11-26 13:35:20 +01:00
David B. Kinder
f0b97ec568 doc: fix redirect for getting started guide
Redirect link in conf.py was misspelled

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-26 11:39:52 +01:00
Vikrant More
459e05b103 samples: mesh: nrf52: corrected & improved transition implementation
Corrected & improved transition implementation so that
no_transition_work thread will not get triggered twice at the
end of transition.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More
c7f83f3865 samples: mesh: nrf52: improved comment
Improved comment content.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More
cbd0d6e847 samples: mesh: nrf52: added some Kconfig
Added some Kconfig which could help to improve Mesh
performance or Debugging.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Vikrant More
aab640698b samples: mesh: nrf52: considered delay even in case of inst. transition
User can set transition time as Zero & delay as non-zero value.
In that case, we have to depend upon timer.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2019-11-26 11:03:23 +02:00
Mieszko Mierunski
21e0d48750 drivers: nrf: Fix UART and UARTE hanging on RX errors
Add clearing error event to UART and UARTE drivers.
Without it driver goes into infinite interrupt loop.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-11-26 09:01:22 +01:00
Alex Li
198013ad9f Bluetooth: Fix BT log level config won't take effect
BT log module should be registered as user configured level,
instead of using default log level

Signed-off-by: Alex Li <lizhiqin46783937@live.com>
2019-11-26 09:11:06 +02:00
Anas Nashif
9091a0103d sanitycheck: fix parsting tests from source files
Fixed bug in parsing testnames from source files. We added 1cpu testing
but did not update the regex and we have been passing wrong path to the
glob as well, meaning tests were not parsed at all.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Anas Nashif
b846c9a53d sanitycheck: enabling coverage should not imply --enable-slow
Those are two unrelated options.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Anas Nashif
83a98e5a29 sanitycheck: report results before coverage generation
First report results, then start with coverage processing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Anas Nashif
d11fd78591 sanitycheck: fix --sub-test option
This option was not working, make it work again using the new function
for managing test inventory.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Anas Nashif
19ca7833e5 sanitycheck: add option to print duplicate identifiers
A new option to list all duplicate identifiers. This now will output the
following:

sanitycheck --list-test-duplicates

Tests with duplicate identifiers:
- arch.interrupt
  - tests/arch/arm/arm_interrupt/arch.interrupt
  - tests/kernel/interrupt/arch.interrupt
- system.settings.nffs.config_empty_lookups
  - tests/subsys/settings/nffs/base64/system.settings.nffs
  - tests/subsys/settings/nffs/raw/system.settings.nffs
- system.settings.nffs.config_insert
  - tests/subsys/settings/nffs/base64/system.settings.nffs
  - tests/subsys/settings/nffs/raw/system.settings.nffs
- system.settings.nffs.config_getset_unknown
  - tests/subsys/settings/nffs/base64/system.settings.nffs
  - tests/subsys/settings/nffs/raw/system.settings.nffs
- system.settings.nffs.config_getset_int
  - tests/subsys/settings/nffs/base64/system.settings.nffs
  - tests/subsys/settings/nffs/raw/system.settings.nffs
..
..
..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Anas Nashif
eabaa7f8bf sanitycheck: cleanup test inventory
Cleanup how we list testcases with --list-tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-25 21:43:22 -05:00
Andy Ross
b2435d856a tests/kernel/threads/thread_apis: Add k_thread_suspend() edge cases
Add test cases to make sure that a thread that suspends itself stops
executing immediately, and that a thread suspended while sleeping does
not wake up unexpectedly when its timeout expires.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-25 19:12:05 -05:00
Andy Ross
50d0942f5e kernel/thread: Cancel timeouts on k_thread_suspend(), make schedule point
When suspending a thread, cancel any pending timeouts which might wake
it up unexpectedly.  Also, make suspending the current thread
(specifically) a schedule point, as callers are clearly going to
expect that to be synchronous.

Also fix a documentation weirdness.  The phrasing in the earlier docs
for k_thread_suspend() was confusing: it could be interpreted as
either document the current (essentially buggy) behavior that threads
will "wake up" due to preexisting timeouts, OR to mean that thread
timeouts will continue to be tracked so that resuming a thread that
was sleeping will continue to sleep until the timeout (something that
has never been implemented: k_sleep() is implemented on top of
suspend).  Rewrite to document what we actually implement.

Fixes #20033

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-25 19:12:05 -05:00
Alberto Escolar Piedras
77006e896b tests: metaIRQ: Ensure counts are not changing in assert evaluation
Coverity's analysis is not happy about using a volatile variable
in an assert, even if the assert is not optionally compiled in.
Avoid the issue by loading the value in an automatic varible before
using it in the assert.

CID: 206016
CID: 206018
CID: 206019
CID: 206021
Fixes: #20968
Fixes: #20966
Fixes: #20965
Fixes: #20963

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-25 16:50:04 -05:00
Alexander Wachter
7e5acf5f2c doc: Add CAN related changes
Add notes about CAN related changes for this release.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2019-11-25 17:37:30 +01:00
Joakim Andersson
0bf9931c2c Bluetooth: Host: Fix create connection fails to stop scanner
Fix race condition in bt_conn_create_le for the state of the scanner in
the Host. This leads to the host issuing a create connection command
without stopping the scanner first. This leads to command disallowed and
failing to establish connection. As well as inconsistent state in the
host which does not allow to stop the running scanner.

The race condition exists because the processing of le_adv_report
handler is done before the thread that called bt_conn_create_le was
woken up to continue after the command_complete event.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-11-25 17:21:17 +01:00
Peter Bigot
57c635587f sanitycheck: remove serial port assignment from unconnected devices
When storing an updated hardware list remove the serial property value
from entries that are not connected, to reduce confusion about exactly
what ttyACM0 is connected to.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-25 07:52:23 -05:00
Peter Bigot
3d46ea5946 sanitycheck: summarize device testing targets before starting
Confirm to the user what devices were found and where they are before
starting a long run that might not have found everything it was supposed
to test.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-25 07:52:23 -05:00
Peter Bigot
da7384846e sanitycheck: allow device runner board-id to differ from board id
Boards like mimxrt1060_evk are recognized by the scanner through their
USB device which has an ID, but in some cases the board may be
programmed using an external J-Link probe.  Support this by adding a
probe_id key that can be added to the yaml dictionary to override the
use of id for this purpose.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-25 07:52:23 -05:00
Peter Bigot
52356ebde4 sanitycheck: recognize more hardware
Add manufacturer and product identifiers to produce board information
for SiLabs and NXP hardware when using --generate-hardware-map.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-25 07:52:23 -05:00
Daniel Leung
68729ad3f8 dts: tell compiler the name of dependency file for output
When generating the dependency file for DTS (${BOARD}.dts.pre.d),
some toolchains would use the source file for the file name stem.
So, the resulting dependency file is empty_file.d instead of one
with the board name. Fix this by passing -MF to explicitly tell
the compiler the name of the dependency file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-11-25 07:43:52 -05:00
peng1 chen
d22e91b61a up_squared: config the flash runner.
set the flash runner of up squared board using misc-flasher.

Signed-off-by: peng1 chen <peng1.chen@intel.com>
2019-11-24 23:56:02 -05:00
Christian Taedcke
c415a4ef2d sanitycheck: Fix --enable-coverage option
This commit fixes the issue, that --enable-coverage alone did not create
coverage information. It also required to give --coverage-platform.
Now the fallback for coverage-platform to platform works as documented
also for enable-coverage, not only for coverage option.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2019-11-24 11:54:16 -05:00
Anas Nashif
19d67e4cd2 sanitycheck: support on windows
We now support building on windows. Running in Qemu still does not work.

Partially addresses #2664

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-24 07:49:44 -05:00
David B. Kinder
0a0c34fe77 doc: add recent documentation writing features
We've added some new capabilities for documentation writers such as the
tabbed interface and numbered instruction steps, as used in the updated
Getting Started Guide.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-24 13:32:49 +01:00
Stephanos Ioannidis
7aa2355af2 arch: arm: Add Cortex-R release notes for Zephyr v2.1.
Adding Cortex-R release notes for the Zephyr v2.1.0 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-22 16:09:49 -05:00
Ioannis Glaropoulos
c1d53b62fd arch: arm: release notes section for Zephyr v2.1 (Cortex-M)
Adding a release notes section for the ARM Cortex-M
architecture, to be part of the Zephyr v2.1.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 16:09:49 -05:00
Erwan Gouriou
0272b9dc5f boards: shields: Release notes section for Zephyr v2.1
Add shields sections update for v2.1 release notes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-22 16:08:57 -05:00
Erwan Gouriou
d0f92d3f5b soc: arm: release not section for Zephyr 2.1 (stm32)
Update v2.1 release notes section with STM32 SoCs status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-22 16:08:57 -05:00
Dominik Ermel
0449c672bc tests: settings: Test setting FS back-end using Littlefs
The commit ports settings tests that use NFFS to use Littlefs.

GH Issue #18341

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2019-11-22 21:24:10 +01:00
Ravi kumar Veeramally
94e048559c tests: net: Fix TCP tests Coverity issue
Check return values of function.

Fixes #20540
Coverity CID :205656

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-11-22 10:01:23 -05:00
Laczen JMS
46061a8a0f subsys/fs: nvs Coverty CID205795 & CID205803 corrections
In nvs writing addresses are u32_t. Coverty reports two situations
where the address could be converted (unwanted) to a signed value.
Both have been corrected.

There is however a general problem with flash API where the addresses
are defined as off_t which is a s32_t. These are converted in the flash
hal to u32_t. As a result of this only half of the possible range can
be used.

Solves #20867 and #20866

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-11-22 09:59:32 -05:00
David B. Kinder
3d6c4b18b6 doc: tweak CSS for responsive table display
Noticed that <p> within a responsive table (as found in the kconfig docs
generated by the new genrest.py script in PR #20322) weren't displaying
using the same font size as table cells without <p> content. This
situation occurs when the help text in the Kconfig file is more than one
paragraph.

Also added a comment explaining why a previous CSS tweak was added.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-22 15:44:05 +01:00
Armando Visconti
75d21c1513 board/shields: x-nucleo-iks01a3: (FIX) use INT2 for LSM6DSO DRDY
On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.

This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.

Fixes: #20933

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-11-22 15:40:30 +01:00
Ioannis Glaropoulos
03ae58490c boards: arm: add new boards into v2.1 release notes
Add a section in the v2.1 release notes listing
the newly added ARM boards.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 07:43:51 -05:00
Alberto Escolar Piedras
c9cadaeade doc: Add native_posix information to 2.1 release note
Contains major POSIX arch and native_posix changes between
2.0 and 2.1 releases

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-22 07:42:42 -05:00
Ioannis Glaropoulos
98201228ee arch: enable MPU Gap filling by default in build without user mode
When we build without support for user mode, we do not need
a large number of MPU regions, so we should not allow having
MPU_GAP_FILLING unset. This would allow PRIV code execute from
SRAM, which is an unnecessary compromise on ARMv8-M builds
without USERSPACE support. We update the Kconfig dependencies
and add a sentence for clarification.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 11:36:59 +01:00
Ioannis Glaropoulos
32514d0441 boards: arm: mps2_an521: enable testing on mps2_an521 by default
mps2_an521 is the default board for ARMv8-M architecture with
support for Security Extension, and CI should test building and
running samples and tests on this board by default. As the focus
is on kernel, userspace, and arm test suites, certain tags are
set to be ignored when testing on this platform.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 11:36:59 +01:00
Henrik Brix Andersen
71adcf9ff4 doc: release notes: mention EEPROM API and drivers in release notes
Mention the new EEPROM device driver API and drivers in the release
notes for v2.1.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-22 10:55:38 +01:00
Vinayak Kariappa Chettimada
430df927b0 Bluetooth: controller: split: Fix aborting of connection req PDU
Fix the initiator so that connection request PDU is not abort
mid-air by preemption by the overalapping first connection
event.

If the connection establishment is in progress, then the
first connection event trying to abort the initiator will
wait the connection request to be transmited completely.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-22 08:40:41 +01:00
Vinayak Kariappa Chettimada
d5314b8387 Bluetooth: controller: split: Add missing BT_DEBUG_ENABLED define
Add missing BT_DEBUG_ENABLED definitions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-21 17:08:37 +01:00
Vinayak Kariappa Chettimada
2993b1ec0a Bluetooth: controller: legacy: Add missing BT_DEBUG_ENABLED define
Add missing BT_DEBUG_ENABLED definitions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-21 17:08:37 +01:00
Vinayak Kariappa Chettimada
83d6e5d3d4 Bluetooth: controller: Add missing BT_DEBUG_ENABLED define
Add missing BT_DEBUG_ENABLED definitions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-21 17:08:37 +01:00