Commit graph

41120 commits

Author SHA1 Message Date
Oleg Zhurakivskyy
86bdab62aa net: tcp2: Support arbitrary length in tcp_win_append()
This change adds a support arbitrary data lengths.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
b0b7b02f2a net: tcp2: Support arbitrary requests in tcp_win_pop()
This change adds a support arbitrary data lengths
for tcp_win_pop().

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
b384355dd9 net: tcp2: Refactor tcp_th()
1. Use tcp_flags() for flags
2. Add len

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
85a69a219d net: tcp2: Refactor tcp_flags()
1. Reduce the internal buffer
2. Eliminate extra string pointer
3. Add a comment on deleting the last comma

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
225dc48d5b net: tcp2: Rename tcp_pkt_received() into tcp_recv()
In order to unify with tcp_send(), rename tcp_pkt_received()
into tcp_recv().

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
2c436740cf net: tp: Rename tcp_recv() into tp_tcp_recv()
In order to avoid naming collision with tcp_recv(),
rename tcp_recv() into tp_tcp_recv().

This function is used by the test protocol.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Oleg Zhurakivskyy
50d7efbdbc net: tp: Add a support for arbitrary payloads in tp_output()
Remove the limitation of a data fitting into the single network buffer.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-01-17 10:24:06 +02:00
Ruslan Mstoi
c2542eacbd drivers: eth: native_posix: Yield to avoid deadlocks in RX
TCP segment with several EOL TCP options causes echo server to block and
use 100% of CPU. This patch fixes that issue by using k_yield to let
also other threads to run.

Fixes #21949

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-01-17 10:02:18 +02:00
Ulf Magnusson
ae900a94d0 tests: net: all: kconfig: Do not assign promptless NET_INIT_PRIO
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

