Commit Graph

43457 Commits

Author SHA1 Message Date
Loic Poulain 377f6c2a31 drivers: wifi: eswifi: rework read work
Remove non necessary eswifi lock/unlock in read procedure (eswifi
lock support nesting).

Return NULL packet in case socket is closed by remote (tested with
net shell and net recv).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-08-28 13:18:31 +03:00
Andrzej Głąbek d5ceb8ba3f modules: hal_nordic: Prevent implicit-fallthrough warnings
Update the hal_nordic module revision, to prevent implicit-fallthrough
warnings reported in sanitycheck.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-08-28 11:41:47 +02:00
Øyvind Rønningstad 7012fdf0b7 nrfjprog.py: Fix snr globbing to allow leading 0s
This is needed for sanitycheck hardware maps which take the serial
number directly from USB metadata.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-08-28 11:38:05 +02:00
Laurent Meunier 1603c329bd drivers: i2c_ll_stm32_v2: add support for optional timing property
In case optional timings property has been defined in DT, let's use it
and look for a matching peripheral clock and i2c bus clock so that
timing value is used instead of using runtime algorithm.

If matching the current configuration, the value will be set directly to
the I2C_TIMINGR register through the LL API.

This property is only valid for I2C V2 peripheral, so the timing config
structure member is only added in case of CONFIG_I2C_STM32_V2. Also the
initialization of the member is done conditionnaly, only in case
it is defined in DT, otherwise timings table will be empty.

Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
2020-08-28 11:36:58 +02:00
Laurent Meunier ea491b3a9f dts: bindings: Add optional timings capability
By default the I2C timing (I2C_TIMINGR register) of I2C V2 peripheral is
computed depending on clocks at runtime with relatively low precision.

This optional property allows to provide a list of pre-computed values
(typically computed from STM32CubeMX SW tool) instead of using runtime
algorithm.

The precomputed value is only valid for a given clock configuration and
I2C speed setting, so this valid configuration is provided with each
value entry.

Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
2020-08-28 11:36:58 +02:00
Fabio Utzig 58a75eb50e tests: fix list usage in @details section
Adding the first list item in the same line as @details, creates a list
with a single item inside a paragraph, and another list with the
remaining items. What is wanted here is to have a single list with all
items, so the first item needs to be in a new line.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-28 11:33:45 +02:00
chao an 00d1408a14 Bluetooth: host: fix build break if enable oob legacy pair only
enable CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY:

In function `bt_le_oob_get_local':
subsys/bluetooth/host/hci_core.c:8878:
		undefined reference to `bt_smp_le_oob_generate_sc_data'

Signed-off-by: chao an <anchao@xiaomi.com>
2020-08-28 12:23:56 +03:00
Asbjørn Sæbø 65f5046d70 Bluetooth: Bugfix - correct UUID defines
This fixes an error introduced in commit
9b2e9eda89

It seems that in a couple of instances, the "_VAL" suffix was
forgotten.  One of these broke the le-audio build.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2020-08-28 10:38:16 +02:00
Olof Johansson 6a8c622bcc doc: update list of architectures in introduction
The list is out of date, so clarify the support a bit and add newly
added subarchitectures.

Signed-off-by: Olof Johansson <olof@lixom.net>
2020-08-27 23:38:54 -04:00
Anas Nashif a44fa5323f ci: buildkite: exit on errors
Whenever we have an error in the script, exit immediately and avoid
confusing unrelated messages about disk space and such.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 21:40:33 -04:00
Peter Bigot e81e88e52e samples: spi_flash: add README
Basic example of basic flash API use when selecting a serial flash
memory.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 12:39:43 -04:00
Peter Bigot 77aa89bcb5 drivers: flash: remove W25QXXDV driver
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year.  The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.

All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible.  No in-tree devicetree files make use of this
driver.

Remove the confusion about which driver to select by removing the
unmaintained redundant driver.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 17:39:21 +02:00
Alexandre Bourdiol 27bf7c8010 tests: drivers: pwm: pwm_api: add support of STM32 boards
Add generic support of STM32 boards

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 16:07:39 +02:00
Alexandre Bourdiol 42c31e5bd1 tests: drivers: dac: dac_loopback: add fixture dac_adc_loopback
Add fixture dac_adc_loopback.
Tested with nucleo_f207zg

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 16:06:34 +02:00
Alexandre Bourdiol 5ae149a17b board: arm: nucleo_f207zg: add DAC support
Add DAC support to nucleo_f207zg:

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 16:06:34 +02:00
Martí Bolívar 20ca76fe17 doc: west: troubleshoot no west on PATH on windows
Depending on how people set up their Python, west might not be on
PATH.

