Commit graph

72338 commits

Author SHA1 Message Date
Keith Packard
e478a4e850 subsys/cpp: make libstdc++ select full libc to get tests working
Using a STD C++ library requires a toolchain-provided C library with
associated STD C++ library. Instead of using a dependency on !MINIMAL_LIBC,
select REQUIRES_FULL_LIBC so that the build will select a viable C library
rather than failing.

This allows all of the C++ tests to be run as a part of a standard twister
run. I expect this will uncover regressions in some of those which haven't
been run recently.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-11-22 12:54:00 +09:00
Andrzej Głąbek
595fbf9b97 drivers: uart_nrfx_uarte: Remove redundant HW_RX_COUNTING_ENABLED calls
Merge three adjacent `if (HW_RX_COUNTING_ENABLED(data))` blocks into
a common one.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-11-22 12:46:38 +09:00
Andrzej Głąbek
9628ecdc39 drivers: uart_nrfx_uarte: Fix call to HW_RX_COUNTING_ENABLED()
Since the macro references `data->async->hw_rx_counting`, it cannot
be called when `data->async` is NULL, and this could happen when the
PM_DEVICE_ACTION_RESUME action was requested for an instance that uses
the interrupt-driven API while for another instance that uses the
asynchronous API the hardware counting of bytes was configured.
Prevent this by calling the macro from a proper `if` block.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-11-22 12:46:38 +09:00
honglin leng
676441e0ca xtensa: remove xtensa asm unused header
1. this header is no use for asm

2. if use xclib, this header include xclib stdbool, and expand to typedef

Signed-off-by: honglin leng <a909204013@gmail.com>
2022-11-22 12:45:33 +09:00
Jamie McCrae
0922ec7d75 mgmt: mcumgr: Move zephyr basic group defines to standard files
Moves the zephyr group ID defines to the mgmt header file as it is
with other group IDs and moves the zephyr basic group command IDs
to the the same header-location style as other groups.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-22 12:42:48 +09:00
Jamie McCrae
4cf008cb45 mgmt: mcumngr: Remove old files missed in restructure
Removes some old files that should have been deleted in the recent
cleanup of MCUmgr.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-22 12:42:09 +09:00
Jamie McCrae
cbd0d2d55a mgmt: mcumgr: Add fs_mgmt prefix to hash/checksum functions/files
This aligns the naming of files in fs_mgmt so that files and
functions relating to hash/checksum are prefixed with fs_mgmt.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-22 12:41:49 +09:00
Emil Gydesen
4c70bf6630 MAINTAINERS: Add fredrikdanebjer to Bluetooth Audio
Add fredrikdanebjer as a collaborator for Bluetooth Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-21 17:18:39 -05:00
Emil Gydesen
5a86458169 MAINTAINERS: Add szymon-czapracki to Bluetooth Audio
Add szymon-czapracki as a collaborator for Bluetooth Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-21 16:58:14 -05:00
Fabio Baltieri
7b57d3c5bb scripts: compliance: check for binary files
Add a compliance check that fails if the diff is adding any binary file
to prevent committing them by mistake.

Only check for added files and explicitly allow image files in doc/ and
boards/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-21 16:12:04 -05:00
Yuval Peress
c585df4996 unittest: add C++ support
Some of the struct in the unit test's cpu.h header were empty which
isn't allowed in C++.

Signed-off-by: Yuval Peress <peress@google.com>
2022-11-21 16:11:14 -05:00
Yuval Peress
fae9923ff2 unittest: update coverage library non gcc toolchains
When building with clang, the unittests were giving us an error:
```
error: undefined symbol: llvm_gcda_start_file
```

This seems to be from linking in `gcov` regardless of the toolchain.
It appears that clang doesn't need any special library for coverage.
With this change the following now produce identical coverage reports:

```
$ ZEPHYR_TOOLCHAIN_VARIANT=zephyr ./scripts/twister -p unit_testing \
  --coverage -i -T tests/unit/intmath/
$ ZEPHYR_TOOLCHAIN_VARIANT=host ./scripts/twister -p unit_testing \
  --coverage -i -T tests/unit/intmath/
$ ZEPHYR_TOOLCHAIN_VARIANT=llvm ./scripts/twister -p unit_testing \
  --coverage -i --coverage-tool lcov                              \
  --gcov-tool $(pwd)/scripts/utils/llvm-gcov.sh                   \
  -T tests/unit/intmath/
```

