Commit graph

41120 commits

Author SHA1 Message Date
Andrzej Puzdrowski
580b0a9155 samples/subsys: add sample for the settings
Added sample for the settings subsystem.

The sample shows how to:
-initialize and register handler
-implement handles
-save and load data using registered handlers
-load subtree
-save or delete a certain value
-load subtree values or a value directly
- example on how to write data to the
setting destination and how to read data
from the setting destination using runtime API.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-31 07:45:52 -05:00
François Delawarde
a3e89e84a8 bluetooth: host: Fix simultaneous pairings getting the same keys slot
Fix an issue where a slot in the key pool was considered free when
either the address was cleared or no keys were written in the entry
(enc_size == 0). This caused a problem with simultaneous pairing
attempts that would be assigned the same entry.

This patch makes it so a a slot is considered free even when keys are
not yet present in the entry, and makes sure the address is cleared in
case of pairing failure or timeout so to mark the slot as free.

Signed-off-by: François Delawarde <fnde@oticon.com>
2020-01-31 12:50:03 +02:00
Rubin Gerritsen
171a9fa167 bluetooth: controller: Guard SW based privacy config by Zephyr LL
SW based privacy is an implementation detail in the zephyr link layers.
Therefore it should not be visible when selecting an out-of-tree
controller.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-01-31 10:59:35 +01:00
Morten Priess
2945143edd Bluetooth: controller: split: Force central cleanup on MIC error
Since a peer MIC failure closes the event, it does not allow a terminate
acknowledge. For that reason a peer MIC fail for central role must force
a conn_cleanup.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2020-01-31 10:15:19 +01:00
Robert Lubos
41cfe0b31a sockets: tls: Fix Kconfig mbedTLS dependencies
Sort out mbedTLS dependencies in sockets Kconfig. mbedTLS will now
be enabled when TLS sockets and native network stack are enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-31 09:52:21 +02:00
Anas Nashif
471ffbe77d coverage: do not dump coverage data by default
Only dump data when we are interested in the analysing coverage. By
default just collect the data.

CONFIG_COVERAGE_DUMP is used to control this behaviour.

This will help speed up sanitycheck and will avoid lots of noise in the
log when some tests with coverage enabled failed. Dumping data to
console is also suspected to be one of the reason why qemu hangs in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-30 16:04:03 -05:00
Kumar Gala
ca09a7bf07 boards: qemu_cortex_r5: remove CI workaround
Now that we have SDK 0.11.0 as default, we don't need workaround for
finding qemu.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-30 14:23:31 -06:00
Kumar Gala
e8c2ef8eae ci: move to using SDK 0.11.0
Move to docker image 0.11.1 to get final release of SDK 0.11.0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-30 14:23:31 -06:00
Kumar Gala
ed938bf7e7 toolchain: Fix selection of HAS_NEWLIB_LIBC_NANO for zephyr SDK
HAS_NEWLIB_LIBC_NANO only should be set on arch that have nano.spec
which is ARM, ARC, and RISCV.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-30 14:23:31 -06:00
Ivo Clarysse
4ea41623ef boards: stm32f4_disco: enable canbus
Define CAN_1 and CAN_2 canbus controllers and enable CAN_2 in the ST
STM32F4 Disco development board.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Ivo Clarysse
fe9025aafb drivers: can: stm32: Support CAN_2 interface
Add support for the CAN_2 interface.

Simultaneous use of CAN_1 and CAN_2 is not supported yet.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Ivo Clarysse
0c8a99582e dts: arm: stm32f4: add CAN_2 controller
Add the CAN controller device tree node for CAN_2 of the STM32F4 SoC
series.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Ivo Clarysse
29d2a438ab drivers: pinmux: stm32f4: add CAN_2 pins
Add pinmux definitions for CAN_2 RX/TX pins on PB5/PB6 and PB12/PB13.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Kim Bøndergaard
dea0511659 net: mqtt: struct mqtt_sec_config: Declare hostname with const
The hostname member of struct mqtt_sec_config is used as optval
argument to ztls_sesockopt_ctx().
optval is declared as const void* so no need to limit hostname
to not allow const variables

Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2020-01-30 14:19:55 -05:00
Øyvind Rønningstad
350f184d98 arch: common: Delete isr_tables.ld which was a copy of intlist.ld
Refer directly to intlist.ld in zephyr_linker_sources()

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-01-30 14:19:14 -05:00
Henrik Brix Andersen
deccb71f1d west: commands: sign: look for imgtool.py in path
If 'imgtool' is not found in PATH look for 'imgtool.py' before bailing
out.

