Commit graph

50099 commits

Author SHA1 Message Date
Anas Nashif
068e0872d7 kernel: remove EXPERIMENTAL from some Kconfigs
both thread monitor and thread names are not EXPERIMENTAL any more. They
have been used across the tree and lots depend on those features
already.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-23 13:01:08 +01:00
Krzysztof Chruscinski
34decfd408 logging: Add name to the mode choice in kconfig
Adding name allows to modify default choice by other modules.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-03-23 13:00:33 +01:00
Robert Lubos
8929b40b78 tests: net: sockets: tls: Add MSG_TRUNC flag tests
Add unit tests for MSG_TRUNC flag.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-23 13:16:30 +02:00
Robert Lubos
02a1168475 net: sockets: tls: Implement MSG_TRUNC flag
Add implementation of MSG_TRUNC `recv()` flag for DTLS sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-23 13:16:30 +02:00
Robert Lubos
d93003e267 tests: net: sockets: Add MSG_TRUNC flag tests
Add unit tests for MSG_TRUNC flag.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-23 13:16:30 +02:00
Robert Lubos
833517f994 net: sockets: Implement MSG_TRUNC flag
Add implementation of MSG_TRUNC `recv()` flag for UDP sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-23 13:16:30 +02:00
Johann Fischer
e5023b045d doc: release-notes-2.6: add note about disk drivers rework
Add note about disk drivers rework.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
98ce8dcfdc samples: mass: add SD card support
Add SD card support to USB MSC sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
5c7787c912 doc: update disk access docu regarding SD card support
This patch removes sdhc_api references since such API
does not actually exist. SD card controller drivers
use disc driver interface. Accordingly, the SDHC documentation,
which actually describes how to connect a SD card via SPI
and has little to do with SD host controller (SDHC),
is also moved to disk access page and adapted.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
5678189c27 doc: update disk API documentation
Fix disk access interface description and
update disk API documentation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
f205e94f9e include: move disk_access.h to storage
Zephyr already has a directory for storage API relevant headers.
Move disk_access.h header to include/storage where it fits better
structurally.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
45d468bfdb include: move disk driver interface to own header
Move disk driver interface to own header and
separate disk access interface and disk driver interface.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
5070186f63 tests/boards/samples: fixup after sdmmc driver relocation
Fixup configuration.
Remove obsolete SDHC SPI configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
e3e25d0a58 drivers: usdhc: fixup i.MX RT related code after driver relocation
Fixup i.MX RT related code after driver relocation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
ae7097ddd9 CODEOWNERS: add myself as disk subsystem code-owner
Add myself as disk subsystem code-owner

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
69a5f07d16 drivers: disk: cleanup after driver relocation
Add common SDMMC_LOG_LEVEL and SDMMC_VOLUME_NAME.
Initialize drivers at POST_KERNEL level.
Update CODEOWNERS after sdmmc drivers relocation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
03101e75d8 disk: move disk and sdmmc controller drivers to drivers/disk
The files disk_access_usdhc.c, disk_access_spi_sdhc.c,
disk_access_stm32_sdmmc.c, disk_access_ram.c and
disk_access_flash.c are actually drivers for block devices and SD/MMC
controllers. This patch moves this drivers to drivers/disk and
reworks the configuration so that the drivers are selected when
the corresponding node is enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Steven Daglish
8f13b7860e sensor: mcp9808: Bug fix for setting resolution
Resolution currently only gets set if CONFIG_MCP9808_TRIGGER is also
set. If CONFIG_MCP9808_TRIGGER is not set, resolution gets not to '0'.

