Commit Graph

53050 Commits

Author SHA1 Message Date
Kumar Gala 45eca4ce10 samples: eeprom: Fix build issues with x_nucleo_eeprma2 sample
There are a number of platforms that the x_nucleo_eeprma2 eeprom sample
can't build on.  Also fix issue with missing include of <mem.h> header
to get DT_SIZE_* macros used by the overlay.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 11:51:14 -05:00
Eug Krashtan 86fc962a48 net: coap: Keep user data inside message
Keeping user data in the CoAP packet

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2021-06-09 18:41:42 +03:00
Martí Bolívar 88eda6f77d linker: allocate devices in ROM
Pull request https://github.com/zephyrproject-rtos/zephyr/pull/24873
marked all the struct devices const.

However, the linker scripts were never updated to actually allocate
the struct devices in ROM. They're still in RAM, so the main benefit
of this work has not been realized.

Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-09 16:32:52 +02:00
Lingao Meng 9644e9bc99 drivers: Fix missing `auto_attach_cmd`
When run native posix with `-attach_uart_cmd=<cmd>`,
should attach cmd by arguments.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-06-09 16:18:17 +02:00
Kumar Gala 9fd51225fc tests: drivers: build_all: Remove stale files
Now that we've split out the build_all test there are a few left
over files that aren't needed any more.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala c8205c41ba tests: drivers: build_all: split xlnx pwm/counter test out
Move xlnx pwm/counter tests to their own directories.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala a6b1f6c618 tests: drivers: build_all: split led test out
Move led tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala a4a685b9f8 tests: drivers: build_all: split gpio test out
Move gpio tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala 91a2d53e9c tests: drivers: build_all: split ethernet test out
Move ethernet tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala c28b678d24 tests: drivers: build_all: split eeprom test out
Move eeprom tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala 89c1ec2028 tests: drivers: build_all: split dac test out
Move dac tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala fcfecd05ed tests: drivers: build_all: split adc test out
Move adc tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala 03235bb322 tests: drivers: build_all: split modem test out
Move modem tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala 4ed2dc791d tests: drivers: build_all: split sensor test out
Move sensor tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala 73695fa3c2 tests: drivers: build_all: cleanup test
The clock control & general driver build tests as they don't get
us any additional coverage then from what we get from the build all
test of tests/kernel/common/kernel.common on all platforms.

Additionally, remove drivers.conf as the file isn't used in any tests.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Lukasz Maciejonczyk 4113a43bff drivers: ieee802154: fix serialization issue in nRF5
Function 'nrf_802154_transmitted_timestamp_raw' is not serialized and
connot be used for multi-core devices yet.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2021-06-09 16:11:58 +03:00
Robert Lubos 2f409f401e tests: net: socket: tls: Fix timing issue on nRF devices
The timings were too tight for TLS tests executing on nRF52840 with
hardware entropy source enabled. Increase the timings to make tests
pass.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-06-09 16:11:11 +03:00
Nikodem Kastelik dce85ebe45 modules: hal_nordic: Update nrfx to have doc fixes
Update the hal_nordic module revision, to have Doxygen doc
fixes that solves warnings about non-existing CHANGELOG.md file
and nrfx_atomic Doxygen group.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2021-06-09 13:07:39 +02:00
Andrzej Głąbek 60d9988401 soc: nrf53: Add configuration options for HFXO/LFXO load capacitance
Add Kconfig options that allow configuration of optional internal
load capacitors for the high-frequency (HFXO) and low-frequency
(LFXO) crystal oscillators in nRF5340.
Default settings used for the new options are those that have been
in effect so far, i.e. external load capacitors for HFXO and 6 pF
internal capacitance for LFXO.

This commit also adds missing SOC_ENABLE_LFXO option dependency on
!TRUSTED_EXECUTION_NONSECURE.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-06-09 13:07:12 +02:00
Elliot Revell-Nash e4507ec6ee logging: dictionary format output to file
Add the option to send logs to fs backend using new dictionary
formatting
This can result in much better use of filesystem space