I'd like to have a special-purpose step by step guide for how to
handle this in the documentation to save support time when this
happens. I think it's worth special casing since west is the first
runnable program that pip installs onto a new user's system when
they're following the GSG.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-08-27 16:06:01 +02:00
Jeremy LOCHE 15c69a8bbc samples: bluetooth: ipsp: add net config auto init
Add CONFIG_NET_CONFIG_AUTO_INIT=y to enable the bluetooth
device network interface.

Due to #27405 feature PR allowing application to init the network
whenever it wants, IPSP sample stopped initing the
bluetooth network.

The IPSP sample was not updated to enable
CONFIG_NET_CONFIG_AUTO_INIT in prj.conf
and didn't call net_config_init_app(...)
as suggested in the feature PR.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-08-27 15:59:20 +02:00
Peter Bigot 9eedb36b68 samples: fxos8700-hid: remove unnecessary check for flags cell in gpios
Also clean up the devicetree node checking logic.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 15:59:03 +02:00
Peter Bigot 0b286d7304 samples: remove unnecessary check for flags cell in gpios
The devicetree helper macro now provides zero when the cell is not
present.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 15:59:03 +02:00
Carles Cufi 63f838e307 doc: bluetooth: Add a new controller listing
Add a new listing for the Zephyr BLE Controller. This applies to
the Nordic nRF52 series and Zephyr version 2.2.x.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-08-27 15:57:36 +02:00
Alexandre Bourdiol 1d4cb620f4 boards: arm: nucleo_h743zi: add rng support
Add RNG support to nucleo_h743zi board.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 14:14:35 +02:00
Alexandre Bourdiol 7b8624a058 drivers: entropy: stm32: RCC_HSI48_SUPPORT not always defined
RCC_HSI48_SUPPORT is not always defined even if SOC support HSI48.
Ex: STM32H7 family which support HSI48 but doesn't have
switch RCC_HSI48_SUPPORT.
This switch is usefull when in the same STM32 family some soc have
HSI487 and some other soc not.

So instead, use CMSIS register defines (which depends on family)

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 14:14:35 +02:00
Jukka Rissanen 6493af2714 tests: net: dns: Add tests for catching malformed packets
Add more tests to verify that we discard malformed packets.
In order to simplify the testing, separate message validation to
dns_validate_msg() function in resolve.c. Allow that function to
be called from unit test. This way we can construct invalid DNS
messages in unit test and verify that they are discarded when
needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Jukka Rissanen 50def60b4e net: dns: Verify that DNS id and flags can be read
The DNS message must be long enough for id and flags fields.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Jukka Rissanen 1dad77f41c net: dns: Parse individual labels in CNAME properly
The ANCOUNT has nothing to do with label count so remove the
original while loop and just go through all the labels until
we have read all of them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Jukka Rissanen 214da19b27 net: dns: Fix next answer position when parsing packet
As the answer might not be compressed, calculate next answer
position correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Jukka Rissanen c7441c9d0b net: dns: Verify that response is not too short
Make sure that IP address information is found in the received
message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Jukka Rissanen f4f340e9f1 net: dns: Check that we do not access data past msg size
This is not possible with valid DNS messages but is possible if
we receive malformed DNS packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 08:05:52 -04:00
Ruud Derwig 80194192d4 arc: Fix for undefined shift behavior (CID 211523)
find_msb_set() can return 0, resulting in a undefined shift of 255 bits.
Fixes #27319

Signed-off-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
2020-08-27 07:53:49 -04:00
Anas Nashif af1d924c42 west: update mcuboot sha
Move to new mcuboot dealing with inclusive language in sample.yml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Anas Nashif dca317c730 sanitycheck: inclusive language
change whitelist -> allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Flavio Ceolin 9337b782d1 bluetooth: Fix a fallthrough warning
It fixes:

../../../../include/toolchain/gcc.h:169:30: warning: statement will
never be executed [-Wswitch-unreachable]

  169 | #define __fallthrough        __attribute__((fallthrough))

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-08-27 07:02:40 -04:00
Flavio Ceolin e1e4a402e2 drivers: timer: Explicitly setting argument as unused
Marking as unused (ARG_UNUSED) the parameter device in the
initialization function z_clock_driver_init when it is not used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-08-27 07:02:40 -04:00
Nolwenn Violette fb88b0aafc sample: tfm_ipc: Add nucleo_l552ze_q support
This commit adds the signing commands and the configuration required
to build a non secure image for a nucleo_l552ze_q.

Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
2020-08-27 12:02:16 +02:00
Nolwenn Violette 522235e418 boards: nucleo_l552ze_q: Add non secure target
This commit adds a second target for the nucleo_l552ze_q board.
The non secure target is configured for TFM applications.

Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
2020-08-27 12:02:16 +02:00
Vincent Wan bc90cf0d0a tests: lib: fdtable: fix tests after modifying reference counting
Tests need to be adjusted to do the correct checks now that reference
count is incremented in z_reserve_fd() instead of z_finalize_fd().