NET_INIT_PRIO (defined in subsys/net/ip/Kconfig) is currently hardcoded
to 90 (it's not set via any Kconfig.defconfig files either). Maybe it
could be given a prompt or be removed, but just remove the assignment
for now.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 10:01:58 +02:00
Ulf Magnusson
8e4a9774f7 tests: net: all: kconfig: Do not assign promptless NET_ROUTING
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

The prompt was removed in commit 2ec7e70509 ("net: routing: Hide routing
option temporarily").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 10:01:43 +02:00
Robert Lubos
bb32e9e3fb samples: net: mqtt_publisher: Remove mqtt_input after mqtt_disconnect
This function call is no longer needed for a proper disconnect.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-16 21:02:28 -05:00
Robert Lubos
504cc436dd net: mqtt: Close the socket right after sending disconnect message
After sending the MQTT disconnect message, no response is expected,
therefore it makes little sense to delay the socket closure.

So far it was expected to call `mqtt_input` function after calling
`mqtt_disconnect` in order to close the socket, which is
counter-intuitive. Simplify this, by closing the socket rightaway
in the `mqtt_disconnect` function.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-16 21:02:28 -05:00
Jan Van Winkel
b6beec9e68 samples: display: Move LVGL sample
Move LVGL sample from samples/gui/lvgl to samples/display/lvgl to have
a unified location for display related samples.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 21:01:41 -05:00
Carles Cufi
6cf7ac77bf Bluetooth: Always use full path to hci_driver.h
The path to include/drivers should not be in the compiler include path
list, only include/. In order to make this possible, always explictly
refer to hci_driver.h via the drivers/bluetooth/ path and not only
bluetooth/.

Fixes #21974.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-01-16 19:20:39 -05:00
Jan Van Winkel
6d0deba1d0 samples: display: Remove ST7789V sample
Remove ST7789V display sample as there is a unified display sample
in samples/drivers/display.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 19:19:45 -05:00
Jan Van Winkel
b912df91cf samples: display: Remove ILI9340 sample
Remove ILI9340 display sample as there is a unified display sample
in samples/drivers/display.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-16 19:19:45 -05:00
Anas Nashif
1342d21fc0 sanitycheck: support runtime artifact cleanup
Using --runtime-artifact-cleanup, the script will now remove all
artifacts of passing tests. This is useful for running sanitycheck on
systems with little disk space.

Fixes #21922

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-16 19:19:07 -05:00
Henrik Brix Andersen
f8acb3f52d boards: frdm_k64f: enable internal temperature sensor
Enable the internal SoC temperature sensor driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
05dca5df04 dts: nxp: k6x: add temperature sensor nodes
Add device tree nodes for the internal temperature sensor in the NXP
Kinetis K6x SoC series.

A temperature sensor node is added for each ADC in the SoC to allow
the user to choose which ADC instance to use for the sensor readings.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
774367b14a soc: nxp: k6x: enable bandgap buffer if temperature sensor is enabled
Enable the bandgap buffer on the NXP Kinetis K6x SoC series Power
Management Controller (PMC) if the internal temperature sensor is in
use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
dc2c04b243 boards: twr_ke18f: enable internal temperature sensor
Enable the internal SoC temperature sensor driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
ca9861f690 dts: nxp: ke1xf: add temperature sensor nodes
Add device tree nodes for the internal temperature sensor in the NXP
Kinetis KE1xF SoC series.

A temperature sensor node is added for each ADC in the SoC to allow
the user to choose which ADC instance to use for the sensor readings.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
fdbb76ff55 drivers: sensor: add driver for the nxp kinetis temperature sensor
Add sensor driver for the internal temperature sensor present in the
NXP Kinetis SoC series.

The driver allows reading the die temperature and the voltage of the
external voltage reference used for calculating the temperature.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen
30e1a7f7c1 dts: bindings: add binding for the NXP Kinetis SoC temperature sensor
Add device tree binding for the internal temperature sensor found on
the NXP Kinetis SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Robert Lubos
b3a1ede830 net: openthread: Use settings subsystem
OpenThread settings implementation built on top of Zepyhr settings
submodule.

With this solution, OpenThread settings are identified with keys of
the following format: `ot/id/instance`, where `id` is assigned by
OpenThread stack, and `instance` is a 32-bit random number, both in
hex. The implementation makes use of `settings_load_subtree_direct`
function to iterate over settings instances. This allows the
OpenThread settings layer to be a fully transparent shim layer between
OpenThread/Zephyr APIs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-16 17:12:47 -06:00
Roland Ma
b0bdf91e11 boards: arm: Add board definition for stm32 nucleo_f767zi
Added board definition additions for stm32 nucleo_f767zi
board.

Signed-off-by: Roland Ma <rolandma@yahoo.com>
2020-01-16 22:51:13 +01:00
Roland Ma
01049b73be dts: arm: st: Add dts and soc additions for stm32 F767ZI board
Added dts additions for stm32 nucleo f767zi board, also added
and modified soc addtions for thet board.
Updated dts reference file name.
Updated yaml to take out adc for now.

Signed-off-by: Roland Ma <rolandma@yahoo.com>
2020-01-16 22:51:13 +01:00
Ulf Magnusson
ba98e72db2 tests: net: all: kconfig: Do not assign promptless NET_RAW_MODE
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is selected by IEEE802154_RAW_MODE, defined in
drivers/ieee802154/Kconfig.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 14:34:41 -05:00
Ulf Magnusson
c935c26819 boards: x86: minnowboard: Do not assign promptless X86_NO_SPECTRE_V4
Assignments to promptless symbols have no effect. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

From looking at
http://www.mouser.com
  /catalog/specsheets/CircuitCO_595-MINNOWMAX-DUAL%20Data%20Sheet.pdf
, this board uses an Intel Atom E3815 or an Intel Atom E3825 CPU.

Both of those CPUs are listed as vulnerable to all three variants of
Meltdown and Spectre in
https://www.techarp.com/guides/complete-meltdown-spectre-cpu-list/6/.

All the X86_NO_SPECTRE_V* symbols default to n (and it seems nothing
turns them on at the moment), so just remove the assignment, which will
be a no-op.

Also remove the comment re. Spectre V4, as it seems this board is
vulnerable to more than that, though I could've missed something.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 14:34:19 -05:00
Siddharth Chandrasekaran
1ab39e7c52 drivers/crypto: mbedTLS_shim add support for CAP_NO_IV_PREFIX
Add support for `CAP_NO_IV_PREFIX` in mbedTLS_shim and advertise this as
one of its capabilities. When this flag is active, the IV passed is
preserved to allow applications to reuse the IV buffer.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-01-16 18:34:20 +01:00
Siddharth Chandrasekaran
0ff77b10e1 crypto: api: New capability flag CAP_NO_IV_PREFIX
Zephyr crypto API currently does not allow IV to be treated as separate
entity. This is mostly due to fact that underlying libraries expect the
IV to be prefixed to the cipher/plain text for performance reasons. But
there are cases where the IV is derived from other sources and not
directly transmitted to the other end. In such cases, it must be treated
as a first class citizen.

This patch adds a new capability flag `CAP_NO_IV_PREFIX` to the crypto
API that allows operations without prefixing the IV to the cipher/plain
text. When `CAP_NO_IV_PREFIX` is active (and supported), the IV passed
to cipher_*_op() must not be modified.

As a side effect, the length of the cipher/plain texts are equal;
allowing for in-place encryption/decryption.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-01-16 18:34:20 +01:00
Ulf Magnusson
d0f7652858 dts: gen_defines.py: Rename *_dev() to *_node()
out_dev(), etc., as a name is a holdover from before commit 73ac1466fb
("scripts: edtlib: Call nodes "nodes" instead of "devices""). It's
confusing for the same reasons as mentioned in that commit.

Renamings:

 - dev_ident()            -> node_ident()
 - out_dev()              -> out_node()
 - out_dev_s()            -> out_node_s()
 - dev_aliases()          -> node_aliases()
 - dev_path_aliases()     -> node_path_aliases()
 - dev_instance_aliases() -> node_instance_aliases()

Also clean up comments to talk about nodes instead of devices where it
makes sense.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 18:32:58 +01:00
Ulf Magnusson
7024e7ca7b shell: kconfig: Fix SEGGER_SYSTEMVIEW/SHELL_BACKEND_RTT build issue
RTT_CONSOLE depends on CONSOLE, but SEGGER_SYSTEMVIEW and
SHELL_BACKEND_RTT select RTT_CONSOLE without also selecting CONSOLE.

This leads to a build failure in drivers/console/rtt_console.c (compiled
if RTT_CONSOLE is enabled) unless CONSOLE is enabled some other way.
Symbols like CONFIG_RTT_RETRY_DELAY_MS won't be defined, because they
depend on CONSOLE.

Came up in https://github.com/zephyrproject-rtos/zephyr/pull/21860. This
fix was verified there.

(Would be nice to get rid of some 'select's in the console subsystem at
some point. This is a quick fix.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 17:37:47 +01:00
Dominik Ermel
2addfb4696 settings: Deprecate base64 in fs backed settings
Encoding of values with use of base64 has been marked as deprecated and
will be removed in future releases.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-01-16 10:21:29 -05:00
Martí Bolívar
60db6a6e2f scripts: runners: nrfjprog: sort SNR list before prompting
This guarantees muscle memory will work over multiple runs when the
same boards are connected. (The "nrfjprog --help" output for --ids
does not guarantee an order.)

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-01-16 10:20:39 -05:00
Martí Bolívar
e4768ad7e7 scripts: runners: nrfjprog: restrict when we guess snr
Right now, the nrfjprog runner will prompt the user for which board to
use if there are multiple possibilities and the --snr command line was
not given to specify one ahead of time.

Tweak this so it only happens if standard input is connected to a
terminal. This should avoid stalling the process on board farms when
this runner is used in automation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-01-16 10:20:39 -05:00
Martí Bolívar
ae2f27cf16 scripts: runners: defer ensure_snr() to run in nrfjprog
The create() classmethod should not be doing any I/O -- its only job
is to create the ZephyrBinaryRunner instance. It's currently trying to
figure out what the serial number of the board is, though. Let's defer
that work to do_run(), so it gets handled by run_common's exception
handler.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-01-16 10:20:39 -05:00
Martí Bolívar
8837469492 scripts: runners: improve error handling CLI
Catch RuntimeError when calling runner.run() and print a message
instead of dumping stack unless in verbose mode.

This improves the command line interface when runners raise exceptions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-01-16 10:20:39 -05:00
Erwan Gouriou
136d92de33 drivers/usb/device: stm32: Update due to API change on F0/F3/L0
Following update of STM32Cube packages for series F0/L0/F3,
a new file ll_usb.h is now available for these series.
As a consequence, specific hanlding is no more requested for this
series is stm32 usb_device driver.

Fixes #21962

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-16 10:09:58 -05:00
Andrei Gansari
b72db6b02e drivers: soc_flash_mcux enabled for LPC
soc_flash_mcux added support for IAP Flash device specific to LPC SoC
families.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
c9301ad8a3 soc: enables flash on LPC55xxx SoCs
Enables IAP Flash Controller device on LPC55xxx SoCs.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
5ac450ecc4 dts: lpc55s6x flash controller add
Added flash controller and all memory mapped regions to DTS.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
1cebd314c2 dts: nxp,lpc-iap.yaml
New IAP Flash device for LPC SoC.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
d9a15132bf modules: HAS_MCUX_IAP config
In Application Programming of flash specific to LPC SoCs.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
fb9a41dc0b dts: lpc55s69 all flash regions
Added reserved partition and bootrom partitions.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari
85800622f9 dts: remove artificial include
DTS inclusion simplification for LPC55S69 cpu 0.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Ulf Magnusson
4d32d0ae02 tests: all: kconfig: Do not assign promptless NET_L2_IEEE802154_SUB_GHZ
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is enabled through being selected by IEEE802154_CC1200 and
IEEE802154_RF2XX.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 08:05:00 -06:00
Erwan Gouriou
cbe6edcfa7 boards: nucleo_f207zg: Enable automatic flashing
Flashing board nucleo_f207zg requires additional instructions
to be provided to openocd in order to enable flashing without holding
the reset button.
Update nucleo_f207zg openocd config to provide requested instructions.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-16 07:52:12 -06:00
Ulf Magnusson
ecb20669b3 samples: sht3xd: kconfig: Do not assign promptless SHT3XD_TRIGGER
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

SHT3XD_TRIGGER is already being selected by
SHT3XD_TRIGGER_GLOBAL_THREAD, which is enabled in the same configuration
file.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-16 07:50:05 -06:00
Thomas Schmid
03e992a6b5 drivers: sensor: ms5607: fix potential integer overlow
Fix potential integer overflow by making operands to multiplication
wider.

Fixes #21673

Signed-off-by: Thomas Schmid <tom@lfence.de>
2020-01-16 07:47:59 -06:00