Commit graph

45155 commits

Author SHA1 Message Date
Flavio Ceolin
dc68e35ad2 tests: cmsis_rtos_v2: Fix stack overflow
Increase the stack to avoid overflow problems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-10-13 20:04:31 +02:00
Flavio Ceolin
0173063e50 tests: cmsis_rtos_v2: Fix a race condition
Both threads, 4 and the ztest_thread (test_thread_join) where
joining thread5. If thread 4 is scheduled before the
main thread it will be dead before the main thread
had chance to join it. Just changed thread 4 priority to ensure that
this problem does not happen.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-10-13 20:04:31 +02:00
Peter Bigot
4a0a196f57 tests: uart_async_api: fix fault accessing cached device pointer
The cached device pointer must be placed in memory that allows user
mode invocation of the test functions to access it.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-13 20:01:08 +02:00
Joakim Andersson
374cbdd124 Bluetooth: GATT: Refactor use of 16-bit UUID core types
Refactor use of 16-bit common GATT UUID types where a complete UUID
object is declared on the stack only to use the 16-bit value.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-13 19:51:49 +03:00
Daniel Leung
41967f999f esp32: workaround esptool linker sections limit
When converting ELF to a flashable image, the esptool can only
process up to 16 ELF sections. Zephyr has been happily grouping
similar objects into linker sections which can easily go over
esptool's limit. This patch consolidates the kernel, net, log,
and shell objects into their own sections.

Also remove the app_noinit section as no one is emitting
anything into that section, and it's not being used by other
arch/SoC/boards in Zephyr.

Fixes #20980

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-10-13 08:53:39 -07:00
Maximilian Bachmann
fd059fe1f2 include/posix: fix extern "C" placement
both parts of extern "C" should be placed inside

Signed-off-by: Maximilian Bachmann <m.bachmann@acontis.com>
2020-10-13 10:05:30 -05:00
Armando Visconti
de5135b05e modules/hal_st: Align sensor drivers to stmemsc HAL i/f v1.03
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v1.03.

Requires https://github.com/zephyrproject-rtos/hal_st/pull/5
(merged as b52fdbf4b62439be9fab9bb4bae9690a42d2fb14)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-13 09:46:08 -05:00
Armando Visconti
4250028483 drivers/sensor: iis2mdc: Fix the temperature in celsius
Fix the formula to translate raw temperature read from
register to Celsius.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-13 09:46:08 -05:00
Armando Visconti
99b97f5ff4 drivers/sensor: ism330dhcx: Fix init routines order
The interrupt enabling routine was called before the
chip enabling routine resulting in a runtime failure
when triggers are set.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-13 09:46:08 -05:00
Gerson Fernando Budke
8d563d6507 boards: cy8ckit_062_wifi_bt: Squash M4 and M0 boards
The Cypress cy8ckit_062_wifi_bt kit is splitted on two directories.
There is no reason to keep it separated. This squash M4 and M0 boards
as one board file.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2020-10-13 13:16:09 +02:00
Dominik Ermel
81dc347b84 fs: Improve documentation for FS API
Simple improvements in text and formatting of the documentation
the the FS API.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-10-13 13:16:02 +02:00
Joakim Andersson
3346aa4d39 Bluetooth: l2cap: Reduce size of disconnect pool
Reduce the size of the disconnect pool required the full MTU
for a disconnect request.
Also completely remove the pool when not needed.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-10-13 13:13:50 +02:00
Kumar Gala
659b24bdcf sanitycheck: Fix results for --cmake-only
If we run with --cmake-only we get the following:

`ERROR   - Unknown status None`

Fix this by treating no status set as "passed" for the --cmake-only
case.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-13 13:13:21 +02:00
Martin Jäger
ab3e3165c5 west: Update hal_stm32 for CAN pinctrl fix
Required for dts-based pinctrl in CAN driver.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-13 13:13:08 +02:00
Kumar Gala
70015cfe57 boards: arm: st: Update dts for CAN pinmux
Add pinctrl-0 property for CAN nodes and remove pinmux.c.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-13 13:13:08 +02:00
Martin Jäger
109a624c85 drivers: can: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-13 13:13:08 +02:00
Jukka Rissanen
accaab2112 net: shell: Add network mgmt events monitor support
Add "net events [on|off]" command that can be used to monitor
the generated network management events.