Signed-off-by: Elliot Revell-Nash <elliot.revell-nash@wdtl.com>
2021-06-09 05:44:03 -05:00
Jaxson Han cd536ae8ff arch: arm64: Refine the assertion in arch_start_cpu
When SMP enabled, the primary core calls arch_start_cpu to start
secondary cpus. There is an assertion checking the core mpid to make
sure it is called by primary core.

But the checking is bogus. After the first secondary core is brought
up, arm64_cpu_boot_params.mpid will be changed, which will fail the
assertion.

The current solution restores the arm64_cpu_boot_params.mpid.
However, using the arch_curr_cpu()->id == 0 as the assertion will be
better.

The _current_cpu->id will always fail assertion inside this macro
(__ASSERT_NO_MSG(!z_smp_cpu_mobile()), so I use arch_curr_cpu()->id
instead.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-06-09 05:42:00 -05:00
Jamie McCrae 6637c5bb4a drivers: ethernet: enc424j600: Add config get support for driver
This allows the current speed of the connection (100Mbps/10Mbps) and
if it is operating in half or full duplex to be queried

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-06-09 11:45:10 +03:00
Jamie McCrae 5719e545af drivers: ethernet: enc424j600: Reduce interrupt command lengths
The enc424j600 chipet has 1-byte commands to enable or disable
interrupts which an be used rather than the currently used 4-byte
commands to speed the process up by a factor of 4x

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-06-08 15:42:59 -05:00
Erwan Gouriou 2ef3ebed9c doc/guides/dts: bindings: Fix code snippet for 'signal-gpios'
Code snippet to demonstrate use of 'zephyr,user' binding
for gpio pin was missing a #define to easily get the code
compiling.
Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-08 15:32:23 -05:00
Faisal Saleem c9fd7a6099 Bluetooth: Keys: Fix BT_KEYS_OVERWRITE_OLDEST logic for BT_MAX_CONN > 1
When the Bluetooth stack is configured for CONFIG_BT_MAX_CONN > 1
the oldest key might currently be in use.  Fix the logic to ensure the
oldest key overwritten is from the set of keys currently not in use.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/35999

Signed-off-by: Faisal Saleem <faisal.saleem@setec.com.au>
Signed-off-by: Nick Ward <nick.ward@setec.com.au>
2021-06-08 20:18:49 +02:00
Jim Shu 1b4dad433f arch: riscv: enable FPU of threads in unshared FP mode
In unshared FP mode, only 1 thread can use FPU but kernel doesn't know
which one, so riscv arch would enable FPU of each thread.

Signed-off-by: Jim Shu <cwshu@andestech.com>
2021-06-08 11:47:02 -05:00
Stephanos Ioannidis 615371900e tests: cpp: libcxx: Test with full and nano variants of newlib
In order to increase test coverage, this commit updates the libcxx test
to run with both full and nano variants of the newlib.

Note that C++ exception handling feature is only enabled for the newlib
full variant because the nano variant does not support C++ exception
handling.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-08 11:45:28 -05:00
Stephanos Ioannidis 518dd32efe tests: cpp: libcxx: Use full version of newlib for testing
Use the full version of newlib (i.e. not nano) for libcxx testing since
some features (e.g. C++ exception handling) require the full version of
newlib.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-08 11:45:28 -05:00
Stephanos Ioannidis f0e3280c61 cpp: Fix C++ exception handling newlib dependency
This commit makes C++ exception handling feature depend on the full
version of newlib (i.e. `CONFIG_NEWLIB_LIBC_NANO=n`).

The `nano.specs`, which selects the nano variant of newlib, libstdc++,
and libsupc++, does not support C++ exception handling because its
lib*c++ is compiled with `-fno-exceptions`.

For more details, refer to the issue #35972.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-08 11:45:28 -05:00
Stephanos Ioannidis 7e47ef281e linker: cpp: Fix C++ exception handling info section linking
The `.eh_frame_hdr` and `.eh_frame` ROM sections, which contain read-
only C++ exception handling information, are currently specified in
`cplusplus-ram.ld`, and this can cause the linker output location
counter to take a ROM region address while in the RAM region.

This commit relocates these sections to `cplusplus-rom.ld` in order to
prevent the linker output location counter from getting corrupted.

For more details, refer to the issue #35972.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-08 11:45:28 -05:00
Kai Vehmanen ed2d104bab boards/intel_adsp_cavs15: add generic ADSP detection to adsplog.py
As there are a lot of PCI IDs for various devices, identifying
the ADSP this way will be hard to maintain.

Implement a more generic device look-up using the PCI vendor and class
information to detect a compatible ADSP.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-06-08 11:20:54 -05:00
Jake Mercer 28f0a7a2ac boards: arm: mimxrt1020_evk: SD Card
Porting code from mimxrt1050_evk to this board to enable use of the SD
card.  Note that this board does not have the power pin connected to the
SD card and must use the no-1-8-v option for the USDHC driver as in
PR #34205 for the mm_swiftio.

Tested with samples/subsys/fs/fat_fs.

Signed-off-by: Jake Mercer <jake.mercer@civica.co.uk>
2021-06-08 11:20:29 -05:00
Fabio Baltieri b06f4a5e72 drivers: flash_stm32_v1: fix a potential unaligned access
The flash write function casts a void * to flash_prg_t, which can be 2,
4 or 8 bytes long depending on the SoC. This can trigger a hard fault
exception if data is not aligned, such as when passing a constant string
from settings_save_one().

Copying the chunk of data to a temporary variable on the stack to avoid
the problem.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-06-08 11:15:59 -05:00
Marcin Niestroj 0b59257d93 drivers: wifi: esp32: create event handling thread in runtime
Commit 95b916d104 ("drivers: wifi: esp32: fix reconnect issue")
switched from thread created at runtime to statically defined thread.
The difference is mainly visible for simple applications that use
CONFIG_NET_CONFIG_AUTO_INIT=y, where networking setup code is executed
before main() and any statically defined threads. All ESP32 events are
just queued and never handled, so conditions enforced by
CONFIG_NET_CONFIG_NEED_IPV4=y are never met (e.g. Zephyr networking
layer is never informed about being connected).

Switch back to thread created at runtime, which starts at the moment
when k_thread_create() is invoked. This allows ESP32 event processing to
happen just after ESP32 WiFi driver gets initialized and before Zephyr
network auto initialization code (CONFIG_NET_CONFIG_AUTO_INIT=y).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2021-06-08 11:15:38 -05:00
Bhavesh Bhojwani 2510c89236 dts/arm: st: g0: closes parenthesis for soc
This commit adds a closing parenthesis for soc model of stm32g050.
Resolves issue #36014

Signed-off-by: Bhavesh Bhojwani <bhaavesh.bhojwaani@gmail.com>
2021-06-08 11:15:00 -05:00
Erwan Gouriou 4319a5d68f samples/drivers/eeprom: Add fixture check on x_nucleo_eeprma2 config
sample.drivers.eeprom.shield.x_nucleo_eeprma2 sample variant
should be run in CI bench only if shield is present on board.
Add a harness_config to specify the fixture check

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-08 11:14:08 -05:00
Anas Nashif d9825257f0 boards: testing: limit default platforms to those we can run
The idea of having default platforms is to prioritize running tests over
just building them. We do not have NSIM in CI and thus we are just
building for those platforms without running the tests, so, we spend
lots of time building on PRs which slows everything down. This is
already done in the daily builds.

We now have Qemu covering ARC. If we can get NSIM into CI, then we
should reconsider enabling some NSIM platforms.

Leaving hs_smp and _sem for coverage, we do not have other platforms
covering those.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-08 11:46:21 -04:00
Gerard Marull-Paretas a140a249b3 doc: only enable -W option on CI
The usage of -W may lead to the loss of the Sphinx build environment
even for small typos. Remove this option from the defaults but still
enable it on CI, where the fail-fast behavior given by -W is desired.

Fixes #36033

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-08 09:58:32 -05:00
Henrik Brix Andersen a25afdd470 drivers: eeprom: at2x: convert to new DT helper macros
Simplify the the AT2x EEPROM instance initialization macro a bit by
converting it to use the new DT helper macros for SPI and GPIO.

This also saves a few bytes when only AT24 support is enabled.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-06-08 16:09:39 +02:00
Eduardo Montoya ae44b30b41 drivers: ieee802154: include timestamp in acks
Fill the ACK timestamp field in nRF5 driver. This is required by
OpenThread for the proper CSL transmitter functioning.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-06-08 04:54:38 -05:00
Ioannis Glaropoulos aa5e2eb720 samples: remove disabling AUDIT_LOG partition in samples with TFM_IPC
The AUDIT_LOG partition cannot be used in TF-M builds
with the IPC mode (CONFIG_TFM_IPC=y); we have added a
relevant dependency for this. So we can cleanup the
CONFIG_TFM_PARTITION_AUDIT_LOG=n from the configuration
files of the samples.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-08 04:51:51 -05:00
Arvin Farahmand 98a0ccd5c5 drivers: hwinfo: Add reset cause support
Add `hwinfo_get_reset_cause` and `hwinfo_clear_reset_cause` to retrieve
and to clear cause of system reset on supported platforms.

Different platforms can provide different causes of reset, however
there is a great deal of overlap. `enum reset_cause` can be expanded in
the future to support additional reasons, as additional platforms are
supported.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-06-08 10:16:17 +02:00
Mulin Chao 38eaabc9c7 tests: kernel: gen_isr_table: Add workaround for npcx9 series.
Both NPCX7/9 uses the IRQs at the end of the vector table, for example,
the IRQ 60 and 61 used for Multi-Input Wake-Up Unit (MIWU) devices by
default, and conflicts with ISR used for testing.

This CL changes TEST_NUM_IRQS (The value is changed from 46 to 44) to
move IRQ used for this test suite from 42 to 40 which is reserved in
both NPCX7 and NPCX9 series to resolve the issue.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-08 00:40:14 -04:00
Mulin Chao cfbd9ea437 board: npcx: add npcx9m6f_evb board.
Introduce the npcx9m6f_evb board driver. NPCX9M6F_EVB board is a
development platform to evaluate the Nuvoton NPCX9 series
microcontrollers. This board needs to be mated with part number
NPCX996F.

It also includes:
 1. Add CONFIG_BOARD_NPCX9M6F_EVB definition for adc test suite.
 2. Add npcx7m6f_evb.overlay file for gpio test suite.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-08 00:40:14 -04:00
Mulin Chao d2cd3ed765 soc: npcx: add support for npcx9 series in ecst.py script.
This CL adds the support for npcx9m3f and npcx9m6f chips in ecst.py
script which generates the NPCX firmware header.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-08 00:40:14 -04:00
Ievgen Glinchuk 1ce8d6fae4 net: dns: Fix multiple IP DNS resolution
Fixed mutli-IP DNS resolution as previously the same IP address was
used to populate all AI entries and added DNS_RESOLVER_AI_MAX_ENTRIES
config entry to define max number of IP addresses per DNS name to be
handled.

Signed-off-by: Ievgen Glinchuk <john.iceblink@gmail.com>
2021-06-07 23:54:55 -04:00
Alexandre Bourdiol e53e5448ee tests: drivers: watchdog: Pause during debugging
Enable the option to pause the watchdog if the MCU is halted by a
debugger.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-07 23:53:03 -04:00
Jose Alberto Meza c85e11c05b drivers: espi: Propagate eSPI host DnX warning to driver's client
Propagate Download and Execute (DnX) entry warning.
Add missing handler for SUS warning power down ack.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-06-07 23:52:17 -04:00
Jose Alberto Meza 978ad63e75 boards: arm: mec15xx: Add missing virtual wire GIRQ
Update MEC15xx board definitions with extended/custom virtual
wire interrupt.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-06-07 23:52:17 -04:00
Jose Alberto Meza d86636fcdc dts: bindings: mchp: Convert vw_irq to array
Micropchip eSPI controller can generate 2 different IRQ for
virtual wires.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-06-07 23:52:17 -04:00