Commit graph

70014 commits

Author SHA1 Message Date
Enjia Mai
8b97e7b29f soc: xtensa: split the cavs server and the FW loader
Spilt the cavs server and FW loader, to make the cavstool.py
a pure FW loader and runner as it used to be. The reasons is
try to keep the FW loader won't be affected by the client-
server-based HW service as possible, and more easy to debug.

After splitting them, the service program spawns another
process to run the FW loader. The advantage is no matter when
the FW loader is stuck, the service can detect and stop it,
then continue to next test.

Fixes #47652.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
Enjia Mai
581fc89084 soc: xtensa: tool: duplicate the cavstool.py to remote-fw-service.py
Copy cavstool.py to remote-fw-service.py in order to track changes
for following splitting work of cavstool.py.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
Andrzej Puzdrowski
8557082f7e manifest: mcuboot update
Limit allowed build platforms.
Building sample.bootloader.mcuboot for many platforms
is not possible (for instance a qemu).
The limit is need as otherwise zephyr-rtos/zephyr CI is
failing on any push to main branch or nightly CI run.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-16 23:54:47 +09:00
Stephanos Ioannidis
fad899d2ad ci: twister: Check out west modules for test plan
This commit updates the twister workflow to check out the west modules
before running the test plan script for the pull request runs because
the twister test plan logic resolves the the module dependencies and
filters tests based on the local availability of the required modules.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-16 21:04:25 +09:00
Francois Ramu
9926b90bf6 drivers: uart: stm32 uart driver must include ll_exti with CONFIG_PM
Missing include to compile correctly when the
CONFIG_PM && IS_UART_WAKEUP_FROMSTOP_INSTANCE are defined

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-16 10:49:18 +00:00
Jonas Woerner
6432e100aa Bluetooth: Host: Make adv error reporting more consistent
this changes adv_new_legacy to adv_get_legacy.
without this fix the function would return NULL if BT_EXT_ADV is enabled.

Signed-off-by: Jonas Woerner <jonas.woerner@online.de>
2022-09-16 10:53:31 +01:00
Andrzej Puzdrowski
cfc96eaacc manifest: mcuboot update
This update contains the version update which was reverted plus
relevant bugfixes.
The revert take places here: #50120

Synch up to the mcu-tools/mcuboot SHA:
73d69e9b566daac1a91724aa1237bfc1b9d51fa3

- Switched zephyr port from using FLASH_AREA_ macros to FIXED_PARTITION_
macros
- Made flash_map_backend.h compatible with a C++ compiler
- Enabled watchdog feed by default
- Allowed to get the flash write alignment basing on the zephyr,flash
DT chosen node property

- fixed watchdog device typos
- serial recovery: fixed build failure if CONFIG_BOOT_SERIAL_DETECT_PIN
has undefined value

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-16 09:12:14 +00:00
Andrzej Puzdrowski
102583ab7f drivers/flash: move JESD216 option into FLASH
This option is part of FLASH API configuration.
I moved it where it belongs.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-16 08:41:40 +00:00
Yinfang Wang
116746cc09 tests: subsys/pm: delete the empty test.
Delete the empty test.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-09-16 08:39:39 +00:00
Pavel Vasilyev
24af6031e2 Bluetooth: Mesh: Use separate pool for relayed messages
Sharing the same pool for both, local and relayed messages has some
disadwantages. In a high-traffic environment the relayed messages may
occupy the whole pool without letting the node to send own messages,
neither to process segmented messages. The vice versa situation is
possible when local messages takes the whole pool so that the node is
not able to relay other messages. Another thing is that it doesn't let
to controll amount of local and relayed messages that the node can send
at once. Controlling the number of messages that the node can relay may
help to reduce the message latency.

This change adds separate net_buf_pool for the relayed messages that
helps to avoid problems described above.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-16 08:39:04 +00:00
Hu Zhenyu
9fd919a466 tests: drivers: i2s: i2s_speed: move to new ztest API
Move drivers i2s_speed tests to use new ztest API

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-16 08:35:36 +00:00
Thomas Stranger
c1592fd4c7 samples: drivers: can: babbling: start can node
The device must be started before sending any frames.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-16 08:26:47 +00:00
Sylvio Alves
9105f1ef61 docs: esp32: update openocd section
This PR removes information regarding previous
west extension related to OpenOCD download.
This extension is no longer available and manual download
is required until upstream OpenOCD receives
all xtensa and riscv patches.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-16 09:02:41 +01:00
Jeremy Bettis
bf845a273b gpio_emul: Fail at build time if ngpios is too big
Add BUILD_ASSERT to check max val of ngpios. If someone sets ngpios to
more than 32, and acts on pin 32 or higher, memory corruption will
result. This is only a problem with the emulator, real hardware
will have limits that are probably much smaller.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2022-09-16 09:02:01 +01:00
Hake Huang
0d4ff38fa2 tests: adc-dma: fix the dma dest address check failure
force the dma destintion address 32 bit aligned