The monitor output looks like this when enabled:

EVENT: L2 [1] up
EVENT: L3 [1] IPv6 mcast address add ff02::1:ff00:1
EVENT: L3 [1] IPv6 mcast join ff02::1:ff00:1
EVENT: L3 [1] IPv6 address add 2001:db8::1
EVENT: L4 [1] connected
EVENT: L3 [1] IPv6 prefix add 2002:5b9b:41a0::
EVENT: L3 [1] IPv6 address add 2002:5b9b:41a0:0:fec2:3dff:fe11:c147
EVENT: L3 [1] IPv6 neighbor add fe80::9ec7:a6ff:fe5e:4735
EVENT: L3 [1] IPv6 router add fe80::9ec7:a6ff:fe5e:4735
EVENT: L3 [1] IPv6 DAD ok fe80::fec2:3dff:fe11:c147
EVENT: L3 [1] IPv6 DAD ok 2001:db8::1
EVENT: L3 [1] IPv6 DAD ok 2002:5b9b:41a0:0:fec2:3dff:fe11:c147
EVENT: L3 [1] IPv4 address add 192.168.1.69
EVENT: L3 [1] DHCPv4 bound 192.168.1.69

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-10-13 13:42:50 +03:00
Flavio Ceolin
619dcef498 mgmt: osdp: Fix a warning about an unused variable
tmp variable is only used when osdp sc is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-10-13 10:58:02 +02:00
Flavio Ceolin
aa23af14b6 mgmt: osdp: Fix build when osdp sc is not enabled
osdp was unconditionally referencing symbols that are defined only if
osdp sc is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-10-13 10:58:02 +02:00
Flavio Ceolin
6f7f9dfe7b mgmt: osdp: Make osdp sc requires on CSPRING_ENABLED
OSDP secure channel require a truly random number generator
source. Make this dependency explicit.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-10-13 10:58:02 +02:00
Vinayak Kariappa Chettimada
605ecf25a1 Bluetooth: controller: Fix debug pin for radio close
Fix the debug pin state when prematurely closing radio
events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-13 10:13:54 +02:00
Vinayak Kariappa Chettimada
43d8e3c90c Bluetooth: controller: Fix missing return on Auxiliary PDU abort
Fix the missing return statement when Auxiliary PDU
transmission is aborted because Primary PDU does not have
the aux pointer setup. Also, directly stop clocks and
post LLL done, like being done in other state/role LLL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-13 10:13:54 +02:00
Vinayak Kariappa Chettimada
77f12700e7 Bluetooth: controller: Minor conditional compile refactor
Minor Extended Advertising conditional compilation reorder
to better reflect the order Observer->Extended Scanning
dependency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-13 10:13:40 +02:00
Vinayak Kariappa Chettimada
4b965c6174 Bluetooth: controller: Fix rx quota mismatch due to ext adv terminate
NODE_RX_TYPE_EXT_ADV_TERMINATE is generated in ULL context
and shall not increment received PDU quota value.

Fixes #29101.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-13 10:13:40 +02:00
Toby Firth
dc37f988e0 drivers: adc: added support adc driver for lpcexpresso55s69
Added shim driver for the LPADC for lpcexpresso55s69 board.

Fixes #22703.

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2020-10-12 14:59:40 -05:00
Marc Herbert
20c7ec4ad5 doc: west: add inline comments in the tree and manifest examples
It's great to have full manifest examples that can actually work as they
are, however the number of lines can "dilute" the feature currently
described and distract from it. Add some comments in the manifests to
highlight the current topic(s).

