Commit graph

95513 commits

Author SHA1 Message Date
Mariusz Skamra 3c6eb7d024 samples: smp_svr: Disable GATT Multiple Read
This feature is not used by mcu_mgr.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra 698311d220 Bluetooth: att: Add Kconfig option to disable Multiple Read operation
This adds an Kconfig option to disable GATT Multiple Read support.
This GATT sub-procedure is optional and does not have to be supported.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra becbfa2243 Bluetooth: att: Do not build Signed Write cmd handler if SMP disabled
This function does nothing actually if SMP is disabled.
This excludes att_signed_write_cmd handler from build if BT_SMP
is disabled or BT_SIGNING is disabled.

Note:
BT_SIGNING depends on BT_SMP

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra 76d0dd41f9 Bluetooth: hci_core: Exclude scan related code if non-observer
This chunks should be excluded from build if the target application
does not support neither observer not central role.
This helps to reduce the application image size that implement
Peripheral or Broadcaster role.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra 8a50160198 Bluetooth: Mesh: Depend Mesh upon Observer and Broadcaster roles
This adds dependency upon BT_BROADCASTER and BT_OBSERVER roles.
Those are necessary to implement Mesh device.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra 4e6495c832 Bluetooth: mesh_demo: Enable missing options in configuration file
This enables missing Observer and Brodcaster roles in configuration
file.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Mariusz Skamra f3ba6e3806 Bluetooth: hci_core: Exclude conn creation related code for non-central
Don't build the code that is related to central role if the target
does not support connection creation.
This helps to reduce the application image size that implement
either Observer, Peripheral or Broadcaster role.

Note:
BT_CENTRAL implies BT_CONN and BT_OBSERVER

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-06-27 12:50:24 +03:00
Morten Priess 80e02a93d3 tests: ztest: added test case for multiple mock expects
The test verifies that the mock framework can handle functions
under test which call more than one mock function, and
correctly processes each call.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2018-06-27 03:58:36 -04:00
Morten Priess c52439a6f4 tests: ztest: fixed off-by-one in sys_bitfield_find_first_clear
Calling __builtin_ffsl(neg_bitmap) returns first bit set in the word,
e.g. 4 if bitmap is 11111000. As this must translate to zero-based index
3, one must be subtracted from the result.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2018-06-27 03:58:36 -04:00
Andrew Boie 3efd2693b3 sanitycheck: fix spammy build output
VERBOSE if set to any value enables verbose build output,
setting to 0 does not have the intended effect.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-06-27 03:52:45 -04:00
Kamil Piszczek 85c1522699 Bluetooth: UUID: add UUIDs for missing HIDS characteristics
Adding UUIDs for following characteristics of HID Service:
- Protocol Mode
- Boot Keyboard Input Report
- Boot Keyboard Output Report
- Boot Mouse Input Report

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-06-26 19:06:30 +02:00
Johan Hedberg d41d9bd112 Bluetooth: Convert sample code to use the new bt_data_parse() API
Convert the shell and central_hr sample apps to use the newly
introduced bt_data_parse() API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-26 19:34:57 +03:00
Johan Hedberg 8818244959 Bluetooth: Add helper for parsing advertising data
It is quite easy to implement a buggy or security vulnerable
advertising data parser. Provide a helper for this purpose, which uses
the existing bt_data struct which is used for programming the local
advertising data.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-26 19:34:57 +03:00
qianfan Zhao 086d839ea5 nucleo_f070rb: Enable USART1 ports on nucleo_f070rb
default pinmaps for usart1 is PA9(tx) and PA10(rx)

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-06-26 11:19:09 -05:00
Yannis Damigos 3d53ddd435 dts/arm/st: Fix OTG_FS endpoint number for STM32F4 SoCs
STM32F412/413/446/469 SoCs have 6 bidirectional endpoints
according to the reference manuals RM0402, RM0430,
RM0390 and RM0386.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-06-26 11:17:25 -05:00
Ulf Magnusson f1f1fb41bd arch: arm: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Also simplify the definition of CC3220SF_DEBUG. 'default's can be other
symbols too, not just literal values. The condition for the symbol to be
visible (user-configurable) can be put directly on the prompt as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson f428d8dacf arch: arc: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Also fix the 'default' on XIP. Due to Zephyr's prefer-later-defaults
behavior, it was always set to 'y' (when the dependencies were
satisfied).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson 8cb6fb7223 arch: xtensa: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson b0156b2c48 arch: nios: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson 81d61601a8 arch: riscv32: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson 87ecbe7f48 arch: x86: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Ulf Magnusson aed5e360ee arch/Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 11:07:57 -05:00
Sebastian Bøe 2bcfb88aed cmake: Remove duplicate invocations of target_link_libraries on app
It is not necessary to link 'app' with mbedTLS because mbedTLS is
covered by the 'APP_LINK_WITH_MBEDTLS' mechanism that automatically
links 'app' with mbedTLS.

