Commit Graph

53050 Commits

Author SHA1 Message Date
Francois Ramu 2bd15ce24a tests: error_hook skipping div-by-0 test on cortex M0 M0+
On the Cortex M0+, M0, M23 the div-by-zero is not mapped
as an hardware exception but triggers a HardFault.
The test case is skipped for any ARMV6_M_ARMV8_M_BASELINE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-05-28 11:46:09 -05:00
Aurelien Jarno 9fdd3f2bac lib: newlib: fix _gettimeofday hook
The time() function works correctly with the minimal libc, but always
returns -1 with the newlib libc. This is due to the _gettimeofday hook
being implemented that way.

Fix that by calling gettimeofday in the _gettimeofday hook instead of
returning -1.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-05-28 11:37:19 -05:00
Anas Nashif f28d891c21 doc: release notes: update tracing section
Update tracing section for the v2.6 release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-28 11:33:57 -05:00
Mulin Chao 333266250c doc: release: v2.6: add note for UART console input expired options
Add note for UART console input expired mechanism Kconfig options.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-05-28 11:33:46 -05:00
Torsten Rasmussen 9bfae0d1c0 doc: release notes: added oneApi toolchain to release notes
Adding Intel oneApi as new toolchain supported in Zephyr.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-28 11:31:57 -05:00
Kumar Gala a2bb0914d5 docs: Fix doxygen errors in include/sys/mem_manage.h
Various params didn't match between docs and functions.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 11:30:51 -05:00
Enjia Mai feaf46ed86 doc: release-notes-2.6: Added and refined some testcases of kernel
1.Added or refined some testcases, most of them are neagtive tests, to
  improve the test code coverage.

2.Provide test excution time per ztest testcase.

3.Add a feature which handles pytest script in twister and provide an
  example.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-05-28 11:00:43 -05:00
Torsten Rasmussen 9bfa0ae1e8 doc: toolchains: move description of alternative install method on mac
On macOS there exists an alternative install method for gnuarmemb.

Unfortunately this information was located with the Intel oneApi
toolchain description and not the GNU arm Embedded toolchain.

Move the description to its correct location.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-28 10:59:18 -05:00
Gerard Marull-Paretas e253bbdc1f doc: release: add documentation changes
Add a list of most relevant documentation changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-28 10:58:33 -05:00
Krzysztof Kopyściński a527409011 Bluetooth: host:l2cap: fix sending error in le_ecred_reconf_req
Result to send was overwritten by BT_L2CAP_RECONF_SUCCESS just after
exiting while loop. This caused to send success response even if
reconfiguration failed. Now, result is initialized to success value,
and if reconfiguration fails, this value will be overwritten with
appropriate one. Added BT_L2CAP_RECONF_INVALID_CID (0x0003) for invalid
cid in request. Added BT_L2CAP_RECONF_OTHER_UNACCEPT (0x0004) to return
if MPS is to small. Reordered checks for mps/mtu as
BT_L2CAP_RECONF_OTHER_UNACCEPT is expected to be returned if both mps
and mtu are to small.

