Commit Graph

93461 Commits

Author SHA1 Message Date
Lauren Murphy 8590f6a469 checkpatch: ignore EXPORT_SYMBOL
checkpatch isn't smart enough to detect a function / variable has
been declared e.g. with K_SEM_DEFINE and will incorrectly flag
such cases.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-04-05 12:19:36 +02:00
Lauren Murphy 83ccc8e29b llext: add threads and kernel object test case
Tests threads and kernel objects with userspace. Includes cleanups
suggested by Luca Burelli.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-04-05 12:19:36 +02:00
Jukka Rissanen 83d879bb1a net: if: No error if mcast group join fails because iface down
If we fail to join all nodes or solicit node multicast groups
when the interface is down, then there is no need to print an
error message. The groups are automatically re-joined when the
interface comes up.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:27 +02:00
Sreeram Tatapudi cc2898e6fe modules: hal_infineon: wifi_host_driver: Fix blob case
FIx the name of the cyw43xx_fw_bin

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-04-05 11:55:04 +02:00
Fin Maaß 89c057a95a mgmt: hawkbit: optimize poll_sleep
remove unnecessary condition for CONFIG_HAWKBIT_POLL_INTERVAL,
changes poll_sleep to be in seconds,
change type of sleep_time in hawkbit_update_sleep(), so the return
value of hawkbit_time2sec() is interpreted correctly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 11:54:47 +02:00
Fabio Baltieri e9dceed173 doc: guidelines: add a note about ascii and emojis
Add a note about source files encoding and emojis.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-04-05 11:54:39 +02:00
Luca Burelli 4867c56a51 llext: invalidate instruction cache after loading extension
In addition to flushing the dcache, to ensure that the new code is
actually read by the CPU when loading an extension, the icache must
be invalidated as well.

Without this, some tests are failing in hardware because the CPU is
executing stale code from its instruction cache.

Fixes #70906 on arduino_giga_r1/stm32h747xx/m7.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-05 11:54:31 +02:00
Fin Maaß 97eb8bf78c mgmt: hawkbit: little cleanup
a little cleanup in start_http_client().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 11:54:22 +02:00
Yong Cong Sin cd2c7874b9 posix: uname: use BUILD_VERSION only if not empty
The `BUILD_VERSION` can be defined but empty when built
without git, causing version to be missing from the uname
version string:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]:  Apr  1 2024 23:48:30
machine[8]: riscv64

uart:~$
```

Let's check if it is empty before using it, so that
`KERNEL_VERSION_STRING`, which is generated independently
with cmake can be used as a fallback:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]: 3.5.0 Apr  1 2024 23:53:48
machine[8]: riscv64

uart:~$
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-04 23:47:33 +02:00
Yong Cong Sin fbaf7dfdc1 kernel: banner: use BUILD_VERSION only if not empty
The `BUILD_VERSION` can be defined but empty when built
without git, causing version to be missing from the banner:

```
*** Booting Zephyr OS build  ***
Hello World! qemu_riscv64
```

Let's check if it is empty before using it, so that
`KERNEL_VERSION_STRING`, which is generated independently
with cmake can be used as a fallback:

```
*** Booting Zephyr OS build 3.5.0 ***
Hello World! qemu_riscv64
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-04 23:47:33 +02:00
Daniel DeGrasse 20b7b6e1d4 boards: shield: adafruit_2_8_tft_touch_v2: add support for RD_RW612_BGA
Add support for the RD RW612 BGA board for the adafruit_2_8_tft_touch_v2
shield. This board uses a custom LCDIC MIPI DBI controller, which
requires a specific board overlay to enable the shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse b530202871 boards: nxp: rd_rw612_bga: add support for LCDIC
Enable support for LCDIC on rd_rw612_bga. This support also enables
acceleration features such as DMA for LVGL, to improve performance

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse 049b2d8620 boards: nxp: rd_rw612_bga: add support for arduino header
Add arduino header support for rd_rw612_bga, so this board can be used
with arduino shields

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse b6477deb4a soc: nxp: rw: add reset code for LCDIC
Clear LCDIC reset signal at init when the LCDIC peripheral is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse cc3de261aa dts: arm: nxp_rw6xx: add LCDIC node
Add LCDIC devicetree node or RW6xx SOC

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse 2206085cd8 drivers: mipi_dbi: introduce NXP LCDIC driver
Introduce NXP LCDIC driver using MIPI DBI class. This peripheral
supports 8080 and SPI 3/4 wire mode, although only SPI 4 wire support is
currently implemented. The driver supports DMA and interrupt driven
transfers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse 2ec7a8df3a dts: bindings: add devicetree binding for NXP LCDIC
Add devicetree binding for NXP LCDIC. This controller is capable of
driving displays in 8080 or SPI 3/4 wire mode, and optionally swapping
endianness of display data as it sends it.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse e6a1337726 drivers: clock_control: clock_control_mcux_syscon: add LCDIC clock
Add LCDIC clock support to MCUX SYSCON clock driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Emilio Benavente dc1ad210cb boards: nxp: frdm_mcxn947: Enabled Watchdog
Enabled the watchdog for
frdm_mcxn947 board.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-04-04 23:58:01 +03:00
Emilio Benavente dbd1da973b dts: arm: nxp: nxp_mcxn94x: Added watchdog node
Added the dts node for the
wdt watchdog and updated the
clock frequency.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-04-04 23:58:01 +03:00
Jamie McCrae 554ed2235c drivers: sensor: mpu6050: Add support for MPU6500
Adds basic support for using this driver with a MPU6500 device

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-04-04 15:22:08 -05:00
Jakub Rzeszutko f8263e8293 shell: Add synchronization for prompt-string access in shell
Resolved a data race in shell.c by copying the user-provided
prompt-string into a private buffer within the shell, ensuring
proper synchronization with the shell-thread.

