Commit graph

41120 commits

Author SHA1 Message Date
Jukka Rissanen
3ebe60a3ba net: ip: Helper for getting used network address family as string
This helper can be used in debugging the used network address family.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-12 12:33:19 +03:00
Peter A. Bigot
98a8e293cb scripts: gen_cfb_font_header: correct command sanitization
The code to sanitize the generated font path by removing bindir
improperly stripped the first character of every argument when --bindir
was not provided, corrupting the command documentation when fonts are
generated manually.  Only sanitize if --bindir was provided with
non-empty content.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 20:20:59 -07:00
Peter A. Bigot
8b4d529706 scripts: gen_cfb_font_header: correct last character
DELETE is not a printable character.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 20:20:59 -07:00
Peter A. Bigot
fcb2968f6a subsys/fb: correct last character in vtiled fonts
The last character is TILDE at position 126.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 20:20:59 -07:00
Christian Tavares
f59af49472 samples: gui: lvgl: fix the nRF52840 pins to run sample
this commit correct the #17460 issue

Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
2019-07-11 20:15:00 -07:00
Nicolas Pitre
0aa796cbaa print format: adjust specifiers to be compatible with a 64-bit build
The size_t type is either compatible with an int on 32-bit target, or
a long on 64-bit targets. It could even be a long even on some 32-bit
targets. Let's use the z qualifier in the printf format to be compatible
with whatever flavor in use.

In case of pointers, let's just use %p with pointers directly and
avoid casts altogether.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-11 20:12:26 -07:00
Rick Conrey
094d5c2722 boards: nucleo_wb55rg: Enable RTC
Enable RTC on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-11 13:10:15 -05:00
Rick Conrey
e1e5b6a70e dts: wb: Enable RTC
Enable RTC on STM32WB

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-11 13:10:15 -05:00
Rick Conrey
ad2601aca0 soc: stm32wb: enable counter on STM32WB
Enable RTC on STM32WB

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-11 13:10:15 -05:00
Rick Conrey
f8424c6d06 drivers: counter: enable counter for STM32WB
Add specific LL functions for STM32WB series for RTC control

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-11 13:10:15 -05:00
Yannis Damigos
30ac164771 dts: stm32l4: Fix USB phy node for stm32l432 and stm32l452
Fix USB phy node for stm32l432 and stm32l452, which contain
a USB controller and not a OTG FS controller.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-07-11 13:07:01 -05:00
Ioannis Glaropoulos
3b28297003 tests: kernel: critical: alternative test-case for SAM SoCs with WDT
In SAM SoCs Watchdog is selected by default and runs
with some default configuration, unless the build sets
CONFIG_WDT_DISABLE_AT_BOOT. As the tests/kernel/critical
takes relatively large amount of time to complete, the
watchdog (that is never fed in the test) will eventually
trigger a reset. As a result the test keeps restarting
continuously and never completes. We want to run the
test on SAM SoCs, so we do the following:
- filter our the SAM SoCs with the SAM WDT from the
  default build
- introduce an alternative test-case for these SoCs
  with the additional CONFIG_WDT_DISABLE_AT_BOOT
  option set.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-11 11:26:01 -05:00
Mariusz Skamra
74dbd835c3 Bluetooth: Add BT_SMP_ENFORCE_MITM option
Having this option disabled, MITM flag state can be controlled by
bt_conn_security state. This option is enabled by default to not
change the current implementation behavior.
Related to SM/MAS/SCPK/BV-01-C.

Fixes #17463

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2019-07-11 15:54:17 +03:00
Peter A. Bigot
6bdb1b8b60 boards: arm: particle_*: uncomment cs-gpios in spi assignments
At the time these overlays were created the author was unclear on how to
correctly represent SPI chip selects on a target where the peripheral
does not control that signal.  As such the pin assignment was present
only as documentation.

Enlightenment was subsequently achieved and the cs-gpios property should
be properly defined.

Note that the mesh feather does not define a chip select to be used with
the spi1 peripheral.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 07:06:35 -04:00
Peter A. Bigot
271c63b70d boards: particle_*: move DTS includes to dts subdirectory
This conforms to the standard layout implied by adding BOARD_DIR to
DTS_ROOTS.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 07:06:35 -04:00
Peter A. Bigot
8437ab10eb cmake: DT: Add support for overlays that reference board-provided dtsi
The Particle mesh feather boards provide device-tree overlays that
allow individual applications to select the SPI peripheral to be
used for the pins associated with a specific labelled SPI device.
This is necessary because different peripheral instances have slightly
different properties.

