Commit graph

56002 commits

Author SHA1 Message Date
Christopher Friedt
6e26512bd5 Revert "linker: xtensa: move IDT_LIST region"
This reverts commit 9505ee89a3.

Fixes #38214

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-09-08 20:29:53 -05:00
Christian Taedcke
7c564c466e doc: mcumgr: Mention udp in the transport overview
The overview at the top of the page only listed ble and serial as
available transports. This commit adds udp to this list.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2021-09-08 17:57:56 -05:00
Yong Cong Sin
293af9e823 drivers: modem: gsm_ppp: Fix ppp_dev
ppp_dev should be pointing to the net/ppp driver.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-09-08 10:49:45 -04:00
Stephanos Ioannidis
fa7959c197 tests: newlib: thread_safety: Disable minimum newlib heap size check
This commit disables the "minimum required newlib heap size" check for
the newlib thread safety tests since they do not make use of any newlib
functions that require large heap.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-09-08 10:32:45 -04:00
Chen Peng1
47670d1ba6 tests: benchmarks: latency_measure: fix potential div by zero
If the count is zero in the heap_malloc_free test, a div by zero
would happen, so add a condition to handle this potential error.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-09-08 10:28:58 -04:00
Lixin Guo
d39410a217 tests: subsys: fixed the samples/tracing code can not generate coverage
Add some tracing functions to fix that the samples/tracing code
cannot generate coverage by twister.

Fixed #38323

Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
2021-09-08 10:28:10 -04:00
Bartosz Bilas
6badb7f1b8 drivers: sensors: sht3xd: allow multiple instances
Make this driver multi-instance.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-09-08 09:49:34 -04:00
Kim Bøndergaard
3b3961ac7f dts: arm: stm32f411: spi4 node removed
stm32f411 includes stm32f401 which do already correctly define spi4
The definition in stm32f411 was missing a clock attribute

Signed-off-by: Kim Bøndergaard <kim.boendergaard@escoglobal.com>
2021-09-08 09:48:30 -04:00
Kim Bøndergaard
09a320df4b dts: arm: stm32f410/411: Added missing SPI5 clocks attribute
stm32f410, stm32f411 and stm32f412 enable the SPI5 device with
bit 20 on the APB2 clock

Signed-off-by: Kim Bøndergaard <kim.boendergaard@escoglobal.com>
2021-09-08 09:48:30 -04:00
Erwan Gouriou
31b7483a99 soc: stm32g0: pm_power_ functions should be __weak
In commit "pm: Fix weak linkage symbols" (PR #35274),
PM SoC hooks were converted to __weak to avoid clash with
new definition of these symbols in subsys/pm/power.c.

G0 power implementation was implemented in parallel
with this change and missed the update.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-09-08 09:29:56 -04:00
Andy Ross
0d763e0a10 cmake/compiler/xcc: sched: Support XCC inlining semantics
Cadence XCC is based off of a very old 4.2 gcc compiler, which didn't
perfectly support C99 "inline" semantics with respect to
cross-translation-unit inline linkage (which Zephyr does not use, our
inlines are static only) and declaration order.

Fix the one spot where we were calling an inline before its
ALWAYS_INLINE definition, and add a flag to suppress the warning so
CI's trying to build with XCC and -Werror don't flip out.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-09-08 09:28:31 -04:00
Andy Ross
8bc4539cec soc/intel_adsp: Correct linker syntax for ancient binutils
Older binutils, like the (nine-year-old!) 2.23 version that powers
many Cadence XCC toolchains, happen not to support the "~" operator to
perform bitwise negation.  And they generate an absolutely hilarious
series of inscrutable error messages when they try to tell you this
fairly simple fact.

Just fold it into the constant.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-09-08 09:28:31 -04:00
Carles Cufi
0552d329c8 samples: bluetooth: hci_uart: Fix command len calculation
Due to a historical error introduced during an hci_uart refactor, the
get_len() function was using the wrong HCI H4 packet identifier for
commands. Instead of using H4_CMD (0x01) it was trying to match
BT_BUF_CMD (0x00).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-07 20:47:49 +02:00
Andy Ross
795d36f811 drivers/timer/cavs_timer: Don't suppress smp_timer_init()
This function wasn't being defined when SMP_BOOT_DELAY was set or when
SMP wasn't enabled.  There's no reason for either, then function
doesn't depend on any kconfig-dependent build-time state, and (given
that we use -ffunction-sections) it won't appear in output binaries
unless called.