Fixes: #64972

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2024-04-04 15:18:36 -05:00
Georgios Vasilakis 7a8d454e22 soc: nordic: Refactor soc_secure.h
The soc_secure_* function are used by the non-secure application
to access hardware resources which are mapped as secure.
Using these functions for hardware resources mapped as non-secure
is missleading.

We have some soc_secure_* functions which read FICR values.
In nRF91 and nRF53 platforms this made sense since FICR
has hardware fixed mapping as secure.
For nRF54 though the FICR has hardware fixed mapping as non-secure.

This change refactors the soc_secure.h to exclude the functions
which read FICR values from being included when FICR is mapped as
non-secure.

Also updates the hwinfo and ieee802154 drivers to adjust to this change.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2024-04-04 13:17:13 -05:00
Jamie McCrae d3edd34df3 drivers: sensor: dht: Add lock IRQ option
Adds an option that allows for locking all interrupts when reading
the data from this sensor, this can be used alongside systems like
Bluetooth to vastly increase chances of getting a reading from the
sensor successfully, at the risk of losing Bluetooth packets.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-04-04 13:16:18 -05:00
Sylvio Alves 5cd077029e samples: board: esp32: rename board config to meet proper cpu cluster
This sample conf and overlay file regarding esp_wrover_kit should
be used only for procpu.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-04 13:14:27 -05:00
Daniel DeGrasse 2ad951ca85 tests: drivers: uart_async_api: enable for frdm_mcxn947
Enable the UART async API test for the frdm_mcxn947 board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 19:27:28 +02:00
Daniel DeGrasse cbcbe7f43d boards: nxp: frdm_mcxn947: add pinctrl for LPUART2
Add pinctrl and board enablement for LPUART2, which is broken out to
P4_2 and P4_3 on the FRDM board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 19:27:28 +02:00
Daniel DeGrasse 6b6adc07d0 dts: arm: nxp_mcxn94x: add EDMA channels for LPUART RX and TX
Add EDMA channels for LPUART RX and TX to LPFLEXCOMM 2 and 4, as these
nodes are enabled with the UART driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 19:27:28 +02:00
Flavio Ceolin d832c12a28 doc: release-notes-3.7: Add CVE-2024-3077 info
Add CVE-2024-3077 to release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-04 12:22:57 -04:00
Flavio Ceolin 2e053e8116 doc: security: CVE-2024-3077 left embargo
Disclose information about CVE-2024-3077.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-04 12:22:57 -04:00
Jukka Rissanen 6e4bdb7510 west.yaml: Update net-tools module
The net-tools contains net-capture.py update to show information
of captured SLL packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen c6ea98eb6f doc: net: Add information for cooked mode capture
Add cooked mode capturing information to network documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 4ae75194aa samples: net: capture: Add a way to capture some cooked data
For demonstration purposes add a way to capture some arbitrary
data and send it in cooked mode for analysis.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 76290b052f samples: net: echo-server: Make sure to attach to correct tunnel
If there are multiple tunnels, then use the tunnel device name
to select the correct one. Note that this tunnel is only used
for network packet capture in this sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 7fdebb5a91 drivers: net: ppp: Add packet capture support
User is able to enable packet capture for low level HDLC data
frames received from and sent to network. This data can sent to
remote system for analysis. The captured data is encapsulated
into Linux cooked mode SLL packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 78a0cfbd94 net: shell: capture: Set capture device if user did not use shell
If user created the capture device using the API and not via
the shell, then the device name was not set. Use the default
capture device in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 2064306d41 net: capture: Generate events when starting / stopping capture
The event NET_EVENT_CAPTURE_STARTED is generated when the
capture is enabled, and NET_EVENT_CAPTURE_STOPPED when capture
is disabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen dca5f48165 net: capture: Allow user to check capture status without knowing dev
As user might not know the capture device name, allow
net_capture_is_enabled() to be called with a NULL device name.
Currently it then uses the hardcoded device name, but we could
change that in the future so that the function could figure out
the correct name itself.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 0516ce9311 net: capture: Add capture function that returns a status
The net_capture_pkt() does not return information what happened
to the net_pkt because the packet was always cloned. With cooked
capture we can avoid the cloning in which case we need to know
the capture status in order to unref the packet if needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 46cb5c0bd1 net: capture: Add Linux cooked mode capture support
Add support for capturing arbitrary data via the cooked mode (sll)
capture API. The actual packet capture is done using net_capture_data()
function, the packet capture infrastructure does not need any changes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen b8f7942377 posix: net: Add ARP header types to if_arp.h
Add various ARP types needed in packet capture support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen e52b708178 net: ethernet: Add more protocol types
Add ETH_P_CAN, ETH_P_CANFD and ETH_P_HDLC protocol types so that they
can be used in following commits.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 3bd43ea865 net: Implement pseudo a.k.a "any" interface
Allow user to create a kitchen sink pseudo a.k.a any network
interface that one is only able to write to. This might seem
unnecessary, but it is possible to attach virtual network
interfaces on top of this pseudo interface. These virtual
interfaces could then process the data for example for
packet capture purposes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 00502a8894 net: Add helper to print the verdict as string
For debugging purposes it would be nice to see the verdict
printed as a string instead of number.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 9a9f6f3d96 net: dummy: Add support for receiving data
Add a recv callback to dummy API. After this it is possible to
receive data by a dummy network interface. This is only useful
if one attaches a virtual interface on top of the dummy one.
One such example is the cooked mode capture interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:11 +02:00
Jukka Rissanen 33c075d705 samples: net: net_mgmt: Fix build failure on multiple boards
The CONFIG_MAX_THREAD_BYTES=3 needs to be set for multiple
boards like mr_canhubk3 and xiao_ble when running in usermode.