This was affecting L2CAP/ECFC/BI-05-C and L2CAP/ECFC/BI-05-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-05-28 10:50:42 -05:00
Kumar Gala 3c04f0c433 docs: Change a number of 'master' branch refers to 'main'
Now that we use 'main' for git development, update the docs to reflect
or point there instead of 'master'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 10:45:17 -05:00
Joakim Andersson faae326648 net: l2: bluetooth: Handle error if failed to register server
Return error code if init code failed to register the L2CAP server.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-28 10:44:47 -05:00
Ioannis Glaropoulos ed6729a05e tests: arm: fix name for arm_irq_vector_table test suite
Minor fix to the name for the arm_irq_vector_table
test suite, removing the 'interrupt' from the name.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-28 10:41:46 -05:00
Ioannis Glaropoulos dd574f6ec7 kernel: stack_sentinel: disable in single-threaded builds
Add a dependency on MULTITHREADING for the
STACK_SENTINEL feature, so it may not get
enabled in single-thread Zephyr builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-28 10:41:46 -05:00
Jukka Rissanen b9253b5c19 net: capture: Fix the return value of net_capture_is_enabled()
The net_capture_is_enabled() function returns boolean value
so fix the function prototype.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-05-28 10:41:35 -05:00
Jukka Rissanen 3033b8e4d5 net: capture: Fix the function documentation
The net_capture_pkt() does not return anything so remove the
return description from the function documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-05-28 10:41:35 -05:00
Carles Cufi 979926b74e doc: release: Add Bluetooth release notes for 2.6
Document the most important changes in the Bluetooth subsystem for the
2.6 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-05-28 10:41:09 -05:00
Daniel Leung b2b4a010a0 doc: add some bits about demand paging
This adds some information about demand paging in Zephyr.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 11:33:22 -04:00
Daniel Leung dfa4b7e375 kernel: mmu: z_backing_store* to k_mem_paging_backing_store*
These functions are those that need be implemented by backing
store outside kernel. Promote them from z_* so these can be
included in documentation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 11:33:22 -04:00
Daniel Leung 31c362d966 kernel: mmu: rename z_eviction* to k_mem_paging_eviction*
These functions and data structures are those that need
to be implemented by eviction algorithm and application
outside kernel. Promote them from z_* so these can be
included in documentation.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 11:33:22 -04:00
Daniel Leung 231a1e75ab kernel: mmu: add doxygen group for demand paging APIs
This adds the doxygen group for demand paging APIs in
sys/mem_manage.h header file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 11:33:22 -04:00
David Brown 0b2798fdfe doc: security: Change 'master' to 'main'
Fix up a handful of references to 'master' in the security documentation
to refer to the new 'main' branch.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-05-28 10:13:39 -05:00
Krzysztof Chruscinski edff2b020f drivers: serial: nrf_uarte: Fix async/int TX api in inactive state
Currently zephyr has no means to control access to the uart
driver when it is inactive, e.g. shell is not aware of uart
being in idle state and calls asynchronous api. Add early
return to TX starting procedure if device is idle.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-28 10:06:15 -05:00
Kumar Gala 79e0ab743e soc: xtensa: linker: Update linker scripts for C++ build
When we link in crtbegin.o for C++ exception support we end up pulling
in the .tm_clone_table section.  We need to update the linker scripts
to handle this.  soc/xtensa/sample_controller/linker.ld was already
updated, this fixes the others.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 09:32:44 -05:00
Kumar Gala 106ca70997 doc/releases: v2.6.0: Updated Major enhancements section
Added bullets for ARC64, ARM32/64 split, TCP legacy removal, and
ARM v8.1-m support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 09:30:00 -05:00
Krzysztof Chruscinski 8e6898ef14 drivers: flash: nrf_qspi_nor: Fix no multithreading compilation
Fixing error introduced in 951e72b947
where ifdef was converted to IS_ENABLED. Ifdef was required because
element in the struct does not exist when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-28 15:32:43 +02:00
Luiz Augusto von Dentz 066a7c2de5 Bluetooth: conn: Align cleanup for ISO connections
This makes connections of type BT_CONN_TYPE_ISO use BT_CONN_CLEANUP to
cleanup so the TX and RX queues are properly cleanup.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Luiz Augusto von Dentz 2a99d80403 Bluetooth: shell: Add connection type information to connections command
This prints information about the role and id along with connection
parameters in case the connection is of LE type.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Luiz Augusto von Dentz fc9b7e62f0 Bluetooth: conn: Add support for ISO connections to bt_conn_get_info
This enables bt_conn_get_info to be used with connection of type
BT_CONN_TYPE_ISO.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Luiz Augusto von Dentz 8b6d3c6c4d Bluetooth: ISO: Fix call order of connected callback
The state shall be set before calling the callback as it could be check
code behind would expect the channel to be in connected state.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Luiz Augusto von Dentz 76ad664d4e Bluetooth: ISO: Fix not assigning CIG and CIS IDs
When handling CIS Requested event CIG and CIS IDs must be set in order
for the channel to be properly accepted.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Luiz Augusto von Dentz 21404c4bd0 Bluetooth: ISO: Simplify reference handling
This makes bt_conn_cleanup to be automatically called when the last
reference to a connection of BT_CONN_TYPE_ISO is dropped.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-05-28 15:34:20 +03:00
Martí Bolívar 9464798068 doc: external_content: fix for Unix
Path.rename() uses os.rename() internally. Per the Python docs:

     The operation may fail on some Unix flavors if src and dst are on
     different filesystems.

Since 'src_adjusted' is in a temporary directory, on my flavor of
Unix, that's in /tmp, which is indeed on a different filesystem than
'dst', a destination in the doc build directory on my root filesystem.

This is causing the following error when I build the docs:

Handler <function sync_contents at 0x7f9b8fca9c10> for event
'builder-inited' threw an exception (exception: [Errno 18] Invalid
cross-device link: '/tmp/tmpfscfo20o/index.rst' ->
'/home/mbolivar/zp/zephyr/doc/_build/src/reference/drivers/index.rst')

Fix this by using shutil.move() instead of Path.rename(). The shutil
function handles cross-filesystem moves correctly. It did not take a
path-like object for both its src and dst arguments until Python 3.9,
though, so we need to convert to strings for portability on earlier
but still supported versions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Martí Bolívar f64346963a doc: mainpage.md: fix for new doxygen
I'm getting the following error on doxygen 1.9.1:

.../zephyr/doc/custom-doxygen/mainpage.md:1:
error: multiple use of section label 'index' for main page,
(first occurrence:
.../zephyr/doc/custom-doxygen/mainpage.md, line 1)
(warning treated as error, aborting now)

