Commit graph

41120 commits

Author SHA1 Message Date
Andy Ross
8cdbd1cd0b tests/kernel/common: Fix dead code in sflist test
An inverted comparison typo led to the final loop in the sflist being
skipped.  Fix so that it actually runs.

(Odd that it took a static analysis tool to detect this, the loop
expressions are all constants, I'm surprised gcc didn't see it while
doing unrolling analysis).

Fixes #18437

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-08-22 07:07:31 -04:00
Andy Ross
ca82230780 tests/kernel/fp_sharing: Fix static analysis warning
Can't use a volatile variable in something that the tool thinks is an
optional assert, because the read is treated as a side effect.

Fixes #18438
Fixes #18439

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-08-22 07:07:31 -04:00
Jan Van Winkel
d157527ec1 native: Added dummy member to struct _thread_arch
Added dummy member to struct _thread_arch to suppress clang compiler
warning.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-08-22 09:06:00 +02:00
Vincent Wan
0134a7de73 drivers: wifi: simplelink: fix 'log_strdup missing' error messages
Due to commit a211afb041, an error on
missing log_strdup() call is seen when running samples for CC32xx
devices that use the Wi-Fi driver. Adding log_strdup() calls to fix
this.

Fixes #18563

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-08-22 01:44:55 -05:00
Anas Nashif
12438e1047 ext: hal: Make NXP HALs a Zephyr module
Moved to an external repo, https://github.com/zephyrproject-rtos/hal_nxp

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 21:05:23 -04:00
Anas Nashif
975b47132a ext: hal: make microchip HAL a zephyr module
Move Microchip hal to its own git repo:

https://github.com/zephyrproject-rtos/hal_microchip

and use west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 18:45:22 -04:00
Anas Nashif
2804f59d3b ext: hal: make openisa HAL a zephyr module
Maintain this HAL in its own repo:
git@github.com:zephyrproject-rtos/hal_openisa.git

and manage using west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 15:26:22 -04:00
Carles Cufi
cf3af6af5f ext: hal: Make Nordic HALs a Zephyr module
Moved to an external repo,
https://github.com/zephyrproject-rtos/hal_nordic.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-21 14:18:19 -04:00
Anas Nashif
2d9d898cc6 ext: hal: atmel: move atmel HAL to external module
Move the HAL to an external repo to be used with west:

https://github.com/zephyrproject-rtos/hal_atmel

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 14:17:43 -04:00
Anas Nashif
f156e95bbd ext: hal: make TI HAL a zephyr module
Move TI HAL to a module repository:
https://github.com/zephyrproject-rtos/hal_ti