This allows adding the mcuboot/scripts directory to PATH and have
'west sign -t imgtool' automatically locate the 'imgtool.py' script.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-30 14:17:07 -05:00
Carles Cufi
8129a78a51 dts: bindings: qspi-nor: Replace tabs with spaces
YAML doesn't support tabs, replace them with spaces.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-01-30 13:05:12 -06:00
Anas Nashif
923ca14b7d sanitycheck: show which threads are stuck
Print a warning if some threads are taking more time and seem to be
stuck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-30 16:49:03 +01:00
Anas Nashif
2c1c399872 sanitycheck: minor comment and style cleanup
Remove an unrelated comment and a minor style change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-30 16:49:03 +01:00
Christian Taedcke
fbbf68d63c soc: silabs_exx32: Support all gpio ports on efm32jg and efm32pg
This commit adds the remaining gpio ports I, J and K to the device
tree and dts_fixup headers of the EFM32JG12B and EFM32PG12B SoCs.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-01-30 09:15:53 -06:00
Andrzej Głąbek
40175fd3bd modules: hal: nordic: Fix nrfx log messages
Update revision of the hal_nordic module, so that `uint32_t` arguments
are casted to `unsigned long` in nrfx log messages.
This is done  to avoid warnings about providing an argument of type
`uint32_t` (which is `unsigned int`) where a `long unsigned int` one
is expected.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-01-30 15:50:03 +01:00
Benjamin Valentin
6fd08da96a soc: atmel_sam0: remove CONFIG_ENTROPY_NAME from dts_fixup.h
It's not needed anymore and causes build failures.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-30 08:44:30 -06:00
Benjamin Valentin
9f548b94cd soc: atmel_sam0: remove obsolete include
`cortex_m/exc.h` is not needed anymore and ceased to exist.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-30 08:44:30 -06:00
Benjamin Valentin
edb8df102f dts: atmel_sam0: fix location of flash and sram blocks
The blocks were moved into the soc block in samd5x.dtsi,
so we also have to move them for the the actual SoC definitions
that inherit from that.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-30 08:44:30 -06:00
Benjamin Valentin
9a6898ae60 boards: atsame54_xpro: Add SAM E54 Xplained Pro Evaluation Kit
This adds support for the Atmel SAM E54 Xplained Pro Evaluation Kit.

Only basic functionality has been tested so far.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2020-01-30 08:44:30 -06:00
Francois Ramu
dbc1d6370f boards: stm32: add nucleo board stm32g474re
This patch adds the nucleo_g474re board
         based on the stm32g474 from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-30 08:30:15 -06:00
Francois Ramu
4ef62a2db7 soc: arm: st_stm32: configure stm32g431 series
This patch cleans the defconfig of the STM32G431
     device from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-30 08:30:15 -06:00
Francois Ramu
fafd20ca93 soc: arm: st_stm32: add stm32g474 series
This patch introduces the support of the STM32G474
     device from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-30 08:30:15 -06:00
Andries Kruithof
3db3ae5aed Bluetooth: controller: split: Fix DLE preparation routine
This fixes the EBQ tests 129 and 130. These tests check behaviour for
the DLE procedure when Encoded PHY or 2M PHY are not supported.
See also BT core spec. Version 5.1, Vol6, Part B, Section 5.1.9

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-01-30 15:25:40 +01:00
Erik Brockhoff
88f8880e16 bluetooth: controller: fixing issue with white list clear
When clearing the whitelist, possible white listings in resolve list
were left. These are now also cleared.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2020-01-30 15:11:45 +01:00
Peter van der Perk
11ef49b65c drivers: can: Add SocketCAN support to mcux flexcan driver
Used the SocketCAN initalization code from the can_stm32.c driver which
successfully initializes SocketCAN for the Flexcan driver

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2020-01-30 16:03:34 +02:00
Christian Taedcke
089f30759a board: efm32pg_stk3402a: Add option to compile for EFM32JG12B
By default the firmware is compiled for the EFM32PG12B SoC with the ARM
Cortex-M4F core. When building for efm32pg_stk3402a_jg, The firmware is
compiled for the EFM32JG12B SoC with the ARM Cortex-M3 core.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-01-30 07:06:54 -06:00
Christian Taedcke
4ead400d79 arm: exx32: Add Silabs EFM32JG12B soc files
The Silicon Labs EFM32 Jade Gecko MCU includes:

    * Cortex-M3 core at 40MHz
    * up to 1024KB of flash and 256KB of RAM
    * multiple low power peripherals