Add BOARD_DIR to DTS_ROOTS so these shared files can be located when
included from application-specific overlays.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 07:06:35 -04:00
Kumar Gala
8e1d3f3328 dts/bindings: Remove generation from binding
Now that the generation script doesn't look at the "generation" in the
YAML, we can remove it from the binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-11 06:51:17 -04:00
Kumar Gala
31052837ed scripts/dts: cleanup 'generation' usage
* Remove dead code that referenced 'generation' but didn't do anything
  with it
* Replace looking at 'generation' with a simple check for property
  starting with # (for things like #address-cells, etc)  or ending in
  -map (for things like gpio-map) to skip

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-11 06:51:17 -04:00
Peter A. Bigot
7f00f38dfe drivers: eth_stellaris: update for dts change to local-mac-address
uint8_array values are now generated as structure initializers.  Update
the code accordingly.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 06:50:27 -04:00
Peter A. Bigot
ec2ba8d968 drivers: eth_mcux: update for dts change to local-mac-address
uint8_array values are now generated as structure initializers.  Update
the code accordingly.  The implementation assumes that existing
devicetree source does not provide the correct OUI so preserves the
in-driver override of the value provided by devicetree and its setting
for random/unique addresses.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 06:50:27 -04:00
Peter A. Bigot
388460ac14 drivers: eth_enc28j60: update for dts change to local-mac-address
uint8_array values are now generated as structure initializers.  Update
the code accordingly.  The implementation assumes that existing
devicetree source does not provide the correct OUI so preserves the
in-driver override of the value provided by devicetree.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 06:50:27 -04:00
Peter A. Bigot
79765b8ad7 scripts/dts: fix support for uint8-array property values
uint8-array is the name for what the devicetree specification calls a
bytestring.

The original parsing code treated square brackets as equivalent to
quotes or angle brackets, failing to interpret elements as hex-encoded.
This was a bug, corrected in this patch by processing content as a
sequence of hex-encoded bytes with arbitrary whitespace.

The original generating code emitted the property as individual
elements.  Replace that with generation of a single structure
initializer, which is more useful in cases where the length of a
property value may vary between nodes.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 06:50:27 -04:00
Joakim Andersson
99e8710a50 Bluetooth: services: Delete unused IPSP sample
Delete IPSP sample file, this source file is not included in any build
files. The service contains no valuable logic other than advertising
with the IPSP service in the advertising data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson
26ca3682bd Bluetooth: services: Move HID over GATT service
Move the HID over GATT service into the sample that demonstrates it.
This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson
88f13ebab6 Bluetooth: services: Move Current Time service sample
Move the Current Time service into the sample that demonstrates it.
This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson
eecc58fafd Bluetooth: services: Move health thermometer service
Move the health thermometer service into the sample folder that
demonstrates it. This avoids long build paths

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Joakim Andersson
029a66a195 Bluetooth: services: Move Heart rate service
This commit moves the BLE GATT heart rate service from
samples/bluetooth/gatt to subsys/bluetooth/services and adds a Kconfig
entry to enable and configure the service.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Emanuele Di Santo
30d65809fc Bluetooth: services: battery service enhancements
This commit moves the BLE GATT Battery service
from /samples/bluetooth/gatt to /subsys/bluetooth/services and
adds a Kconfig entry to enable and configure the service;
when enabled, it will register itself automatically.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Kumar Gala
6a0fcf1b45 dts: arc: fix cpu num
Fix the cpu number to match the node name

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-11 06:15:58 -04:00
Manivannan Sadhasivam
7ac767b880 scripts: dts: Match alpha numeric property values
For using alpha numeric property values in a devicetree node, we
need to match the values starts with a number. Current scenario will
return the value as a numeric literal if it starts with a number. This
will not work for a compatible like, "96b-ls-con" which is proposed in
issue #15598.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-07-11 06:15:22 -04:00
Emanuele Di Santo
173202f392 boards: arm: nrf52840_pca10090: swap error for assert in board.c
Use an assert to catch the situation where we can't find a port
to use for the reset line pin, since it shouldn't really happen.