This small bug fix moves resolution to before CONFIG_MCP9808_TRIGGER is
checked, so that the resolution is changed as required.

Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
2021-03-23 12:13:45 +01:00
Pieter De Gendt
000924c8eb sensor: bq27421: lazy configure fuel gauge
The BQ274XX driver init function performs a lot i2c transfers
that slow down booting the system. We can do this lazely on the
first sample request to speed up the boot.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-03-23 12:13:20 +01:00
Guðni Már Gilbert
952970d6cb lib: libc: minimal: add check on returned value
Fix #32938 [Coverity CID :219508] "Unchecked return value in
lib/libc/minimal/source/stdlib/malloc.c"

The Coverity complains about sys_mutex_lock() which returns 0 if
locked. I added also the same check on returned value for
sys_mutex_unlock() which returns 0 if unlocked.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-03-23 12:13:00 +01:00
Anas Nashif
76f35f29f0 tests: benchmarks: increase timeout
This times out on some platforms, increase timeout a bit to allow slow
platforms to complete.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 21:39:53 -04:00
Torsten Rasmussen
55e3ab79cb cmake: removing map file from BYPRODUCTS as it is being renamed
Fixes: #33512

The ${ZEPHYR_FINAL_EXECUTABLE}.map file is being renamed at a later
stage.

The renamed, and thus missing file, causes ninja to relink the target
in order to re-create the map file, which then again is renamed.

This is fixed by removing the ${ZEPHYR_FINAL_EXECUTABLE}.map as a
byproduct and only has the byproduct on the renamed file to ensure
proper cleanup, see: #23449.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-03-22 19:48:47 -04:00
Anas Nashif
5d6c219210 drivers: device: do not reuse tag name 'device'
Do not reuse tag name (misra rule 5.7).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 19:48:14 -04:00
Anas Nashif
a86505b450 doc: device: follow coding guidelines
Do not reuse tag name (misra rule 5.7).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 19:48:14 -04:00
Anas Nashif
2976e12946 logging : do not reuse tag name log_output
Do not reuse tag name (misra rule 5.7).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 19:48:14 -04:00
Anas Nashif
0ac3073d20 fdtable: fdtable: do not use tag name fd_entry
Do not reuse tag name (misra rule 5.7).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 19:48:14 -04:00
Reto Schneider
c59cf6008b tests: ztest: Fix assert hook dependency
Without this fix, ztest_set_assert_valid() can only be used when
CONFIG_ZTEST_FATAL_HOOK is set.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2021-03-22 15:59:25 -04:00
Jim Shu
8db3683820 arch: riscv: improve exception messages
Add exception descriptions of mcause id 6~15. Also print mtval CSR for
memory access fault & illegal instruction exceptions.