Too many thread objects (18)
Increase CONFIG_MAX_THREAD_BYTES to 3

Fixes #70955

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:04 +02:00
Jukka Rissanen b8fc1c4c3e samples: net: Disable native_posix target in samples
The native_posix compilations fail with various socket
errors like this:

samples/net/sockets/echo_server/src/udp.c:45:26: error: implicit \
 declaration of function ‘socket’ [-Werror=implicit-function-declaration]
 45 |         data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM,
    |                                 IPPROTO_UDP);

Disable the native_posix board from networking samples so that CI can pass.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-04 17:02:04 +02:00
Dmitrii Golovanov 300507d43b twister: blackbox: pylint no-name-in-module warnings
Ignore no-name-in-module pylint warnings.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-04-04 17:01:55 +02:00
Dmitrii Golovanov a8eaa401a6 twister: blackbox: Fix test_output time-sensitive asserts
Exclude time-sensitive log entries at `test_output` to avoid
false negatives comparing build logs.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-04-04 17:01:55 +02:00
Dmitrii Golovanov 2ef6b98b98 twister: footprint: Improve command-line arguments
Improve Twister command line arguments for memory footprint:

 * group and order footprint arguments meaningfully,
 * clearer help descriptions,
 * resolve logical inconsistences for combinations of arguments,
   in particular:
   `--last-metrics` now forces `--enable-size-report`,
   `--show-footprint` now controls only detailed log output of
       footprint deltas in comparison modes.
 * align twister tests accordingly.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-04-04 17:01:55 +02:00