The file tree examples and their descriptions are carefully made up and
generally excellent, however I found my eyes going constantly back and
forth between the two in order to match them with one another and build
the actual, graphical representation in my head. These new comments
attached to the major elements of the trees will IMHO accelerate that
visual representation. What I found especially lacking: clues about
which directories are .git/ clones; a pity in the pages specifically
about git clone organization.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-10-12 14:50:17 -05:00
Mulin Chao
4260cac1e4 drivers: espi: npcx7: fix wrong comparison in vw generic isr.
This CL fixed the wrong comparison during searching the vw signal
that issued interrupt from MIWU in espi_vw_generic_isr().

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-12 14:47:33 -05:00
Thorvald Natvig
7f9f4e6597 boards: Add SiLabs SLWSTK6121A (WGM160P)
The WGM160P module combines the WF200 Wi-Fi transceiver with
an EFM32GG11 MCU
This code is based on the efm32gg_stk3701a board definitions

Signed-off-by: Thorvald Natvig <thorvald@natvig.com>
2020-10-12 14:46:19 -05:00
Vinayak Kariappa Chettimada
babd7289eb Bluetooth: controller: Move bsim radio hal header
Move the bsim radio hal header for nrfxx into the
controller's hal folder.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-12 19:34:13 +02:00
Carlo Caione
645082791b arch: aarch64: Catch early errors in EL3 and EL1
Setup the stack as early as possible to catch any possible errors in the
reset routine and handle also EL3 fatal errors.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-12 12:22:15 -04:00
Carlo Caione
758fb93b0b arch: arm64: Remove useless assembly code
The content of the SCR_EL3 register is overwritten by a later
instruction. Also no need to route SError, IRQs and FIQs to EL3.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-10-12 12:22:15 -04:00
Andrew Boie
95bbc742ba kernel: move kernel object APIs to own header
Part of an effort to break up the gigantic kernel.h.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-12 12:21:46 -04:00
Martin Jäger
c765b92944 boards: arm: nucleo stm32: use DT for DAC pinmux
Use the new DT facilities to configure DAC pinmux on all STM32 nucleo
boards currently supporting the DAC.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-12 08:49:36 -05:00
Martin Jäger
1de10bdb9b drivers: dac: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-12 08:49:36 -05:00
Rubin Gerritsen
51e7da292a boards: nrf52_bsim: Use simplified nrf_bsim_models
The simplified bsim implementation reuses nrfx directly instead
of using manually modified header files.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-10-12 13:11:12 +02:00
Rubin Gerritsen
857ed0a380 boards: nrf52_bsim: no-op arm functions as defines
The nrf52 bsim hw models now require some of these to
be defined. For this case we cannot implement these
as static inline functions as that would redefinitions
of the functions.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-10-12 13:11:12 +02:00
Jackie Ja
fac4a6a4fe net: lib: http: chunked encoding body support
We should not ignore the body when the Transfer-Encoding is
chunked.

Signed-off-by: Jackie Ja <qazq.jackie@gmail.com>
2020-10-12 13:58:19 +03:00
Jackie Ja
f07a9691ed net: websocket: Fix websocket loop close call
A normal websocket close sequence:
  close(websock) ->
    websocket_close_vmeth() ->
      websocket_disconnect()

close(ctx->sock) called in the function websocket_disconnect()
and cause websocket_close_vmeth() called again.
Finally stack overflow by loop close call.

It's maybe a side-effect by PR #27485

Signed-off-by: Jackie Ja <qazq.jackie@gmail.com>
2020-10-12 13:57:07 +03:00
Jonathan Rico
da45a88048 usb: bluetooth: Hardcode USB EP sizes
The existing calculation of the BULK_EP size can sometimes result in a
bulk EP size that is not spec-compliant. The accepted BULK_EP sizes are
8, 16, 32 or 64 bytes.

Additionally, the INT_EP size is always set to the max EP size since
BT_BUF_RX_SIZE is always greater than that (min. 73 in Kconfig).

