Commit Graph

45538 Commits

Author SHA1 Message Date
Peter Bigot 758c8b34b1 tests: kernel: work_queue_api: relax test to eliminate racy checks
We can't control ticks accurately enough to detect the transition
between on a queue and being handled, so relax the checks to make
things pass.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-02 14:25:21 -05:00
Anas Nashif be1025a736 sanitycheck: handle overflow skips
skips due to ram/rom overflow were captured as failures. Fix this and
count them correctly as skips.

Fixes #29412

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-02 14:21:55 -05:00
Anas Nashif 5a6e64f448 sanitycheck: count skipped tests due to overflow
Count tests that were skipped due to SRAM/RAM overdlow as skipped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-02 14:21:55 -05:00
Alexander Kozhinov a142e7b18c samples: civetweb_websocket_server: init project
initialize this project by adding corresponding project files

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-02 20:20:00 +02:00
Anas Nashif 196ae3506f doc: fix showing latest version in sidebar
Minor fix for showing latest version in sidebar, no need for link here
that was added in recent commit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-02 19:02:29 +01:00
Yuguo Zou d24c6e5aae arch: arc: use ifdef to replace if define in isr wrapper code
isr wrapper code has mixed usage of #ifdef and #if define macros. Unify
them to more usual #ifdef.

Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
2020-11-02 11:02:47 -06:00
Yuguo Zou dbd431d2bc arch: arc: fix a reg misuse in leaving tickless idle
There is a register misuse in leaving tickless idle code, which would
destroy exception/interrupt status. This commit fix this issue.

Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
2020-11-02 11:02:47 -06:00
Ryan Holleran 99530e68e5 samples: sensor: fxos8700: Add frdm_k22f as a compatible platform
The frdm_k22f has the FX0S8700CQ placed. Add the frdm_k22f to the
FXOS8700  sample application.

Signed-off-by: Ryan Holleran <rhollerar@gmail.com>
2020-11-02 10:29:41 -06:00
Ryan Holleran 807d8aa87b boards: frdm_k22f: Correct FXOS8700 i2c address
The address in NXP's documentation shows that 0x1c is the addressfor the
FXOS8700.