Signed-off-by: Yuval Peress <peress@google.com>
2022-11-21 16:09:46 -05:00
Chun-Chieh Li
59f3316d33 usb: audio: do not discard usb_transfer result in usb_audio_send()
Pass result of usb_transfer() as return value to the user,
and allow user to react accordingly, e.g. release net_buf on error.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2022-11-21 20:11:24 +01:00
Emil Gydesen
0a570a25c9 Bluetooth: Audio: Fix null pointer access in mcc.c
One of the notification callback functions did not properly
get the `read_params` pointer, causing an invalid result of
CONTAINER_OF as it would use a NULL pointer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-21 20:11:13 +01:00
Jamie McCrae
adbbb02525 mgmt: mcumgr: Fix include typo
Fixes a typo in an include statement which causes a build failure.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-21 17:34:02 +01:00
Carles Cufi
090572c801 github: compliance: Remove maintainers check
The assigner.yml workflow already performs the same checks.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
5ed037023b github: workflows: Avoid listing tests manually
Instead of listing each test manually, use the script itself to list
them:

- When invoking it just exclude the one we don't want by default
- When parsing the output files, use the -l output as a list

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
49b01b39b6 scripts: compliance: Remove unconditional debug output
This prevents us from parsing the scripts' output correctly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
66ad0e68a6 scripts: compliance: Use consistent naming convention
Tests are named with CamelCase in general, use that in the names.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
8c12efe2e5 scripts: compliance: Make test filtering case insensitive
To simplify using the -m and -e command-line options make the test
filtering case insensitive.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
95053c8358 scripts: compliance: Fix DT Bindings check name
Check names must not contain spaces, since they are passed via `-m` in
the command-line.

Also update .gitignore and compliance.yml.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Carles Cufi
8275457709 scripts: compliance: Fix wrong call
Fix call to parse_dt_bindings() in the Devicetree Bindings check.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:02:39 -05:00
Dominik Ermel
d41832f830 modules/fatfs: Move FATFS Zephyr specific code and cmake
The code moves Zephyr specific code and CMakeLists.txt
under modules/fatfs/.

The commit also adds zephyr_fatfs_config.h header file, that
is now used to override FF_ options of ffconf.h file within
fatfs repository.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-21 16:48:14 +01:00
Dominik Ermel
b5af6e2c05 manifest: Update FAT FS module revision
The update brings FAT FS revision with most Zephyr specific
source code changes removed, as required sources are now
stored in modules/fatfs/, within Zephyr project directory.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-21 16:48:14 +01:00
Manuel Arguelles
53e1ea58e0 soc: nxp_s32: update baremetal drivers version
HAL for NXP S32 is updated to a newer version, hence some headers and
macro definitions must be updated accordingly.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-21 09:18:13 -06:00
Veijo Pesonen
606515c6c4 scripts: requirements: extras: add zcbor
Add ZCBOR to the requirements-extras.txt and require at least version
0.6.0 which is the current version of the ZCBOR C library.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-11-21 16:11:04 +01:00
Gerard Marull-Paretas
b38eb53e00 doc: extensions: kconfig: allow to copy link to results
This patch allows copying a URL to the current Kconfig search results.
For example, I can now share the search results for "CONFIG_TEST.*". A
new button is added to the search box that, when clicked, copies to the
clipboard the URL.

This feature is achieved by prepending query hashes with '!'. When '!'
is found, the content of the URL hash is left intact, whereas before it
was always enclosed within '^$' to produce an exact match.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-21 15:51:40 +01:00
Gerard Marull-Paretas
d3c0e95f97 doc: extensions: kconfig: fix module prefix handling
If two modules started with the same prefix, e.g. nrf and nrfxlib, the
file name prefix was incorrectly set with the common prefix. Include
trailing "/" to the comparison, so that we match the full module name.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-21 15:51:40 +01:00
Anas Nashif
23f0578042 ci: twister: checkout tree when merging results
Needed for the script used to upload results to opensearch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-21 14:40:53 +01:00
Cong Nguyen Huu
c304db56f1 twister: add option cleanup all tests
add 2 choices for '--runtime-artifact-cleanup' option,
'passing' to delete artifacts of passing tests,
'all' to delete artifacts of both passing tests
and failing tests