Signed-off-by: Jim Shu <cwshu@andestech.com>
2021-03-22 15:47:09 -04:00
Eugeniy Paltsev
11aedbc460 CODEOWNERS: Add evgeniy-paltsev as an ARC part owner
Add @evgeniy-paltsev as an ARC part owner in addition to
@abrodkin and @ruuddw, so he will be chosen as a reviewer
automatically.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-03-22 15:46:51 -04:00
Anas Nashif
3704a408f6 pm: fix header guard
Fix header guard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 13:46:03 -04:00
Anas Nashif
1aca2fbf4f ztest: fix header guard
rename __ZTEST_H__ -> ZEPHYR_TESTSUITE_INCLUDE_ZTEST_H_

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 13:46:03 -04:00
Reto Schneider
fbcc5ae155 tests: error_hook: Fix header name in README
ztest_assert_hook.h does not exist, ztest_error_hook.h should be
included.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2021-03-22 13:45:39 -04:00
Jukka Rissanen
0af89fc4ec net: Remove legacy TCP stack
Remove legacy TCP stack as it is replaced by the new TCP2 stack.
The TCP2 stack has been the default stack since 2.4 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-03-22 13:06:54 -04:00
Emil Gydesen
ed2162c700 Bluetooth: Audio: Volume Offset Control Service and Client
This commit implements the secondary service
Volume Offset Control Service (VOCS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-22 13:05:56 -04:00
Daniel Leung
cdd02a99a1 cmake: rename linker_final_pass.cmd to linker.cmd
Since linker_final_pass.cmd is the actual linker script being
used to link the final Zephyr binary, rename it to linker.cmd.

This also renames LINKER_PASS2 to LINKER_ZEPHYR_FINAL simply
to clarify what it is used for, instead of ambiguous pass #n.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-22 13:05:33 -04:00
Daniel Leung
c745995a2e cmake: rename linker script for zephyr_prebuilt.elf
The linker script 'linker.cmd' is actually being used for
building zephyr_prebuilt.elf and is not the one used to
build the final binary. So rename it to better reflect
what it is used for.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-22 13:05:33 -04:00
Daniel Leung
9742211fe0 linker: remove APP_SMEM_SECTION() macro
Using this actually would result in a linker input section being
put between output sections which is not correct syntax.
We have never seen this simply because the generated ones would
be included instead of the in-tree ones. So remove this just in
case, instead of linker errors.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-22 13:05:33 -04:00
Daniel Leung
28c35120e0 cmake: rename variables related to kernel objects
This renames the variables related to the generation of kernel
object hashes, and simply makes them more descriptive.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-22 13:05:33 -04:00
Andrei Emeltchenko
365be4540b edac: ibecc: Add supported SKU device IDs
List all supported device IDs found in External Design Specification
Volume 1 which have IBECC supported.

Fixes #33543

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-03-22 13:05:01 -04:00
Kumar Gala
837a5b8566 tests: i2c_slave_api: Fix define usage
The code should be using I2C_SLAVE_FLAGS_ADDR_10_BITS and not
I2C_ADDR_10_BITS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-22 13:04:36 -04:00
Andrzej Puzdrowski
eb9454628e logging/log_backend_fs: support any directory
Added procedure which is able to create nested log director.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Andrzej Puzdrowski
6b18e6992d subsys/loggin/log_backend_fs: added recovery after file lost
Added recovery for case when log file was lost somehow.
Back-end will try to create new file if possible.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Mateusz Syc
2cbaf01b3a samples: subsys: mgmt: smp_svr: Possible download log file from flash FS
Added ability to downlaod log file from flash with LittleFS
using mcumgr.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Mateusz Syc
73d658bda8 tests/subsys/logging/log_backend_fs: Test of log_backend_fs
Tests verify correctness of the internal backend behaviour.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Mateusz Syc
fe5f602606 susbys: logging: Added logging to flash backend
New backend is based on littleFS. After init, there is created new file
with continuous numeration. When max size of file is reached, system
creates another one. File size is limited by Kconfig option.
There is possibility to overwrite old files or drop new ones.
FS backend logging to file if the FS location is available.
Otherwise log messages are drooped.

User can also change the name of log files.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <Andrzej.Puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Kumar Gala
e3285d5f24 kernel: Remove duplicate include of kswap.h
kswap.h was included twice.  Remove the duplication

Fixes #33524

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-22 13:04:05 -04:00
Flavio Ceolin
a6183cff87 pm: docs: sys_suspend -> pm_system_suspend
Change references to an old function name.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00
Flavio Ceolin
7e3e2093c0 doc: power: General improvements
Add information about power state constraints and more information
about power management policy.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00
Flavio Ceolin
c6a0619a46 power: doc: Create a subgroup to constraint API
Create a separate sub group for constraint APIs. This way it is
possible to reference this api directly in the power management
reference without mess with the rest of the documentation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00
Flavio Ceolin
87c6311d99 power: Send exit notification after post_ops callback
Currently notification about exiting an idle state is sent before
post_ops and with interruptions locked. Change it to be sent after
exit_pos_ops callback be called.

Unfortunately it is not possible to just change the order these
functions are called since the idle thread can be scheduled out just
after irqs be unlocked and before has the chance to send the
notification, so we are locking the scheduler and unlocking it only
after the notification be sent.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00