fixing: #49792

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-09-15 14:16:48 -05:00
Reto Schneider
b11ba9ddc8 net: net_pkt: Simplify net_pkt_compact() API
Since db11fcd174 [net/net_pkt: Fully
separate struct net_pkt from struct net_buf], net_pkt_compact() can not
fail anymore.

This commit acknowledges this and simplifies the API accordingly.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-09-15 16:35:11 +00:00
Krishna T
79f864028d net: l2: wifi: Log band from the scan result
Along with channel, also log the Wi-Fi band from the scan result.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-15 16:34:30 +00:00
Reto Schneider
9e1b130156 net: zperf: Configurable packet size limit
Allow user to adjust (artificial) size limitation of 1024 bytes.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-09-15 16:34:13 +00:00
Kevin Townsend
aa88b3785f manifest: zscilib update
This update introduces some fixes required to build with Zephyr 3.1
and the associated Zephyr SDK update.

It also enables running the zscilib test suite as part of the normal
CI build process, referencing the 'tests' folder in `module.yml`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-15 16:33:41 +00:00
Pawel Dunaj
3676aeff78 ipc_service: icmsg: Trigger data read after magic
After magic is read during bound procedure, trigger an
initial data read. This is to ensure data is not missed
when piggybacked on magic's exchange interrupt.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2022-09-15 16:31:48 +00:00
Aleksandr Khromykh
43fe45af0f tests: Bluetooth: Mesh: add adv tx complete cb tests
Add bsim tests to check tx callback behavior for advertiser.
Feature coverage:
TX Complete callback execution
Callback order
Packets are freed before the end callback is called

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-09-15 16:30:34 +00:00
Aleksandr Khromykh
0cc0249fe4 tests: Bluetooth: Mesh: create skeleton for adv bsim tests
Create skeleton for bsim adv tests with stub for
tx complete callback tests.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-09-15 16:30:34 +00:00
Aleksander Wasaznik
a89d5edb92 Bluetooth: Shell: Remove a debug-print
I don't think it was intentional to leave this line.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-09-15 17:27:42 +01:00
Fabio Baltieri
067e82de4a samples: bt: hids: implement a sample report
The peripheral_hids sample currently implements the HID descriptor and
characteristics, but no notify report. Add some code for implementing a
simple one button click report for boards that have sw0 defined, so that
the sample actually does something beside connecting and enumerating the
device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Fabio Baltieri
7eeed4ab73 samples: bt: hids: set report id in the report_map
The default report_map for peripheral_hids mouse sample descriptor is
missing a report id field. This seems to be confusing Android hosts into
somehow parsing reports incorrectly.

Adding a report id seems to fix the problem and still works correctly on
bluez hosts.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Thomas Stranger
5521c53848 drivers: wifi: esp32: sp32_wifi_ap_enable: fix ret value overwritten
The return values of esp_wifi_set_mode(), and esp_wifi_set_config() were
overwritten once esp_wifi_start() is executed.

This commit fixes that by ORing the return value to the others.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-15 17:26:31 +01:00
Sylvio Alves
b801a83d92 drivers: gpio: esp32: fix missing rtcio pin mapping
PR #49550 missed adding proper RTCIO pin mapping
in a few rtcio functions calls, which causes board
to crash. This fixes it.

Closes #50238

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-15 17:26:18 +01:00
Andy Ross
eb5c4aaa57 toolchain/gcc: Don't use no_sanitize("address") with gcc
GCC doesn't actually need this treatment, only clang.  (GCC is smart
enough to use "const" as the needed clue to suppress instrumentation
it seems like).  And it turns out older gcc's emit a warning
(attribute ignored, which is... sort of weird to warn about?) in that
circumstance, which breaks builds.  Just turn it off rather than try
to find a way to suppress that one warning.

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-15 16:23:11 +00:00
Andy Ross
99dd845067 arch/posix: Fix main() renaming trickery
It turns out that SOF is already using a symbol named
"zephyr_app_main()", so this produces a collision.  Pick something
that looks more relevant to "posix", and put an underscore on it (it's
a "system" symbol, after all).

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-15 16:23:11 +00:00
Andy Ross
ec44bc435c arch/posix: Fix 32 bit x86 fuzzing
It seems like libfuzzer wants to relocate 32 bit instrumented code
sections at runtime at addresses different than the ones in the ELF
file.  This is problematic, because Zephyr files are compiled
statically and so will crash the first time they try to jump to an
absolute .text address (basically at the first function call after a
fuzzer entry point).

It seems that building with -fPIC is enough to defeat this (we use the
host linker script, which will manage the GOT/PLT entries for us),
which will work as long as the fuzzer isn't playing games with data
other than text.  None of this seems to be documented, so... I guess
it's as good as we can get.  It works, at least.