Extension error (zephyr.doxyrunner):
Handler <function doxygen_build at 0x7f1abf9e30d0>
for event 'builder-inited' threw an exception
(exception: Doxygen process returned non-zero (1))

This fixes it for me without breaking anything in
_build/doxygen/html/index.html that I can see.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Martí Bolívar 69ce55a78d doc: zephyr.doxyfile.in: remove obsolete variable
From Doxygen 1.9.1 when running 'make htmldocs':

warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1028 of file
'/tmp/tmpkbj62jo0' has become obsolete.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Pieter De Gendt 6d99e952cd net: mgmt: Initialize the event callbacks statically
This commit allows to add callbacks to NET_EVENT_IF_UP events before
the network initialization.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-05-28 07:00:23 -05:00
Martin Åberg 23bb8f421f cpp: Update list of archs supporting C++ exceptions
C++ exceptions are supported on SPARC.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-05-28 06:32:36 -05:00
Martin Åberg dda2e71097 tests: libcxx: added qemu_leon3 to C++ exception test
This exercises the SPARC support for C++ exceptions.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-05-28 06:32:36 -05:00
Martin Åberg aa0a90d09c SPARC: add the Flush windows software trap
This commit implements the SPARC V8 ABI "Flush windows" software trap.
It enables support for C++ exceptions and longjmp().

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-05-28 06:32:36 -05:00
Martin Åberg 51188bc6df board: set chosen zephyr,shell-uart in LEON boards DTS
This associates the SHELL UART backend with the DTS uart0. It solves
an issue with unresponsive shell.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-05-28 06:31:59 -05:00
Daniel Leung 4725db8722 scripts: gen_syscall: ignore Coverity overrun check
Coverity does not understand syscall mechanism and will already
complain when any function argument is not of exact size as
uintptr_t. So tell Coverity to ignore this particular rule here.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 07:31:40 -04:00
Arvin Farahmand 94e8c2eb81 Kconfig: `ROM_START_OFFSET` fix for samd5x
Set `ROM_START_OFFSET` for SAMD5X series to match the value
calculated in the linker file after forced alignments in
`vector_table.ld`.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-05-27 15:57:05 -05:00
Jennifer Williams bd365cc42e tests: posix: common: clock.c: rephrase comment on tick alignment
This k_usleep(1) is a tick alignment, not a workaround. Simple
reword to avoid confusion.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-05-27 15:56:15 -05:00
Erwan Gouriou 2448cfa505 scripts: series-push-hook: Use main as base comparison branch
Following master branch renaming to "main", update this script
to use $remote/main as base comparison branch

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-27 15:55:43 -05:00
Affrin Pinhero 2c61c06a0e drivers/ADC: STM32: This solves coverity reported in ADC driver.
This commit it to resolve following bugs:
* Operands don't affect result.
* Logical dead code in stm32_adc driver.
Above mentioned bugs were solved by adding parenthesis and
changed the method of comparing. Since comparison of ADC
channel_id with the channel may cause loss of value.
So instead of direct comparison, introduced a mechanism to
convert channel constant to a decimal using
__LL_ADC_CHANNEL_TO_DECIMAL_NB() and strips away
the INTERNAL_CH bit and then compare with channel_id.

fix:
* zephyrproject-rtos/zephyr#35130
* zephyrproject-rtos/zephyr#35136

Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>
2021-05-27 15:55:19 -05:00
Thomas Stranger 12c80eba71 drivers: can: init timing.sjw also in canfd mode
This commit resolves the undefined behviour caused by missing timing.sjw
initialization.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-05-27 15:54:30 -05:00
Alexey Brodkin 2b2a2cad68 samples: tensorflow: Fix sample path
Otherwise documentation mentions wrong path in the "west" options.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-05-27 14:40:12 -05:00
Torbjörn Leksell 22071d613c Tracing: TRACING_NONE Compilation Fix
Fixed several compilation errors that resulted from selecting
TRACING without specifying a tracing system (Tracerecorder,
CTF, Systemview). In this case (TRACING_NONE), some default trace hooks
(in tracing.h) were incorrectly named resulting in compilation errors.
The legacy sys_trace_isr_enter, sys_trace_isr_exit, and sys_trace_idle
also caused problems since these were only given as defines, resulting
in undefined reference errors since they are required by the assembly
files calling these. To solve this issue I've added a stub file
"tracing_none.c" (only compiled if TRACING_NONE) and declared the
functions in tracing.h if no tracing system is selected.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
2021-05-27 14:39:40 -05:00
Andrzej Głąbek 38e1063a25 doc: release-notes-2.6: Add entries for ADC and PWM drivers
Add release notes related to ADC and PWM.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-05-27 14:38:52 -05:00
Stephanos Ioannidis d05977b8e1 cpp: Restrict C++ exceptions usage to supported archs
This commit makes CONFIG_EXCEPTIONS un-selectable for the architectures
that are known to have broken C++ exception handling support
(see #32448).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-05-27 14:36:13 -05:00