This is basically the same as the EFM32 Pearl Gecko, but with an ARM
Cortex-M3 core instead of a Cortex-M4F.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-01-30 07:06:54 -06:00
Trond Einar Snekvik
4ea59711d2 Bluetooth: Move Mesh CCM into a separate module
Moves the Mesh AES-CCM module out into a separate module, to make it
accessible from other subsystems. Adds the new CCM API in
include/bluetooth/crypto.h along with the bt_encrypt functions.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-01-30 12:41:45 +02:00
Magne Værnes
e02eb4e511 samples: net: echo_client/_server: Fix bug in socket close
Fixed bug in udp.c in echo_client and echo_server samples.
The bug causes UDP sockets to not close if socket id is 0.

Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
2020-01-30 12:33:30 +02:00
Ulf Magnusson
6648fe428a doc: devicetree: Update outdated diagram and mention zephyr.dts
zephyr_dt_inputs_outputs.svg still shows the output from dtc being used,
but dtc is unused (except for finding warnings/errors) after the old
devicetree scripts were removed in commit c8c35f76ab ("scripts: dts:
Remove deprecated extract_dts_includes.py script").

Update zephyr_dt_inputs_outputs.svg to show how things are done now.
Also include the new zephyr.dts debugging aid in it. Tweak the
formatting a bit too.

Add zephyr.dts to the diagram in the build overview section too, and
mention zephyr.dts in the text of the devicetree and build overview
pages.

Remove zephyr_dt_inputs_outputs.png and use zephyr_dt_inputs_outputs.svg
directly. Many other places the documentation include SVGs directly, and
there haven't been any complaints, so it probably works fine. The .png
and .svg versions had also drifted out of sync.

Piggyback a link from the devicetree page to the build overview page, to
make it easier to discover.

(I used draw.io to update the diagrams.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 04:27:39 -06:00
Ulf Magnusson
edfe5a653e dts: gen_defines.py: Save final devicetree to zephyr/zephyr.dts
Add a '--dts-out <file>' flag to gen_defines.py that saves the final
devicetree to <file>, in DTS format, using the new EDT.dts_source
attribute.

Handy to have available as a debugging aid. Unused otherwise.

Also write a dummy <BOARD>.dts_compiled file that tells people to look
at zephyr.dts, for people that might be used to that file. It was
removed in commit 8d8b06978c ("dts: Remove generation of
<BOARD>.dts_compiled").

Fixes: #22272

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 04:27:39 -06:00
Ulf Magnusson
a758af4988 dts: edtlib: Add an EDT.dts_source attribute that holds the source code
EDT.dts_source is the source code of the loaded .dts file, after merging
nodes.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 04:27:39 -06:00
Scott Branden
08d2cd304a boards: arm: Add bcm958401m2 board
Add support for bcm958401m2 board.
This board use the uses the BCM58400 Valkyrie SoC.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
2020-01-30 03:54:01 -06:00
Scott Branden
54ce0b2d34 arm: Add Broadcom Valkyrie SoC support
Add initial support for Broadcom Valkyrie SoC as part of Zephyr.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
2020-01-30 03:54:01 -06:00
Ulf Magnusson
8dfbd9f080 kconfig.py: Error/warning formatting nits
Include the "warning: "/"error: " part of the string when wrapping
lines, and consistenly start messages with a capital letter.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 03:51:04 -06:00
Ulf Magnusson
ac78e2d37a kconfig.py: Add a description at the top of the file
Give a short overview of what the script is about.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 03:51:04 -06:00
Ulf Magnusson
bf4133d262 kconfig.py: Flag selects with unsatisfied deps and remove whitelisting
Turn the warning for selecting a symbol with unsatisfied dependencies
into an error. The last instance has been fixed (that triggers in CI at
least).

Also remove the warning whitelisting functionality, which was only used
to whitelist that warning. It hasn't been used for anything else in over
a year, so it probably wouldn't be useful to keep. Getting rid of it
makes the script easier to read.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 03:51:04 -06:00
Anas Nashif
75922bb95a CODEOWNERS: add @nashif for docs
Add @nashif as codeowner for docs temporarily until we have a dedicated
owner.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-30 03:48:50 -06:00
Jukka Rissanen
1d324a1b20 samples: net: echo-server: Fix compile error for missing IP proto
Make sure that the echo-server compiles ok if IPv6 or IPv4 is
disabled when VLAN is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-30 09:42:07 +02:00
Jukka Rissanen
92481765a2 drivers: ethernet: Set the context iface ptr to main interface
If the Ethernet driver has VLAN enabled (only native_posix, mcux
or gmac has VLAN supported), then the iface pointer in ethernet
context should contain the main network interface. This is needed
so that the interface will get link address set to it properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-30 09:42:07 +02:00
Jukka Rissanen
f633c16cbd net: ethernet: Set link local address to VLAN interfaces
Each network interface needs to have IPv6 link local address.
The ll address was not set to VLAN interfaces which then caused
some of the IPv6 neighbors to be in wrong state (INCOMPLETE) in
neighbor cache.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-30 09:42:07 +02:00
Jukka Rissanen
4cad0dda44 net: ipv6: When sending NS, use correct destination address
When we are about to send a NS, we should not use the destination
address as that is typically the multicast address. We should use
the target address instead.

This fixes the case where a neighbor is in incomplete state, and
we send a neighbor solicitation to find out whether the neighbor
is reachable. In this case the destination address is the solicited
node multicast address which is no use when trying to figure out
the source address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-30 09:42:07 +02:00
Kumar Gala
05ced0e79c west.yml: Update ci-tools
Update ci-tools to pickup a number of fixes and improvements.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-29 21:35:14 -06:00
Sebastian Bøe
7d3fa1c2c8 gen_isr_tables: Improve error message
Users are reportedly not able to understand how to debug the following
error message from gen_isr_tables:

gen_isr_tables.py: multiple registrations at table_index 8 for irq 8

Debugging issues these kinds of issues is difficult so we need to give
users as much information as possible.

To make it clearer that it could be an abuse of the 'IRQ_CONNECT' API
that is causing the issue we add this to the error message.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-01-29 14:21:00 -08:00