(x86_64 binaries don't show the same behavior, they run where they
were linked)

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-15 16:23:11 +00:00
Thomas Stranger
fc33325fc7 drivers: can: native_posix_linux: drop rx frames while stopped
The driver should drop rx frames while in stopped state.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-15 16:20:04 +00:00
Thomas Stranger
0c365ac0ea drivers: can: mcan: don't enabled trasceiver in init
With the move to start/stop functions the transceiver is not expected
to be enabled after driver initialization.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-15 16:19:32 +00:00
Francois Ramu
44b9cde054 samples: boards: stm32 serial wakeup form LPUART on nucleo_wl55jc
This overlay shows the LPUART at 9600 with wakeUp capability
to exit the nucleo_wl55jc target plaform from the low Power
stop mode, EXTI_Line 28 is the corresponding wakeUp source.
The LPUART is sourced by the LSE (32768Hz) and max baudrate
is 9600. Set the console to 9600.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-15 15:02:47 +00:00
Francois Ramu
0e119b53c6 drivers: serial: stm32 uart driver set EXTI line for wakeup from lowPower
The USART or LPUART, especially on stm32wl, must set the EXTI
lines corresponding to the wakeUp source.
This LL_EXTI_LINE_xx is given by the Device Tree property.
This makes the system exiting lowpower stop mode on EXTI irq.
The LL_EXTI_LINE_x is exactly the bit(X) set.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-15 15:02:47 +00:00
Francois Ramu
cb0daa3d03 dts: bindings: stm32 uart gives the EXTI line nb for PM
When the EXTI Line nb is not set as interrupt by default
(at reset value), the uart instance cannot waekup the
system from its low power stop mode.
The EXTI line must be specified, like with stm32WL55

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-15 15:02:47 +00:00
Ryan Erickson
e7b6e0286a samples: net: wpanusb: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
37b35fb6e5 samples: net: wpan_serial: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
a68ab8ded9 tests: net: bridge: exclude mg100 and pinnacle_100_dvk
mg100 and pinnacle_100_dvk require IPv4 and/or
IPv6 networking.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
894b530f46 samples: mcumgr: smp_svr: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if mcuboot is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
468cee3cd4 samples: net: mqtt_publisher: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
de1e50247a samples: net: lwm2m_client: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
267729d783 boards: pinnacle_100_dvk: Enable QSPI and Modem by default
When necessary, enable QSPI and Modem drivers
by default if relevant higher level kconfigs are used in an app.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Jiafei Pan
956c5ddc5e board: arm64: mimx8mp/n/m: fix memory address bits length
Removed duplicated configuration items for CONFIG_ARM64_VA_BITS and
CONFIG_ARM64_PA_BITS, and modify them to be 36bit as SoC supports up
to 34-bit address.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-15 11:53:33 +01:00
Andrzej Puzdrowski
aab3854043 tests/subsys/dfu/mcuboot_multi: cleanup on common operation
Extracted common function for erase the image trailer which
decrease code size and increase legibility.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-15 11:53:20 +01:00
Andrzej Puzdrowski
d66543e5b8 tests/subsys/dfu/mcuboot_multi: fixed bad page erase
Inappropriate page was erased during test as its absolute offset was
calculated with omission of the the fixed-partition offset to which
it belongs.

fixes #48115

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-15 11:53:20 +01:00
Al Semjonovs
b27c5d73ef ztest: Fix unused variable compile error in shuffle function
When CONFIG_ZTEST_SHUFFLE is enabled and ASSERTS are disabled
`start_pos` becomes an unused variable leading to a compile error.
Cleaned-up shuffling algorithm to not need a `start_pos` check.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2022-09-14 20:13:46 -04:00
Aastha Grover
28bf1aaf25 docs: add definition and minimum criteria for samples
Adding guidelines for writing samples which includes definition
and minimum criteria to qualify as a sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-09-14 17:27:05 -04:00
Xinyang Tan
904181a6a9 drivers: flash: spi_nor: fix driver initialization error
Fix the issue that the initialization will fail when both
CONFIG_SPI_NOR_SFDP_RUNTIME and CONFIG_SPI_NOR_IDLE_IN_DPD are enabled.
The cause of this problem is simply calling the wrong function.

Fixes #33015

Signed-off-by: Xinyang Tan <xinyang.tan@delve.com>
2022-09-14 16:13:35 +01:00
Reto Schneider
6de54e0d03 net: context: Fix memory leak
Allocated, but undersized packets must not just be logged, but also
unreferenced before returning an error.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-09-14 14:38:34 +01:00
Pavel Vasilyev
85e7818ff2 Bluetooth: Mesh: Don't process unprovisioned beacon without callback
If `struct bt_mesh_prov::unprovisioned_beacon` callback is not set,
don't process the beacon.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-14 14:37:54 +01:00