managed by west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 12:46:39 -05:00
Paul Sokolovsky
d479534b90 modules: Kconfig.tls-generic: Remove duplicate "select"
"select MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED" was repeated 2 times
in row.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-21 19:08:15 +02:00
Andy Ross
28fc46ee09 tests/kernel/sched/schedule_api: Fix static analysis volatile warning
We were testing the value of a volatile variable inside a zassert,
which static analysis doesn't like.  In principle, it might be
volatile because it's an MMIO register or something and the read is a
side effect, and an assertion will be optionally compiled.  (Except
here the value is just regular memory marked volatile for
threadsafety, and zassert will never be elided in a test, but the tool
doesn't know that).

Refactor a little so we always read the variable in a way the tool can
detect is consistent.

Fixes #18446

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-08-21 15:53:50 +02:00
Anas Nashif
a47f0a35b9 i2c: remove unused qmsi driver
This driver was used by the sensor subsystem in Arudino 101. Remove as
the board was dropped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 09:52:01 -04:00
Anas Nashif
ab9c528734 gpio: remove unused qmsi driver
This driver was used by the sensor subsystem in Arudino 101. Remove as
the board was dropped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 09:52:01 -04:00
Marc Herbert
a3da6389df tests/ /gen_inc_file: convert 4,5,6,7 enumeration to an interval
It's shorter and may get rid of false Coverity positives 203489 and
203498 and fix #18424 and duplicate #18425.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-08-21 07:27:22 -05:00
Paul Sokolovsky
5b3df8a180 posix: pthread_create: Ignore retval of pthread_mutex_init() calls
pthread_mutex_init() just redirects to Zephyr kernel primitive, for
initializing structure fields. So, use the knowledge that it can't
fail (for as long as structure pointer is initialized, and here it's
from pre-allocated array), and ignore return value of
pthread_mutex_init()

Coverity-CID: 203542
Fixes: #18371

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-21 07:26:59 -05:00
Paul Sokolovsky
e27b0876c3 samples: shell: fs: README: Typo in "pkgconfig" name.
Was "pkconfig", which may confuse users whether some different tool
than the standard pkgconfig is meant.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-20 18:04:21 -04:00
Johan Hedberg
6de5b79f9c Bluetooth: Mesh: Fix discarding messages with many segments
The code for checking space in the Friend queue was faulty in the case
that we receive a message with more segments than the configured Friend
Queue size. This is not an issue for the default configuration but
still a possible one. Move the check for exceeding Friend Queue Size
to the per-LPN function, so that bt_mesh_friend_queue_has_space()
iterates all LPNs before delivering its verdict. This allows us to
return success in case no LPN matched (which is how the code was
intended to work).

Fixes #18522

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-08-20 21:24:09 +03:00
Peter Bigot
aded6a5334 tests: add C++ 17 standard library test
Confirms build (and run) of C++17 applications that make use of STL
containers and other features.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 12:51:16 -05:00
Peter Bigot
96c1b05125 lib/newlib: revert treatment of libc files as system includes
The solution from #14312 of using -isystem to prioritize the position of
the libc directory bypasses the effect of -ffreestanding with respect to
libc symbols expected to be present in a non-hosted environment.

Further, it breaks C++ with the ARM Embedded toolchain as the system
fails to find the right file with #include_next.

Use a more fine-grained solution that explicitly includes the underlying
newlib header required for <inttypes.h> support before moving on to
include the next available one, whether system or non-system.

Closes #17564

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 12:51:16 -05:00
Johann Fischer
bd72ea1df9 samples: mesh_badge: fix font size
The order of the fonts in ROM has changed.
Since the sorting is not wrong, correct the
order in the application.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-08-20 16:18:02 +02:00
Vinayak Kariappa Chettimada
07460176ed Bluetooth: controller: split: Fix control flow issues
This fixes reported Coverity CID 203393 control flow issues.

Fixes #18381.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-08-20 14:17:26 +02:00
Paul Sokolovsky
951b47fab9 net: dns: dns_pack: Revamp FQDN parsing in answers
Simplify algorithm to skip (aka calculate length) of encoded domain
name in a DNS answer. Now it's fully compliant to RFC 1035 regarding
handling of compressed FQDNs. Additionally, bounds checking is now
performed by the parsing code.

Fixes: #18334

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-20 13:39:23 +02:00
Paul Sokolovsky
0bafa7c5ec net: dns: dns_pack: Properly access type and class fields of an answer
These are 16-bit fields, previous code access just least significant
byte of their values.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-20 13:39:23 +02:00
Declan Traill
c313c484a8 Settings: Fix incorrect return of -EINVAL for deleted entries
Fix for Zephyr bug #17415
For settings_line_val_read function with following .conf setting:
CONFIG_SETTINGS_USE_BASE64=y

Signed-off-by: Declan Traill <declan.traill@setec.com.au>
2019-08-20 13:18:38 +02:00
Andrzej Puzdrowski
bf4c969b62 tests/subsys/settings/fcb: deletion test
Add test for check whether deleted entry is recognized properly
after settings reload.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-08-20 13:18:38 +02:00
Peter Bigot
d28e65a784 drivers/timer/nrf_rtc_timer: clarify intent of ZLI compensation
The variable enabling entry to the zero latency interrupt compensation
loop was named generically, and its logic inverted, making the code
difficult to understand.  Change the name and initial value to more
clearly indicate its role.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 08:34:15 +02:00
Peter Bigot
4a470114fa arc: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Remove extern "C" support from files that don't declare objects or
functions.

In arch/arc/arch.h the extern "C" in the including context is left
active during an include to avoid more complex restructuring.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
20bb672266 arch/nios2: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Remove extern "C" support from files that don't declare objects or
functions.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
817f527641 arch/xtensa: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
c315475bb0 arch/common: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
ddf9b144ce soc/arm/nxp*: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Remove extern "C" support from files that don't declare objects or
functions.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
0ddcf49b85 soc/arm/silabs_exx32: clean up use of extern "C"
Remove extern "C" support from files that don't declare symbols subject
to language linkage effects.

Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
ce3f07954a arch/arm: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

In arch.h the extern "C" in the including context is left active during
include of target-specific mpu headers to avoid more complex
restructuring.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
bd87121180 soc/arm/ti_lm3s6965: remove unnecessary extern C block
This header doesn't define any symbols with linkage.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
8101ca8f2c soc/arm/arm: rearrange for standard use of extern "C"
Move the tail include file outside the extern "C" block.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
b3862e93ae soc/arm/xilinx_zynqmp: clean up use of extern "C"
Remove extern "C" support from files that don't declare symbols subject
to language linkage effects.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Peter Bigot
324203f79b arch/x86: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-20 00:49:15 +02:00
Maureen Helm
06f5f48e33 doc: releases: Document major driver changes in 2.0 release note
Documents major driver changes (additions, removals, fixes, etc.) across
all driver families since the 1.14.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-08-19 23:40:05 +02:00
Maureen Helm
3642664aa8 doc: releases: Document boards added/removed in 2.0 release note
Documents all the boards added and removed across all architectures
since the 1.14.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-08-19 23:40:05 +02:00
Peter Bigot
849df51666 lib/libc: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-19 23:36:59 +02:00
Peter Bigot
23fdb4bd2e subsys/debug/tracing: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-19 23:36:59 +02:00
Peter Bigot
4914d0db3b samples/subsys/logging/logger: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-19 23:36:59 +02:00
Peter Bigot
c0d33975d1 subsys/testsuite: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-19 23:36:59 +02:00
Andrew Boie
f31e492440 tests: fatal: increase robustness
We now verify, for every crash, that the expected thread
crashed with the expected reason.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-08-19 15:38:51 -05:00
Kumar Gala
a0a576d384 scripts/dts/gen_defines.py: Fix generation for multiple IO Channels
If there is more than one IO Channel than generate a define with a
trailing index for the IO Channel.  This matches what we do for GPIOs
and PWMs.

So something like:
  DT_FOOBAR_IO_CHANNELS_CONTROLLER_0
  DT_FOOBAR_IO_CHANNELS_CONTROLLER_1
  ...
  DT_FOOBAR_IO_CHANNELS_CONTROLLER_<N>

Fixes #18352

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-19 14:48:44 -05:00
Kumar Gala
e17b8ab991 cmake: Bump min version to 0.10.3
We need SDK version 0.10.3 to fix a build regress on RISC-V when
linking.  So bump the version to pickup that fix.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-19 11:06:55 -05:00
Kumar Gala
13a89cfbe7 doc: sdk: Update docs to use SDK 0.10.3
Update the install docs to reference SDK version 0.10.3

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-19 11:06:55 -05:00
Kumar Gala
59bbf3a521 drivers: espi: espi_mchp_xec: Fix wrong size type for status var
In status variable in espi_pc_isr should have been a 32-bit unsigned int
as ESPI_PC_REGS->PC_STATUS is 32-bits.

Fixes #18359
Coverity-CID: 203521

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-19 17:48:42 +02:00
Trond Einar Snekvik
7d472c3c38 Bluetooth: Mesh: Use define for no prov pdu
Adds a prov PDU type define for cases when no PDU is expected.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-08-19 18:47:41 +03:00