keep testcase_extra.config, it contains some extra Kconfig
needed for the tests and they is only generated first time
when run retry failed

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2022-11-21 08:39:13 -05:00
Carles Cufi
c10ec51bc1 codeowners: Add myself to check_compliance.py
I've been doing quite a bit of work on it and plan to do quite a bit
more.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 08:16:37 -05:00
Daniel DeGrasse
2e49ca986e boards: mimxrt595_evk_cm33: Remove FLASH_SIZE setting
Remove FLASH_SIZE setting, as this is now set from the SOC level via the
flash chosen node. Also, correct the flash controller node to the flash
device that implements flash support

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
54ea741a65 soc: arm: nxp: use zephyr,chosen flash node for RT5xx flash base address
Update rt5xx base address calculation to use the zephyr,chosen flash node
to determine flash base address. Note that due to the external flash
controller, the flexSPI base address must be used when the flash device
is on the flexSPI bus.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
a2bc7eb885 dts: nxp_rt6xx: correct FlexSPI memory mapped region size
FlexSPI memory map indicates that the FlexSPI register space is 128MB, not
64MB. Update this value to be correct.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
8170bf7ebf boards: mimxrt685_evk_cm33: Remove FLASH_SIZE setting
Remove FLASH_SIZE setting, as this is now set from the SOC level via the
flash chosen node. Also, correct the flash controller node to the flash
device that implements flash support

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
b455492b1b soc: arm: nxp: use zephyr,chosen flash node for RT6xx flash base address
Update rt6xx base address calculation to use the zephyr,chosen flash node
to determine flash base address. Note that due to the external flash
controller, the flexSPI base address must be used when the flash device
is on the flexSPI bus.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
6aa7194d48 scripts: kconfig: add dt_node_has_compat kconfig function
Add dt_node_has_compat kconfig function, to check if a node path has a
given compatible string while parsing kconfig files

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
db9bcd90ce scripts: kconfig: add dt_node_parent kconfig function
Add dt_node_parent kconfig function, to get parent path for a given
devicetree path when parsing kconfig files

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Carles Cufi
4796ffee7a drivers: mm: Move mm_drv_intel_adsp_mtl_tlb to zephyr/
This file was mistakenly placed in include/ instead of include/zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 20:43:50 +09:00
Joakim Andersson
51d510adc6 Bluetooth: host: Call RPA expired on disabled advertising sets
Call the RPA expired callback on advertising sets even when they are
not enabled.
The RPA expired callback will now be called on advertising sets
when the BT_ADV_RPA_VALID flag is cleared for the set.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-21 12:36:50 +01:00
Joakim Andersson
d63ae607cc Bluetooth: host: Fix RPA timeout expiration
Fix RPA timeout expiration when BT_EXT_ADV has been enabled.

Always invalidate the device RPA on RPA timeout.
This RPA is used by the scan roles, and the advertiser that was started
using the bt_le_adv_start API.

Call the RPA expire callback only on advertising sets that are enabled
and not being limited by a timeout and not using the identity address.
On RPA timeout always invalidate the RPA of advertising sets that are
disabled.

Fixes: #51208
Fixes: #51228
Fixes: #51247

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-21 12:36:50 +01:00
Joakim Andersson
0a1a32841f Revert "Bluetooth: Host: Fix resolvable address update with Ext Adv enabled"
This reverts commit 6c40427931.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-21 12:36:50 +01:00
Joakim Andersson
ff36bd42d0 Bluetooth: shell: Add shell support for RPA expire callback and control
Add shell support for RPA expire callback.
This prints a message when the callback is called on the specific
advertising set.
Add a command to control the return value of this callback for a
specific advertising set.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-21 12:36:50 +01:00
Joakim Andersson
ba657c9570 Bluetooth: shell: Use a common help text for commands args on and off
Use a common help text for commands args on and off.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-21 12:36:50 +01:00
Carles Cufi
c0b87fd0e3 root: Remove stray .bin file
The mcuboot_zephyr.bin file was added mistakenly in
6ff0b79d74.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 11:42:23 +01:00
Martin Fletzer
144d30eb47 net: gptp_md: Consider different resolutions regarding correction field
From https://www.ieee802.org/1/files/public/docs2007/as-garner-protocol-state-machines-frame-formats-0307.pdf:
  The correctionField is the value of the correction
  measured in nanoseconds and multiplied by 2^16.

Zephyr uses nanoseconds for follow_up_correction_field.
Therefore, the value must be shifted by 2^16.

Signed-off-by: Martin Fletzer <martin.fletzer@kftec.at>
2022-11-21 10:14:48 +01:00
Guillaume Gautier
fde9a657da include: zephyr: drivers: clock_control: LSI support for STM32WB
Add LSI1 and LSI2 (both present on STM32WB) to the list of possible
source for LSI clock
Solve a regression for RTC counter

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-21 10:14:41 +01:00
Guillaume Gautier
68f6ebfd6c boards: arm: Add support for rtc for Nucleo F103RB, L4A6ZG & F103 mini
Add LSI clock and RTC clock source for Nucleo F103RB, L4A6ZG and
F103 mini to resolve a regression concerning the RTC counter

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-21 10:14:41 +01:00
Guillaume Gautier
b5f9ea073e include: zephyr: dt-bindings: clock: Add sysclk for STM32F1, F4 & L1
For STM32F1, F4 & L1 series, add the definition of SYSCLK to solve a
regression concerning the RTC counter

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-21 10:14:41 +01:00
Chris Friedt
bf0612cae3 doc: build: dts: bindings: discourage use of redundant: false
Aside from base properties (maybe for documentation purposes),
`required: false` should not be encouraged.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 13:12:44 -05:00