And there are use cases (e.g. z_smp_start_cpu()) where we need that
function even when BOOT_DELAY is enabled.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-09-07 14:23:31 -04:00
Michał Narajowski
343c0bd2d3 Bluetooth: Mesh: Check if app key is bound in Model Publication Set
Th Configuration Server should respond with and Invalid AppKey Index
status code when the AppKey identified by AppKeyIndex is not known to
the node or is not bound to the model identified by the ModelIdentifier.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-09-07 11:32:16 -04:00
Francois Ramu
5199e1bfa9 drivers: clock control stm32wb has MSI clock range to set
When the MSI clock is selected as source on the stm32wbx device,
the MSI has a range to choose the MSI input frequency.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-09-07 11:31:56 -04:00
Evgeniy Paltsev
c5eeb0f4eb ARC: MWDT: add locking interface implementation
ARC MWDT libraries require to implement locking interface
otherwise not all of functionality is guarantee to be
thread-safe.

So, let's implement locking interface.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-09-07 11:31:37 -04:00
Jiafei Pan
6f1dc5d3a9 drivers: gicv3: set SPI's affinity when it is enabled
When affinity routing is enabled for Non-secure state
( GICD_CTLR.ARE_NS is '1'), need to set routing information
for the SPI interrupt.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-09-07 11:31:22 -04:00
Jiafei Pan
ae82738e71 arm/arm64: add 64bit read/write APIs
Added sys_read64() and sys_write64() for 64bit operations.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-09-07 11:31:22 -04:00
Enjia Mai
495d10234d tests: common: add test for ffs function
Add a testcase for find_msb_set() and find_lsb_set() functions.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-09-07 11:30:43 -04:00
Emil Gydesen
5b602eab90 Bluetooth: ISO: Add missing negation for valid_chan_io_qos
A check for valid_chan_io_qos in big_init_bis was missing
a negation when checking for invalid parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-07 16:31:32 +02:00
Magdalena Kasenberg
35d5443387 doc: Bluetooth: Update ICSes to 8.0.3
This patch updates the ICSes to PTS 8.0.3

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-09-07 14:52:23 +02:00
Gerard Marull-Paretas
051e9989bb drivers: pinmux: stm32: fix remap equality check
The equality check for remap was not being performed since the local
variable remap was assigned to the value being checked just before the
check. Some minor simplifications have been performed (fixed variable
types).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-07 07:56:21 -04:00
Torsten Rasmussen
e1481fee4a drives: cmake: zephyr_library_property(ALLOW_EMPTY TRUE) on drivers lib
This commit now sets the Zephyr library property `ALLOW_EMPTY` to
silence the warning:
`No SOURCES given to Zephyr library: drivers__interrupt_controller`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-07 11:42:47 +02:00
Torsten Rasmussen
153196b378 cmake: Zephyr ALLOW_EMPTY library property
This introduces a dedicated zephyr_library_property() function which
provides a common way to set Zephyr build system known properties on
Zephyr libraries.

As a first common property is the `ALLOW_EMPTY` property which allows
to create a `zephyr_library()` without putting any content inside of it.

In general libraries should not be created unless there are files to
places inside of it, however in some cases there are so many
`zephyr_library_sources_ifdef(<setting> <file.c>)`
where testing each setting before creating the library may not be
desired.