test_z_fd_multiple_access in particular has been simplified to
reserving an fd in one thread and freeing it in the other.

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-08-27 11:42:19 +03:00
Vincent Wan 0e436ed72a lib: fdtable: fix reference counting in z_reserve_fd()
The new fd entry should be reserved by incrementing its reference count
in z_reserve_fd() instead of z_finalize_fd() in order to avoid having
the same one being returned in a concurrent call. If for some reason
the fd is not finalized after z_reserve_fd() is called, it can be
freed via z_free_fd(), which would decrement the reference count.

Fixes #27721

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-08-27 11:42:19 +03:00
Ryan Erickson 2ce87da252 net: lib: lwm2m: add new sensor objects
Add generic, humidity and pressure sensor objects.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-08-27 11:01:09 +03:00
Jukka Rissanen 0bac136604 samples: net: socket: packet: Add SOCK_DGRAM support
If user has enabled SOCK_DGRAM support for AF_PACKET type, then
use that in the packet sample application instead of SOCK_RAW.
This simplifies the application as we do not need to handle
the Ethernet frame when sending or receiving the packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:56:06 +03:00
Jukka Rissanen e6672f848a net: ip: sockaddr_ll_ptr is larger than sockaddr_in6_ptr
Make sure that the largest sockaddr_xx_ptr length is defined
last. Otherwise we might copy wrong amount of data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:56:06 +03:00
Jukka Rissanen 1a01aacd16 tests: net: af_packet: Initial tests for SOCK_DGRAM types
Add some tests for testing AF_PACKET and SOCK_DGRAM type
sockets. These are sockets where Ethernet header is automatically
added, caller just needs to provide upper stack header.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:56:06 +03:00
Jukka Rissanen a50f4900d6 net: eth: Add ETH_P_TSN type
The ETH_P_TSN is used in TSN (IEEE 1722) packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:56:06 +03:00
Jukka Rissanen 2ba4d5c2f0 net: socket: packet: Add support to SOCK_DGRAM packet sockets
Allow user to create SOCK_DGRAM type AF_PACKET socket. This
allows user to send raw IP packets without specifying
L2 (like Ethernet) headers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:56:06 +03:00
Jukka Rissanen 3d8bae814e net: gptp: Fix field ordering in gptp_priority_vector struct
The steps_removed field must be placed right after root_system_id
so that priority vector comparision can be done in one memcmp()
call. This fixes the best master clock selection algorithm (BMCA).

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-27 10:53:57 +03:00
Andrew Boie 46def95f51 doc: memory domain updates
Update memory domain documentation to reflect the policy, API,
and code changes in this PR.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie 00f71b0d63 kernel: add CONFIG_ARCH_MEM_DOMAIN_SYNCHRONOUS_API
Saves us a few bytes of program text on arches that don't need
these implemented, currently all uniprocessor MPU-based systems.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie d11e3c3456 userspace: add debug logs to mem domain code
Useful when debugging stuff.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie f1d12aa45b userspace: deprecate k_mem_domain_remove_thread()
This is just equivalent to calling k_mem_domain_add_thread()
on the default memory domain now.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie ed938d18b1 arc: fix arch_ API implementations on current CPU
All of these should be no-ops for the following reasons:

1. User threads cannot configure memory domains, only supervisor
   threads.
2. The scope of memory domains is user thread memory access,
   supervisor threads can access the entire memory map.

Hence it's never required to reprogram the MPU on the current CPU
when a memory domain API is called.

This does not address the issue #27785 if a user thread in the domain
is running on some other CPU.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie 2222fa1426 arm: fix memory domain arch_ API implementations
All of these should be no-ops for the following reasons:

1. User threads cannot configure memory domains, only supervisor
   threads.
2. The scope of memory domains is user thread memory access,
   supervisor threads can access the entire memory map.

Hence it's never required to reprogram the MPU when a memory domain
API is called.

Fixes a problem where an assertion would fail if a supervisor thread
added a partition and then immediately removes it, and possibly
other problems.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00