This patch removes the redundant target_link_libraries invocations.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-06-26 15:53:32 +02:00
Alberto Escolar Piedras 9e82ef13af drivers: entropy: nrf5: Use nrf_rng hal for registers w sideeffects
A few registers with sideeffects were not using the HAL yet.
Fixed.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-06-26 14:49:50 +02:00
Ulf Magnusson 35ec18ac08 genrest: Mention implicit default values
It's common for people to put in a 'default n' "just in case", because
it might not be obvious that bool symbols implicitly default to 'n'. To
make it clearer, mention the implicit default value on the reference
pages of symbols without defaults.

Also mention that choices without defaults default to the first
(visible) symbol in the choice.

Note: Adding to the confusion, Kconfig used to generate a
'# CONFIG_FOO is not set' line for 'default n', but no output when there
was no default. I changed that recently in both the C tools and
Kconfiglib. There's no output either case now (unless the symbol is
visible).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 14:40:04 +02:00
Jukka Rissanen 2c8c1310fb tests: net: ptp: Add ptp clock driver tests
Make sure that the PTP clock driver works as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-26 12:37:28 +03:00
Jukka Rissanen ed25a16a3b driver: ptp_clock: PTP clock driver definition
Defines a PTP clock driver that can be implemented in those network
interface drivers that provide gPTP support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-06-26 12:37:28 +03:00
Mandar Chandrakant Thorat 24047dea23 boards: arm: bbc_microbit: select HAS_DTS_I2C for bbc_microbit
This commit selects HAS_DTS_I2C in bbc_microbit board definition.
It fixes issues similar to issue #8511 for bbc_microbit board

Signed-off-by: Mandar Chandrakant Thorat <mandar.chandrakant.thorat@intel.com>
2018-06-26 04:17:53 -04:00
Mandar Chandrakant Thorat 66986c698f boards: arm: nrf: select HAS_DTS_I2C for nrf52_blenano2
Fixes #8511
This commit selects HAS_DTS_I2C in nrf52_blenano2 board definition.

Signed-off-by: Mandar Chandrakant Thorat <mandar.chandrakant.thorat@intel.com>
2018-06-26 04:17:53 -04:00
Tomasz Gorochowik 23526e4f93 net: if: vlan: Implement packet priority to PCP conversion
This is actually the same as #7229 in which we missed this side of
conversion (only PCP to packet priority was implemented).

The conversion is actually the same both ways, thus it uses the map
added earlier.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2018-06-26 09:56:57 +03:00
Sebastian Bøe a1e806bf44 gen_isr_tables: Delete the dead code accompanying .intList.num_isrs
intList has been populated with the number of isrs, aka interrupts,
but nothing has not been using this information so we drop it and
everything used to construct it.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-06-25 12:54:49 -07:00
Vikrant More 11cb462df5 samples: mesh/onoff_level_lighting_vnd_app: States binding corrections
Make corrections in state binding of Servers as per Mesh Model
Specifications. Previously, when OnPowerUp state equal to 0x02,
then Light Lightness actual state was not assign to last power
down value. Plus when Generic OnOff state changes by client,
then Light Lightness Actual state value get assigned as Light
Lightness Last value instead of default one.
All these issues has fixed here.

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-06-25 22:52:16 +03:00
Maureen Helm c4123643b5 tests: fp_sharing: Extract x86 configs to separate .conf
The SSE and SSE_FP_MATH configs exist only in the x86 architecture, so
extract them to a separate prj_x86.conf file for the fp_sharing test.