This commit sets the BULK and INT endpoint sizes to their maximum
supported values.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2020-10-12 12:48:58 +02:00
Watson Zeng
0d04754652 boards: arc: nsim_em7d_v22: switch to ns16550 UART model
In PR #26836, we switch nSIM from custom legacy ARC UART model
to ns16550 model, which will allow us to use zephyr images build for
nSIM on other platforms like HAPS, QEMU, etc...
In PR #27334, which introduce new board nsim_em7d_v22, has gone
parallel to the switch to dwuart, and is still using legacy model.
With wrong configuration, the uart for nsim_em7d_v22 has no output,
which cause all tests failure.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2020-10-09 13:31:11 -07:00
Carles Cufi
5aacc1f433 Revert "zephyr: maintainers:"
This reverts commit c45ac06f08.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-10-09 09:19:28 -05:00
Paul He
1810cec279 MAINTAINERS: fix indentation inconsitency
Use the same indentation as other parts of area Bluetooth Mesh.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2020-10-09 08:55:54 -05:00
Martí Bolívar
8165008f44 dts: remove legacy macro support
The legacy macros were first deprecated in Zephyr v2.3. Now that
Zephyr v2.4 has been released, that makes two releases where these
macros have been deprecated, so it's OK to remove them.

This leaves support for legacy binding syntax in place. Removing that
is left to future work.

We need to update various pieces of documentation related to flash
partitions that never got updated when the new API was introduced.
Consolidate this information in the flash_map.h API reference page,
since that's really where users will run into it. This also gives us
the opportunity to improve this documentation.

Adjust a couple of kconfigfunctions.py and sanitycheck bits to use
non-legacy edtlib APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-09 08:45:38 -05:00
bf04c29c26 runners: bossac: handle --help on the current git version of BOSSA
BOSSA 1.9.1 and before an errror on `--help`, but the current git
version returns 0.  Handle both cases.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-10-09 08:22:38 -05:00
c0055ed392 runners: bossac: calculate the offset instead of absolute address
BOSSA takes the offset within flash memory, not the absolute address.
This doesn't matter on most boards as the flash starts at zero but
does matter on the Due as the flash starts at +512 KiB.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-10-09 08:22:38 -05:00
Vinayak Kariappa Chettimada
9072f78abf Bluetooth: controller: openisa: Port drift implementation changes
Port minor anchor point synchronization drift implementation
changes.

Relates to changes in commit 732de50f67 ("Bluetooth:
controller: Refactor out drift compensation code").

Fixes #29062.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-09 13:46:46 +02:00
Erwan Gouriou
b74a2162cb soc/arm: stm32: swap argument order in ST_STM32 PINCTRL macros
In order to be in line with other DT_INST macros in zephyr code base,
swap the arguments order in following macro definitions:
*ST_STM32_DT_PINCTRL
*ST_STM32_DT_INST_PINCTRL
Update the users accordingly.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 11:52:59 +02:00
Erwan Gouriou
b38d84fef4 drivers/i2c: stm32: Add pinctrl configuration at driver init
Convert driver to pcintrl configuration using pcintrl helper
macros.
Pinctrl init sequence has to be done before bus_mutex initialization.

Driver dts bindings are updated to reflect usage of pinctrl-x
properties

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 11:52:59 +02:00
Erwan Gouriou
155f3c5eba soc/arm: stm32: Provide node label based pinctrl devicetree helpers
As an alternative to ST_STM32_DT_INST_PINCTRL, provide
ST_STM32_DT_PINCTRL macro and set of matching internal macros.

This could be used by device drivers that can't use directly
device instances but rather the node label identifier. For instance:
ST_STM32_DT_PINCTRL(0, i2c1);

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 11:52:59 +02:00
Erwan Gouriou
2d3cda7663 soc/arm: stm32: use _INST_ namespace in devicetree pinctrl helpers
Current set of helpers provided for STM32 pinctrl devicetree are
using device instance as input.
In order to prepare for next version that will take node identifier
as input, change existing set of macros using _INST_ namespace.

Additionally rename NODE_ID_FROM_PINCTRL to
ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL.

Finally update existing macros users to this new name scheme.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 11:52:59 +02:00