This commit allows the following construct in those cases:
```
zephyr_library()
zephyr_library_property(ALLOW_EMPTY TRUE)
zephyr_library_sources_ifdef(CONFIG_SETTING_1 file_1.c)
zephyr_library_sources_ifdef(CONFIG_SETTING_2 file_2.c)
...
zephyr_library_sources_ifdef(CONFIG_SETTING_n file_n.c)

```

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-07 11:42:47 +02:00
Emil Gydesen
eaf6cf745d Bluetooth: Audio: Fix vcs_client_test duplicate conn_callbacks
The conn_callbacks was duplicated in the file, due to a missing
delete when BT_CONN_CB_DEFINE was introduced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-07 09:56:35 +02:00
Jingru Wang
b78d6740ec twister: when simulatio is mdb-nsim, call make run
For twister, when simulation is mdb-nsim, the platform is
nsim_hs_smp. Before the twister will call west falsh
when platform is nsim_hs_smp, because twister can't kill
cld process, now this problem has been fixed

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2021-09-06 22:20:51 -04:00
Jingru Wang
86f1bdc069 ARC: add config files for nsim_sem_mpu_stack_guard
Add nsim_sem_mpu_stack_guard.props and
nsim_sem_mpu_stack_guard.args, so we don't
do workarounds in cmake code.

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2021-09-06 22:20:27 -04:00
Neil Armstrong
538968a773 boards: fvp_base_revc_2xaemv8a: permit running Zephyr at EL1NS
It may be needed to run Zephyr at EL1NS level with `CONFIG_ARMV8_A_NS`
In order to run at EL1NS, you'll need a proper Firmware loaded in the
FVP model to run Zephyr at non-secure EL3.

The ARM TF-A for FVP can used to run Zephyr as preloaded BL33.

This adds the necessary cmake scripts to load the TF-A binaries and
load Zephyr as preloaded BL33 payload.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-09-06 14:11:32 -04:00
Kamil Gawor
dc96f016a4 logging: Add choice name in template
This commit adds choice name in a logging subsystem
Kconfig template file.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2021-09-06 14:11:06 -04:00
Gerard Marull-Paretas
d092945e86 drivers: pinmux: stm32: remove redundant include
stddef.h is already included by zephyr/types.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-06 12:23:30 -04:00
Gerard Marull-Paretas
5ef11520f2 drivers: pinmux: stm32: remove declaration of missing function
stm32_get_port_clock function is not defined anywhere, so remove its
declaration.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-06 12:23:30 -04:00
Gerard Marull-Paretas
902f963151 drivers: pinmux: stm32: remove unused pinmux struct
The struct stm32_pinmux_conf structure (and stm32_pin_func_t type)
are not used, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-06 12:23:30 -04:00
Vinayak Kariappa Chettimada
99bdd27100 Bluetooth: Controller: Fix multiple advertising set assert
Fix assert at line 1085 in ull_adv_aux.c due to auxiliary
offset calculation scheduling on ticker timeout under must
expire which can happen for overlapping multiple advertising
sets without previous calculation not complete, a single
mayfly instance is used hence the assertion.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-09-06 17:25:37 +02:00
Glauber Maroto Ferreira
9ebca5b439 west: update hal revision
to latest version.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-09-06 10:02:57 -04:00
Glauber Maroto Ferreira
2b7c0f4ad6 esp32s2: samples: counter: add alarm sample support
by adding esp32s2 board-specific config information.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-09-06 10:02:57 -04:00
Glauber Maroto Ferreira
8dff10dfbe esp32s2: drivers: counter: add support
by bringing up on top of existing counter driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-09-06 10:02:57 -04:00
Krzysztof Kopyściński
bd068e475d Tests: bluetooth: tester: find connection for get_attr_val_rp
To check security of connection  in read_value() we need to actually
pass connection not NULL.