Fixes Kconfig warnings when building the test for frdm_k64f:
- warning: attempt to assign the value "y" to the undefined symbol SSE
- warning: attempt to assign the value "y" to the undefined symbol
  SSE_FP_MATH

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-25 12:49:42 -07:00
Ioannis Glaropoulos fb4befb0d4 boards: arm: nrf: select HAS_DTS_I2C for nrf52_pca10040
This commit selects HAS_DTS_I2C in nRF8232 DK board definition.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Ioannis Glaropoulos 237aef1868 boards: arm: nrf: update I2C-related defines for nrf52810
The commit modifies the I2C-related defines in nrfx
configuration to comply with the updates in (57e3644).
It also modifies the i2c configuration in DTS for board
nrf52810_pca10040 to reflect the nRF52810 capabilities.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Ioannis Glaropoulos 2b7c854a65 boards: arm: nrf: move LED and Button definitions in DTS
This commit moves the definitions for the LED and Buttons
supported in nrf52810_pca10040 DK in DTS from board.h. Aliases
are kept in board.h to make basic examples pass.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Ioannis Glaropoulos 21826a5a7d boards: arm: nrf: add directive for nrf52810_pca10040 initialization
This commit adds a compile-time directive for the
nrf52810_pca10040 board that instruct nRFx to perform
certain board initialization. The directive is needed
as nrf52810_pca10040 mirrors the nrf52832 DK hardware.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi 0f6bd5c891 arch: arm: nrf: Add support for the nRF52810
The nRF52810 is a low-cost variant of the nRF52832, with a reduced set
of peripherals and memory. This commit adds basic support for it in the
arch SoC and dts folders.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <ioannis.glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi 6eeeb2a3e5 tests: Fix sizing for several test for chips with 24KB of RAM
When adding the nRF52810, which has 24KB of RAM, some of the tests don't
compile anymore due to lack of SRAM. Address this by either filtering
the test out or reducing the amount of memory allocation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi 5029760c53 boards: arm: Add Nordic nRF52810 board
Since Nordic does not offer an nRF52810 Development Kit and instead
recommends using the nRF52 DK (nRF52832 based), add a board that
enforces the limitations of the nRF52810 but is designed to be flashed
onto the actual nRF52 DK hardware.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <ioannisg.glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi f0df45dd5b ext: hal: nordic: nrfx: Add nRF52810 configuration
nrfx requires specific chip configuration for each IC. Those are not
upstream in the nrfx repository, but rather part of the Zephyr nrfx
port. Add a configuration for the nRF52810.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <ioannis.glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi 0cac36303b boards: 96_nitrogen: Specify the IC
In order to avoid auto-selection by Kconfig, the board needs to define
the specific IC that it contains, in this case an nRF52832.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Jamie McCrae 60e97de583 scripts: runner: nrfjprog: Allow specifying serial number of nrfjprog
This allows for scripts using nrfjrog to specify the serial number of
the attached device to use instead of showing a list of available
devices by adding an optional parameter.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdtech.com>
2018-06-25 12:03:12 -05:00
Subramanian Meenakshi Sundaram 63ef746544 doc: boards: arm: Update datasheet link
Update the link to SAM3X8E datasheet and
update the minicom command to use sudo as
accessing the serial port requires root permission

Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
2018-06-25 11:44:16 -05:00
Carles Cufi 457450522e doc: dt: Clarify the relationship between DT and Kconfig
Try to clarify the scope of Device Tree vs Kconfig in order to allow
Zephyr users to identify where a particular configuration option when
developing an application, board support or SoC support.

Fixes #7230

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-25 16:41:10 +02:00
Jakub Rzeszutko daef3cc5be drivers: uart: nrf: fixing hardware flow control
Commit: 8a255eaf39d3e1a170297fc59c4674c080f99db8
broke flow control initialization.
This PR adds missing:
 - GPIO initialization for RTS and CTS.
 - RTS and CTS pins assignment for flow control.
 - Function for setting default hight state for TXD and RTS pins.
In addition obsolete cast to void has been removed.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-06-25 14:39:25 +02:00
Ulf Magnusson d317a0e6b4 kconfiglib: Update to use redesigned 'referenced' API
Update Kconfiglib to get upstream commit eb6c21a9b33a2 ("Turn
MenuNode/Symbol/Choice.referenced() into a @property") in. It converts
the MenuNode.referenced() function into a property, which makes the API
more consistent (read-only stuff uses properties).

Also update scripts/ci/list_undef_kconfig_refs.py to access .referenced
as a property.

Piggyback a small is_num() simplification.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-25 10:31:08 +02:00
Vikrant More 938f12e99d Bluetooth: Mesh: Gen. OnOff, Gen. Level, Lighting & Vendor Models
This is a application demonstrating a Bluetooth mesh node in
which Root element has following models

- Generic OnOff Server
- Generic OnOff Client
- Generic Level Server
- Generic Level Client
- Generic Power OnOff Server
- Generic Power OnOff Setup Server
- Generic Power OnOff Client
- Light Lightness Server
- Light Lightness Setup Server
- Light Lightness Client
- Light CTL Server
- Light CTL Setup Server
- Light CTL Client
- Vendor Model

And Secondary element has following models

- Generic OnOff Server
- Generic OnOff Client
- Generic Level Server
- Generic Level Client
- Light CTL Temperature Server

Signed-off-by: Vikrant More <vikrant8051@gmail.com>
2018-06-23 22:42:45 +02:00
Maureen Helm 54d1a608ff imxrt1050: Disable low-power modes
The imxrt1050 is configured to use SYSTICK for the kernel timer, but
SYSTICK cannot wake up the soc from low-power modes. Disable low-power
modes on this soc until we have support for an alternative timer.

This fixes k_sleep on the EVKB version of the mimxrt1050_evk board. An
earlier version of the board (EVK, not EVKB), had A0 silicon which
by default did not enter low-power mode on a wfi.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-23 11:00:20 +02:00
Alberto Escolar Piedras 985f43e38b native_posix: Let users use math functions
native_posix relies on the host C library even if users think
they are selecting one of the lib/libc C libraries.

For the math functions to be available at link time we need
to link to the host math library when building for this board

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-06-23 00:39:08 -04:00