Commit graph

69208 commits

Author SHA1 Message Date
Henrik Brix Andersen 720eeab30f samples: drivers: can: increase the maximum number of shell arguments
Remove the custom Kconfig value for CONFIG_SHELL_ARGC_MAX as it is too low
to account for the new arguments to the "can send" shell command.

The default for CONFIG_SHELL_ARGC_MAX was increased to 20 in
32ebeb0a5c which is sufficient for sending
non-CAN-FD format frames using the new "can send" shell command.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-31 10:45:35 +02:00
Henrik Brix Andersen 2f73225aa8 drivers: can: rewrite the CAN shell module
Rewrite the CAN shell module to catch up with the added CAN controller API
functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-31 10:45:35 +02:00
Adam Wojasinski 56e0ff09d7 tests: drivers: timer: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Adam Wojasinski 63ab9b3c6d drivers: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Adam Wojasinski 47db797236 Bluetooth: controller: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Adam Wojasinski a04a451a9f soc: arm: nordic_nrf: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Adam Wojasinski 01d85c2f18 boards: arm: qemu_cortex_m0: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Ola Tangen Kulseng 00aa80bb8c net: lwm2m: thread safety in the rd client
Used the mutex in the client to protect the state transitions of
client.state.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-08-31 10:42:02 +02:00
Ola Tangen Kulseng 0a87c2d0d0 net: lwm2m: Thread safe lwm2m registry
Created the mutex registry_lock to:
- protect read and write operations
- protect the registry.
Only partially finished as the functions like lwm2m_engine_get_obj
warrants a larger refactoring to completely thread safe the registry.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-08-31 10:42:02 +02:00
Juha Heiskanen 534c7f2246 net: lwm2m: Fixed LwM2M message wrong error response
LwM2M was not reported properly case when message "Accept"
coap option was not not supported. In that case LwM2M transport
specification define 4.06 "Not Accepted"

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-08-31 10:41:49 +02:00
Gerhard Jörges d835c1b80c boards: arm: rpi_pico: add jlink runner conf
Add jlink configuration.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-08-31 10:41:40 +02:00
Emil Gydesen 6cc8b57bc5 footprint: Add bt_hci_rpmsg for the nRF5340 netcore
Add footprint tracking of the samples/bluetooth/hci_rpmsg
sample for the nRF5340. This is a BT controller-only build
for the nRF5340 with minimum features.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-31 10:41:32 +02:00
Anas Nashif 6d3dfd009a boards: nxp_adsp: remove unused CONFIG_BOOTLOADER_SRAM_SIZE
This option is not being used by xtensa, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-31 10:41:22 +02:00
Anas Nashif 6e7e9c2ba8 boards: intel_adsp: remove unused CONFIG_BOOTLOADER_SRAM_SIZE
This option is not being used by xtensa code, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-31 10:41:22 +02:00
Daniel Leung 7019baf6ac tests: kernel/smp: don't use stack to pass thread args
Inside test_get_cpu, the current CPU ID is stored in the test
thread's stack. Another thread is spawned with a pointer to
the variable holding this CPU ID, where this thread is supposed
to run on another CPU. On a cache incoherent platform, this
value of this variable may not have been updated on other CPU's
internal cache. Therefore when checking CPU IDs inside the newly
spawned thread, it is not checking the passed in CPU ID, but
actually whatever is on the another CPU's cache. This results in
random failure on the test_get_cpu test. Since for cache
incoherence architectures, CONFIG_KERNEL_COHERENCE is enabled by
default on SMP where shared data is placed in multiprocessor
coherent (generally "uncached") memory. The fix to this is to
simply make this variable as a global variable, as global
variable are consided shared data and will be placed in
multiprocessor coherent memory, and thus the correct value will
be referenced inside the newly spawned thread.