The case where reset_pin_configure() is executed but no reset
line is selected can't happen due to static asserts in `integrity.c`
that enforce a reset line to be selected when the reset pin
functionality is enabled.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-07-11 11:27:47 +02:00
Emanuele Di Santo
c231988d9c boards: arm: nrf52840_pca10090: fix warning in board.c
Initialize a variable to avoid a compiler warning
when the reset pin is not selected.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2019-07-11 11:27:47 +02:00
Michael Scott
e7155622a2 net: lwm2m: add custom TLS credential load function pointer
Current implementation of LwM2M engine doesn't allow users a way
of overriding TLS credential load with custom function.  This
would be needed by an offloaded TLS stack where we don't want
to use standard Zephyr functions.

Let's add a load_credential function pointer to the LwM2M client
context which will be called when it's available.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/17408

Signed-off-by: Michael Scott <mike@foundries.io>
2019-07-11 11:08:05 +03:00
Nicolas Pitre
d7e49ee3e7 tests: subsys: settings: fix pointer mismatch on 64-bit targets
This fixes the following error:
passing argument 5 of ‘fsutil_read_file’ from incompatible pointer type

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-11 09:40:20 +02:00
Tedd Ho-Jeong An
c818406129 doc: Bluetooth: Update PICS to ICS
PICS is changed to ICS by BTI.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
e5fd1c8792 doc: Bluetooth: Add ICS for Mesh Profile
This patch adds the ICS for Mesh Profile based on 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
7c5f641db7 doc: Bluetooth: Update SM ICS to 7.4.1
This ptach updates the SM ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
ad4035bc25 doc: Bluetooth: Update L2CAP ICS to 7.4.1
This patch updates the L2CAP ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
400ab8dc20 doc: Bluetooth: Update GATT ICS to 7.4.1
This patch update the GATT ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
26b94e76f8 doc: Bluetooth: Update GAP ICS to 7.4.1
This patch updates the GAP ICS to 7.4.1.
It updates the Bluetooth Spec to 5.1 and added missing ICS tables.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Ioannis Glaropoulos
4476ae00d2 tests: kernel: fp_sharing: add test for k_float_disable
This commit contributes the basic testing for
k_float_disable() API, for ARM and x86 ARCHes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-10 13:44:02 -07:00
Ioannis Glaropoulos
3d3a8c554f tests: kernel: fp_sharing: move fp_sharing test
Make fp_sharing a 'parent' test suite directory, and
rename the original fp_sharing test into
tests/kernel/fp_sharing/generic. In this
way more FP-related tests can be grouped
together in the same test directory.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-10 13:44:02 -07:00
Ioannis Glaropoulos
85f7aeeced arch: x86: make z_arch_float_disable return -ENOSYS if not supported
For the x86 architecture the z_arch_float_disable() is only
implemented when building with CONFIG_LAZY_FP_SHARING, so we
make z_arch_float_disable() return -ENOSYS when we build with
FLOAT and FP_SHARING but on an x86 platform where
LAZY_FP_SHARING is not supported.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-10 13:44:02 -07:00
Ioannis Glaropoulos
0e67759985 kernel: fix #endif quard error for k_float_disable
The implementation of z_impl_float_disable was missplaced
inside the #ifdef SPIN_VALIDATE. Fixing it.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-07-10 13:44:02 -07:00
Nicolas Pitre
ffab197928 libc: fix memchr() prototype
The standard memchr() uses an int for its second argument.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-10 13:42:31 -07:00
Timo Teräs
55dc481a15 libc: add strnlen implementation
This is standard function and useful for application writers.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2019-07-10 13:41:20 -07:00
Michael Scott
c69081d775 boards: arm: nrf52840_pca10056/nrf52_pca10040: enable pyocd runner
Mbed OS provides a DAPlink firmware update for nRF52840-DK here:
https://os.mbed.com/platforms/Nordic-nRF52840-DK/
and for nRF52-DK here:
https://os.mbed.com/platforms/Nordic-nRF52-DK/

When using this firmware we need to flash the board with the pyocd
runner.  Let's enable the pyocd runner for this purpose.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-07-10 12:11:46 -05:00
Jun Yang
933d59ee3c samples/fs: support fs demo on mimxrt_1050 evk board
Add mimxrt_1050 evk board into white list.

FS demo Kconfig for mimxrt_1050 evk board.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00
Jun Yang
da3765abc5 usdhc: support NXP i.MXRT usdhc
support NXP i.MXRT usdhc for file system to access.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00
Jun Yang
27d8329fc9 clock/usdhc: Enable clock of USDHC of i.MXRT
Enable clock of USDHC of i.MXRT.

Add clock interface for USDHC in ccm.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00