This is affecting GATT/SR/GAR/BI-11-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-09-06 09:23:06 -04:00
Dominik Ermel
adcf32b45c mgmt/mcumgr: Add Kconfig option for direct image upload
The commit adds CONFIG_IMG_MGMT_DIRECT_IMAGE_UPLOAD that allows
to turn on the direct image upload.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-09-06 09:22:28 -04:00
Emil Gydesen
c17f28c3d6 Bluetooth: sample: Add ISO support to hci_uart
Add ISO support to the hci_uart sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-06 09:18:58 -04:00
Lingao Meng
ecc7ca1b69 Bluetooth: Mesh: Fix friend buf send end not called.
As frnd->last will keep reference, so that net buffer
destructor function will not be call.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-09-06 08:42:05 -04:00
Christopher Friedt
86f94ebaa6 kernel: init: remove empty lcov exclusion
Remove the empty lcov exclusion left over from the weak main
function.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-09-06 08:18:15 -04:00
Armando Visconti
c3050a5aab drivers/sensor: lps22hh: Fix int32 overflow in the val2 part
The val2 calculation was done using (1000000 / 40960) as
multiplying factor, which was sometimes leading to a
int32 overflow. So, let's use the equivalent (but smaller)
(3125 / 128).

Fix #38090

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-09-06 03:31:50 -04:00
NingX Zhao
5591357217 tests: subsys: Adding testcases to check trace API
Add some testcases to verify tracing's APIs,
check output data by using uart backend of self-design.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2021-09-05 07:25:34 -04:00
Mikkel Jakobsen
637e9f21dd boards: mimxrt1024_evk: add missing supported board features
the mimxrt1024_evk actually supports these, they were just never
added for some reason.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2021-09-05 07:25:20 -04:00
Mikkel Jakobsen
5524edb935 boards: mimxrt1024_evk: enable mcux ethernet driver and pins
Enables the mcux ethernet driver and pin muxes on the
mimxrt1024_evk board in the same way as is done on the
mimxrt1020_evk and mimxrt1050_evk.

Documentation updated accordingly.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2021-09-05 07:25:20 -04:00
Piotr Pryga
aecdf4c242 Bluetooth: controller: df: fix error in remove CTE from per adv
cte_info_clear function is responsible for remove of CTE from
periodic advertising PDUs, including remove from optional chained
PDUs. The function uses subortinate function rem_cte_info_from_per_-
adv_chain to remove CTE from chained PDUs.

The rem_cte_info_from_per_adv_chain had pdu_prev and pdu as arguments.
After return from the function the pdu_prev should point to last
PDU from previously used periodic advertising data and pdu should
point to last new periodic advertising data.

The rem_cte_info_from_per_adv_chain function removes CTEInfo from
all but last one PDU. Last PDU must have removed AuxPtr field also.
Remove of CTEInfo and AuxPtr from last PDU is done explicitly in
the cte_info_clear function.

Unfortunately rem_cte_info_from_per_adv_chain had wrong type of
parameters for pdu_prev and pdu. These parameters were pointers
instead od double pointers.
That caused cte_info_clear function to remove CTEInfo and AuxPtr
from first PDU in a chain, which is AUX_SYNC_IND.

Changed parameters pdu_prev and pdu in the rem_cte_info_from_per_adv_-
chain to be double pointers.

Added small corrections in comments.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Co-authored-by: Emil Gydesen <Thalley@users.noreply.github.com>
2021-09-04 10:54:36 -04:00
Piotr Pryga
4e43295d22 tests: Bluetooth: df: fix compilation error in per adv chain tests
There was a change in parameters list of function ull_adv_sync_pdu_-
alloc. There was a call in commmon.c file in connectionless_cte_chains
unit tests with use of former parameters list. That caused a compilation
error.

The commit fixes the compilation issue.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-09-04 10:54:36 -04:00
Christopher Friedt
42fccba48f release: Zephyr 2.7.0-rc1
Set version to 2.7.0-rc1

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-09-03 14:52:45 -04:00
Evgeniy Paltsev
4e0f7ea540 posix: pthread: replace irq_lock with spinlock
We shouldn't use swapping with an interrupt lock held
as it works incorrectly on SMP platforms.

Fix that by replacing irq_lock with spinlock for pthread
subsystem.

NOTE: we fix that in a simple way with single spinlock
for mutex / cond_var / barrier. That could be improved
later (i.e. split it for several spinlocks).

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-09-03 12:20:19 -04:00