Fixes #49442

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-31 10:41:16 +02:00
Daniel Leung dbe3874079 tests: kernel/smp: wait for threads to exits between tests
This adds a bunch of k_thread_join() to make sure threads spawned
for a test are no longer running between exiting that test. This
prevents interference between tests if some threads are still
running when assumed not.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-31 10:41:16 +02:00
Pirun Lee c3f2da178b samples: bluetooth: adding central_otc sample
Added a Bluetooth Central sample that demonstrates how to use
GATT Object Transfer Profile.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-31 10:39:33 +02:00
Pirun Lee c4bd693d9a Bluetooth: OTS - Client APIs add Object Write sub-procedure
OTS client: Add object write function.
Also add write object callback.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-31 10:39:33 +02:00
Carles Cufi 8644b333cd west: Update bash autocomplete file
Update the existing bash autocomplete with the latest commands and
command-line switches.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-31 10:38:01 +02:00
Stephanos Ioannidis e6d7118f0e tests: log_core_additional: Fix log_user test filter
This commit temporarily disables the `integration_platforms` for the
`log_user` test because it cannot be specified alongside the
`toolchain_exclude` filter.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-30 17:28:05 -04:00
Carles Cufi 7dde7f626f Revert "shell: Fix dependency to log_output"
This reverts commit b0072e1cea.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-30 17:28:05 -04:00
Carles Cufi d03d17a7fa Revert "logging: cleanup in CMakeLists.txt"
This reverts commit af31cad836.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-30 17:28:05 -04:00
Daniel DeGrasse f1bafda5e5 docs: getting_started: add note about west boards command
Add note about west boards command to getting started documentation,
to make it easier for users to determine the name of their board when used
with west. Also change "-p auto" to "-p always" in the build step, since
this is more deterministic

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-30 16:44:23 +02:00
Daniel DeGrasse e1bcc0a0cc docs: getting_started: change default python setup to use virtual env
Change default python setup suggested in getting started guide to use
virtual environments. This aligns with the documentation itself, which
suggests that users use virtual environments with Zephyr. The Windows
python setup is also updated with the correct command to create a
virtual environment, as "python3" is not a defined executable in a
windows commandline after installing python with chocolatey

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-30 16:44:23 +02:00
Gerard Marull-Paretas 2e0899e8ca pm: state: use DT_FOREACH_CHILD_SEP
Avoid usage of auxiliary macros by using DT_FOREACH_CHILD_SEP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 50cfb3a567 samples: drivers: led_pwm: use DT_FOREACH_CHILD_SEP_VARGS
use DT_FOREACH_CHILD_SEP_VARGS to avoid an auxiliary macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas d19875e510 drivers: intc: gic: use DT_FOREACH_CHILD_STATUS_OKAY_SEP
Remove the need for an auxiliary macro by using
DT_FOREACH_CHILD_STATUS_OKAY_SEP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 9c8cd560f0 drivers: gpio: xlnx_ps: use DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP
Simplify driver by using DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP (avoids
DT_DRV_INST and auxiliary macro).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 1bc794c7d4 drivers: gpio: nct38xx: use DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP
Simplify driver by using DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP (avoids
both DT_DRV_INST and auxiliary macro).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 5954ea1c65 arch: arm64: core: smp: use DT_FOREACH_CHILD_STATUS_OKAY_SEP
Avoid auxiliary macros by using DT_FOREACH_CHILD_STATUS_OKAY_SEP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 40542638fd drivers: led: gpio: use DT_INST_FOREACH_CHILD_SEP_VARGS
Avoid auxiliary macros by using DT_INST_FOREACH_CHILD_SEP_VARGS

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 44552df4f5 drivers: led: pwm: use DT_INST_FOREACH_CHILD_SEP
Remove the need for auxiliary macros by using DT_INST_FOREACH_CHILD_SEP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas 18454e46f2 devicetree: add DT_INST_FOREACH_CHILD_STATUS_OKAY* macros
Add the instance version of the DT_FOREACH_CHILD_STATUS_OKAY* family of
macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas fff9ecbc7f devicetree: add DT_(INST_)FOREACH_CHILD(_STATUS_OKAY)_SEP(_VARGS)
It is frequent to see in Devicetree code constructs like:

```c
 #define NAME_AND_COMMA(node_id) DT_NODE_FULL_NAME(node_id),

const char *child_names[] = {
	DT_FOREACH_CHILD(DT_NODELABEL(n), NAME_AND_COMMA)
};
```

That is, an auxiliary macro to append a separator character in
DT_FOREACH* macros. Non-DT API, e.g. FOR_EACH(), takes a separator
argument to avoid such intermediate macros.

This patch adds DT_FOREACH_CHILD_SEP (and instance/status okay/vargs
versions of it). They all take an extra argument: a separator. With this
change, the example above can be simplified to:

```c
const char *child_labels[] = {
	DT_FOREACH_CHILD(DT_NODELABEL(n), DT_NODE_FULL_NAME, (,))
};
```

Notes:
- Other DT_FOREACH* macros could/should be extended as well

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Gerard Marull-Paretas d77f4e61de scripts: dts: gen_defines: add DT_DEBRACKET_INTERNAL helper
Add a utility macro used to remove brackets from around a single
argument. While __DEBRACKET exists in util_internal.h, this change makes
DT independent (otherwise we should include util_internal.h, which is
another option).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Ola Tangen Kulseng 24a84ae743 net: lwm2m: Documentation of the lwm2m engine
I've provided documentation for the API's
- lwm2m_registry.h
- lwm2m_engine.h

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-08-30 14:19:05 +00:00
Hu Zhenyu 6e2b6fed26 tests: net: igmp: move to new ztest API
Move net igmp tests to use new ztest API
1. Add teardown, delete callback and remove addr
2. Combine join/leave

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-30 14:18:41 +00:00
Hu Zhenyu 5e4b99772c tests: net: ipv6: move to new ztest API
Move net ipv6 tests to use new ztest API
1. Add rm_neighbor/rm_max_neighbors
2. Add a setup function including:
   add ifaddr_record to record ifaddr for teardown use
   add neighbor operations
3. Add a teardown fuction including:
   remove neighbor operations
   remove maddr
   set ifaddr_record to not used
4. add k_yield after rs message, so that ra_message can start receive
5. add leave_group, to restore to the original state after join_group
6. restore the mac address to original in test_change_ll_addr()
7. remove the addr/maddr to restore original in necessary test cases

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-30 14:18:28 +00:00
Hu Zhenyu 724bbcbc05 tests: net: iface: move to new ztest API
Move net iface tests to use new ztest API
1. Add teardown, remove addr and interface down
2. Add pkt unref
3. Combine interface up/down, promisc off/on, addr add/rm

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-30 14:18:11 +00:00
Hu Zhenyu 739b3d16fc tests: net: ethernet_mgmt: move to new ztest API
Move net/ethernet_mgmt tests to use new ztest API
1. Combine the tests of the same kind
2. To make the test be able to run multiple times
   set back "auto neg" to original state(true) when test is done.
   set back linkspeed to original 10Mbps when the test is done.
   set back duplex to original state(true) when test is done.

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-30 14:18:00 +00:00
Anas Nashif b2f80b0e16 MAINTAINERS: update files for i2c drivers
Update files for i2c area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-30 07:53:13 -04:00
Anas Nashif 804b78fe75 MAINTAINERS: update files for ethernet drivers
Update files for ethernet area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-30 07:53:13 -04:00
Anas Nashif 9ad8f8191b MAINTAINERS: update files for kscan/espi
Update files for both areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-30 07:53:13 -04:00
Anas Nashif 76bf16ef0c MAINTAINERS: update IPM entry
Added missing files and updated status.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-30 07:53:13 -04:00
Daniel Leung ac7e679ae5 tests: log_stack: increase stack size for x86 and immediate mode
Stack usage has increased for immediate mode on x86, so increase
the threshold for stack size.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-30 12:49:31 +02:00
Kumar Gala 492a741d9f crypto: remove proj setting of crypto drivers
Now that crypto drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Kumar Gala 4f2cbdb41a crypto: remove Kconfig.defconfig* setting of crypto drivers
Now that crypto drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Kumar Gala 310190ca01 drivers: crypto: Update Kconfig
* Utilize DT_HAS_<COMPAT>_ENABLED for devicetree based drivers

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Vinayak Kariappa Chettimada 94710e0f6d Bluetooth: Controller: Kconfig to permit periodic sync event skip
When AUX_ADV_IND or AUX_CHAIN_IND auxiliary channel PDU scan
radio event overlaps Periodic Sync radio event in unreserved
time space, let the Periodic Sync radio event be aborted so
that the auxiliary channel PDU can be received to generate
Extended Advertising Reports. Added a new Kconfig to enable
this.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-30 10:30:16 +02:00
Hu Zhenyu 13742807ff tests: net: traffic_class move to new ztest API
Move traffic_class tests to use new ztest API
TEST=twister -T tests/net/traffic_class

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-30 10:27:07 +02:00