Signed-off-by: Ryan Holleran <rhollerar@gmail.com>
2020-11-02 10:29:41 -06:00
Armando Visconti 667db2db88 drivers/sensor: lsm6dsl: Fix build when irq_gpios is not in DT
In case of h/w setup with multiples device instances it is possible
that some of them wants to use triggers but not the others (no
interrupt line.

Since Kconfig configuration is the same way for all the instances
(CONFIG_LSM6DSL_TRIGGER=y), the driver behaves differently according
to how the device instance has been configured in the DT.
If irq-gpios is present, then the driver initialize the interrupt
part, else it skip irq init and returns ok, but data->gpio != NULL
xis checked in trigger_set() API.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-11-02 10:00:07 -06:00
Stephane D'Alu 61b0009bdf sensor_shell: added missing sensor channel.
Synchronized with list of channel defined in sensor.h

Signed-off-by: Stephane D'Alu <sdalu@sdalu.com>
2020-11-02 09:52:54 -06:00
Erwan Gouriou 199cf5668b boards: stm32: Move USB pins to device tree configuration
Move STM32 based board USB pin configuration to device tree.

Exceptions:
* olimex_stm32_h407: Node not enabled and not documented.
Signal added in disabled node.
* L0/G4 based boards as signals are not available yet.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-02 09:17:09 -06:00
Ioannis Glaropoulos f530db0525 doc: mention the INIT_ARCH_HW_AT_BOOT functionality in the rel notes
Mention the newly introduced funtionality for Cortex-M
architecture to force the early-boot initialization of
internal architecture HW state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Ioannis Glaropoulos 071ab4a6d5 zephyr: make images loaded by MCUboot enable arch core HW regs init
Instruct Zephyr images that are loaded by MCUboot to
force the initialization of architecture core HW registers,
if the architecture supports the functionality.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Ioannis Glaropoulos 47e87d8459 arch: arm: cortex_m: implement functionality for ARCH core regs init
Implement the functionality for configuring the
architecture core registers to their warm reset
values upon system initialization. We enable the
support of the feature in the Cortex-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Ioannis Glaropoulos 89658dad19 arch: arm: aarch32: cortex_m: improve documentation of z_arm_reset
We enhance the documentation of z_arm_reset, stressing that
the function may either be loaded by the processor coming
out of reset, or by another image, e.g. a bootloader. We
also specify what is required at minimum when executing the
reset function.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Ioannis Glaropoulos 20a9848230 arch: introduce option to force internal architectural state init
We introduce an option that instructs Zephyr to perform
the initialization of internal architectural state (e.g.
ARCH-level HW registers and system control blocks) during
early boot to the reset values. The option is available
to the application developer but shall depend on whether
the architecture supports the functionality.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Carlo Caione b3ff89bd51 arch: arm64: Remove _BIT suffix
This is redundant and not coherent with the rest of the file. Thus
remove the _BIT suffix from the bit field names.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione 24c907d292 arch: arm64: Add missing vector table entries
The current vector table is missing some (not used) entries. Fill these
in for the sake of completeness.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione f0b2e3d652 arch: arm64: Use mov_imm when possible in the start code
Instead of relying on mov.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione 673803dc48 arch: arm64: Rename z_arm64_svc to z_arm64_sync_exc
The SVC handler is not only used for the SVC call but in general for all
the synchronous exceptions. Reflect this in the handler name.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione e738631ddf arch: arm64: Fix indentation
Fix indentation for the ISR wrapper.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione 78b5e5563d arch: arm64: Reword comments
Fix, reword and rework comments.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Carlo Caione 9e897ea2c3 arch: arm64: Remove unused macro parameters
Remove z_arm64_{enter,exit}_exc parameter leftovers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-11-02 12:04:35 +01:00
Ehud Naim 89928c3c8b net: dhcpv4: check dhcpv4 msg len is correct
check if dhcpv4 msg len is correct and drop it otherwise

Signed-off-by: Ehud Naim <ehudn@marvell.com>
2020-11-02 12:56:16 +02:00
Lingao Meng 5efe6ff887 Bluetooth: Mesh: Fix set friend_cred flag incorrectly
Only set friend_cred to true when friendship established and
use friend cred security material decryption successfully.

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-11-02 12:47:36 +02:00
Trond Einar Snekvik a878b36af0 Bluetooth: Mesh: Permit model walk from any model
Fixes bug where applications that disable model extensions end up in an
infinite loop, and adds support for walking model subtrees, as opposed
to forcing root to be unextended.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-02 12:46:45 +02:00
Henrik Brix Andersen 5803ee1e81 samples: display: cfb_custom_font: add support for ssd1306fb
Add support for the Solomon SSD1306FB device to the CFB custom font
sample.

Convert sample to use DT_LABEL() for obtaining the device label instead
of hardcoding it.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-11-02 09:40:00 +01:00
Jan Van Winkel cf1bd17804 doc: releases: 2.4: Updated LVGL to 7.6.1
Added release note about update of LVGL to minor version 7.6.1

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-11-01 10:51:00 -05:00
Jan Van Winkel cd5c9a6891 tests: lib: gui: Enable new config flags
Enable newly introduced Kconfig flags in LVGL test cases

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-11-01 10:51:00 -05:00
Jan Van Winkel 7c8ef52648 lib: gui: lvgl: update to v7.6.1
Update LVGL to minor release 7.6.1

resolves: #29050

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-11-01 10:51:00 -05:00
Kumar Gala e4e3ab3cc3 west.yml: Pull in fix for build issues of flexcan driver on imx-rt
Pull in ASSERT/NDEBUG fix similar to what exists on Kinetis for imx-rt.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-30 10:42:48 -05:00
Alexandre Bourdiol c47a5d4a36 drivers: pwm: pwm_stm32.c: enable ARR preload
Enable ARR preload so that period or pulse updates are taken
into account synchronously with update event
(at the end of a ongoing period)
And thus avoid undetermined intermediate pulse.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-30 15:59:32 +01:00
Daniel Leung 2d152ab019 kernel: limit thread local storage to Zephyr SDK
Toolchains other than Zephyr SDK may not support generating
code with thread local storage. So limit TLS to Zephyr SDK
for now, and only enable TLS on other toolchains as needed.

Fixes #29541

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-10-30 15:59:06 +01:00
Andrzej Puzdrowski 19e43e2e04 usb/class/usb_dfu: signal dfuMANIFEST_SYNCH after flashing is done
End of DFU operation was signaled after the last usb dfu request was
received. Therefeore wait_for_usb_dfu() terminated so fast that
dfu_work_handler() was not called by k_work_queue befor.

wait_for_usb_dfu() should terminate after DFU operation was completed.

For fix that k_poll_signal_raise() was moved after the flash write
operation.

fixes #29611

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-30 15:58:01 +01:00
Martí Bolívar 2485d76bf3 doc: api: sort the API overview alphabetically
This makes it easier to scan. The sorting is done based on the text
that appears in the HTML, not the :ref: label name.

In the case of the DMIC API, change the title of the document to match
the "Audio Codec" document so we can keep those together.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-30 15:57:30 +01:00
Enjia Mai 90e6f21d20 tests: modify the test case gen_isr_table using ztest
Modify the gen_isr_table test case to using ztest. Although it was
split up to three test cases, the test logic and the tested platform
are totally the same as previous one.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2020-10-30 15:57:03 +01:00
Anas Nashif 4cd63abafd ci: add more fields to versions.json
Add date and if a commit should be considered for weekly testing.
This will still work with the old format.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-30 15:56:52 +01:00
Emil Obalski 312429be3c usb: samples: Add Extension descriptor to webUSB sample.
WebUSB sample is using BOS descriptor. Because of that
the bcdUSB field of device descriptor is set to 0x0210.
This requires for the BOS descriptor to have LPM support.
LPM support use additional descriptor that the HOST can
read by requesting BOS desc. The descriptor is called
Extension descriptor and is specified in `USB Link Power
Management ECN` document considered a part of USB 2.0
spec.

This patch adds missing part of the BOS descriptor and
fixes issue with webUSB sample not passing i'LPM L1 Suspend
Resume Test' from USB3CV test tool.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-10-30 15:56:13 +01:00
Emil Obalski 7a252b90dc usb: samples: Register BOS capabilities before USB enable.
BOS descriptor capabilities shall be registered before the USB
is enabled.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-10-30 15:56:13 +01:00
Vinayak Kariappa Chettimada 84096455ad Bluetooth: controller: Adv set terminated event on Directed Adv timeout
Add generation of Advertising Set Terminated event on High
Duty Cycle Directed Advertising Timeout.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-30 15:55:57 +01:00
Enjia Mai 761eafa57b tests: improve test case descriptions of arch layer interface
To add more test case descriptions for architecture layer interface
arch_start_cpu().

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2020-10-30 15:55:42 +01:00
Vinayak Kariappa Chettimada ad348337a5 Bluetooth: controller: Reduce use of ARG_UNUSED on auto variables
Reduce the use of ARG_UNUSED on auto variables and try to
use conditional compilation where appropriate.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-30 15:54:56 +01:00
Gerard Marull-Paretas fc9f9059b5 boards: arm: move ethernet pinmux to DT pinctrl on all STM32 boards
Move Ethernet pinmux settings to DT pinctrl on all boards based on
STM32.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-30 15:54:13 +01:00
Gerard Marull-Paretas c8687bc2e4 drivers: ethernet: stm32: add support for DT pinctrl
Add support for configuring Ethernet pins using DT pinctrl entries. Note
that F1 series pinctrl support is not handled as the driver does not
support F1.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-30 15:54:13 +01:00
Dominik Ermel e7886c6634 fs: fs_unmount will return -ENOTSUP if not implemented by driver
The commit changes error handling by fs_unmount; the function will
return -EINVAL if mount point, described by mp, is not mounted or
-ENNOTSUP when unmounting is not supported by the driver; in the second
case it will also log error.

Additionally to the above changes, checks for correct mnt_path and
mnt_path, within fs_unmount, have been removed as they are not needed;
only the fs_mount_t->fs pointer is needed to decide whether system is
mounted or not.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-10-30 15:54:04 +01:00
Dominik Ermel 5faf3750bc fs: fs_mount parameter verification before mutex locked block
The commit moves fs_mount parameter verification above mutex lock.
The list of mount points is now checked before attempting to obtain
file system API pointer.
All modifications to mount point data structure, given as a parameter
to the fs_mount, are only applied after every other operation needed
have completed successfully, immediately before adding the mount point
to the list of mount points.
The fs_mount will a warning when mounted file system does not support
unmount.
When a file system does not provide mount function, the -ENOTSUP error
will be returned instead of -EINVAL.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-10-30 15:54:04 +01:00
Andrzej Puzdrowski 053857e09a storage/flash_map: Added function for get erased byte value
Added flash_area_erased_val() function for get value of erased
byte of memory which is under flash area.
This function already exist in MCUBoot and zephyr dfu subsystem
which makes simultaneous usage of both impossible.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-30 15:53:38 +01:00
Andrzej Puzdrowski cc29dbde4f manifes: update mcuboot
Synchronized up to:
https://github.com/JuulLabs-OSS/mcuboot/commit/ce11597

- corrected bugfix JuulLabs-OSS#830 of upgrade issue in swap-move
- changed default for CONFIG_MCUBOOT_CLEANUP_ARM_CODE to n,
- added MPU register clean-up to this option
- bootutil: ecdsa: Fixed CC310 for nRF devices
- zephyr: made flash_area_erased_val() weak
- serial recovery: allow unaligned last image data chunk

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-30 15:53:38 +01:00
Peter Bigot 529a2e144e checkpatch: disable PREFER_SECTION
Zephyr doesn't use the __section macro, so stop warnings like this
from producing a compliance rejection.

WARNING:PREFER_SECTION: __section(.device_) is preferred over
   __attribute__((section(".device_")))
#702: FILE: include/device.h:743:
   __attribute__((__section__(".device_" #level STRINGIFY(prio))))

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-30 15:51:46 +01:00