Commit graph

41120 commits

Author SHA1 Message Date
Paul Sokolovsky
bcea876344 net: lib: sntp_simple: Issue multiple requests with backoff
SNTP is UDP-based protocol, and thus not reliable. Previously,
high-level aka "simple" SNTP just issues a single request via
the low-level SNTP API. Instead, send multiple requests, starting
with a small timeout, and exponential backoff, repeated within
timeout specified by user in call to sntp_simple().

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-13 10:40:45 +03:00
Alberto Escolar Piedras
02ec7a0732 Kconfig: Correct COVERAGE help msg
CONFIG_COVERAGE is also supported in some real targets now
as described in the doc
https://docs.zephyrproject.org/latest/guides/coverage.html

So let's remove that missleading sentence

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-09-13 09:20:10 +02:00
Maureen Helm
b948fe6037 soc: nxp_lpc: Enable mpu on the lpc54114 m4 core
Enables the arm v7m mpu on the lpc54114 m4 core. Reuses the mpu
configuration from the i.mx rt, which has the same mpu.

Tested on hardware with tests/kernel/mem_protect

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-09-13 09:16:26 +02:00
Ulf Magnusson
d8866e1567 modules: Update ci-tools so that the latest tests run in CI
This extra step is needed after updating the ci-tools repo now, or the
latest tests won't run.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-13 02:14:47 -05:00
Kumar Gala
c17297c18a drivers: ens210: Fix error in header guard
Looks like some copy/paste bug snuck in.  Fix the include header guard
to define the proper name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-12 22:04:55 -05:00
Peter A. Bigot
be2a885d42 scripts/dts/gen_defines.py: exclude initializer lists from conf file
Things that parse generated_dts_board.conf can't deal with entries
like:

    DT_GPIO_KEYS_BUTTON_1_GPIOS={"GPIO_0", 14, 256}

so keep them from being added there.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-12 15:51:08 -05:00
Peter A. Bigot
f62ae3e8ef scripts/dts/gen_defines.py: generate initializers for phandle/val lists
When a phandle-array (compound) has multiple members generate a define
that says how many there are; generate an initializer for each
individual member; and generate an initializer for the sequence of
members.

This allows drivers that expect multiple values in a compound to process
them without horrendous conditional compilation code attempting to
detect the number of elements in the compound.

It also eliminates the need to repeat the long prefix when initializing
a structure with the fields of a single compound.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-12 13:31:48 -05:00
Peter A. Bigot
392845b13f scripts/dts/gen_defines.py: return macro identifier in out functions
The lowest level output function is the one that determines the full
name of the macro, including DT_ prefix.  Return the name of the macro
that provides the value for an identifier so that it can be used in
higher layers of the generator.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-12 13:31:48 -05:00
Peter A. Bigot
e9a173120f scripts/dts/gen_defines.py: generalize string escape
Add str2str to make the conversion of a string into a C literal with all
necessary escapes and enclosing double quotes available outside a
function that emits a define.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-12 13:31:48 -05:00
Piotr Mienkowski
b914ba8831 drivers: remove gpio_atmel_sam3 driver
The gpio_atmel_sam3 is no longer required since the gpio_sam, common
SAM family GPIO driver, provides improved functionality.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Piotr Mienkowski
b5b895df8d boards: add "User LED" to arduino_due board DTS
This commit adds user yellow LED to arduino_due board DTS.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Piotr Mienkowski
d8fa80ffd7 boards: update arduino_due to use gpio_sam driver
Update configuration of arduino_due board to use a common gpio_sam
driver rather than sam3x specific gpio_atmel_sam3. The gpio_atmel_sam3
driver is going to be deprecated.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Piotr Mienkowski
c249782bbc soc: add DTS PIO module nodes for sam3x series
This commit adds DTS PIO nodes for sam3x series SoCs.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Piotr Mienkowski
17b3ead21a drivers: fix #ifdef in gpio_sam driver
- prefix SOC_SERIES_ defines with CONFIG_
- exclude pull down configuration on sam3x series

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Erwan Gouriou
121148e4d7 boards/shields: Enable shields samples on stm32mp157c_dk2
stm32mp157c_dk2 Arduino header lack A2 and A3 pins which
are assigned to non GPIO pins.
Remove optional shields properties that are using one of these
pins by providing board overlays to the impacted shields.

Fixes #19079


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 13:21:25 -05:00
Robert Weber
3a3eb0e3af boards: nucleo_wb55rg: Rename documentation file to match board name
Rename doc/nucleowb55rg.rst to doc/nucleo_wb55rg.rst so the file name
matches the name of the board it is documenting.

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Robert Weber
772b5abae1 boards: nucleo_wb55rg: Enable IWDG
Enable the independent watchdog on the nucleo_wb55rg

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Robert Weber
17f545be7d soc: stm32wb: Add support for STM32 IWDG
The driver for STM32's independent watchdog already exists and is
compatible with the stm32wb SoC. Enable the independent watchdog
for the stm32wb series for use with this driver.

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Erwan Gouriou
5a12d51285 boards: Clean up references to env variable PROJECT_SOURCE_DIR
As recommended in cmake/app/boilerplate.cmake, ZEPHYR_BASE should
be preferred to PROJECT_SOURCE_DIR.
Do the change for all boards still referring to PROJECT_SOURCE_DIR.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 13:16:16 -05:00
Kumar Gala
373133132f drivers: counter: remove deprecated functions
counter_set_alarm and counter_get_user_data have been deprecated for at
least 2 releases.  We can now remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-12 13:14:12 -05:00
Jukka Rissanen
f6c5ea6c81 tests: net: dhcpv4: Increase the buffer count
Test requires more network buffers to work properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-12 17:33:44 +03:00
Jukka Rissanen
99e0ae6fd9 net: conn: Deliver multicast pkt to all interested parties
If we receive a multicast IPv4 or IPv6 packet, then we need to
deliver it to all sockets that have installed a handler for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-12 17:33:44 +03:00
Paul Sokolovsky
1858b31536 samples: sockets: sntp_client: Build for both native Zephyr and POSIX
To make sure sntp API plays well with CONFIG_POSIX_API.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-12 17:30:29 +03:00
Paul Sokolovsky
a7bb2850f7 net: sntp: Allow to build for CONFIG_POSIX_API.
Use POSIX headers in this case.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-12 17:30:29 +03:00
Paul Sokolovsky
7c49ac6e0a include: net: socketutils: Allow to build for CONFIG_POSIX_API
Previously, they were tested only with CONFIG_NET_SOCKETS_POSIX_NAMES,
but should also work with POSIX subsys. Achieve this by including POSIX
headers in this case.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-12 17:30:29 +03:00
Erwan Gouriou
25b0c04b5d boards: nucleo_wb55rg: Add missing flag around SPI _NSS pin definition
Kconfig symbol SPI_STM32_USE_HW_SS is used to control NSS pin
enabling.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 09:02:15 -05:00
Erwan Gouriou
e0c2b16b29 boards: stm32h747i_disco: Minor fixes
* Exlude _m4target from net tests as they assume SERIAL is enabled,
which is not the case (yet).
Fixes: #19065
* Zephyr drivers headers were moved from include/ to include/drivers.
Update pinmux.h path to the new location.
* Add missing status line on joystick_left dts node.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 09:02:15 -05:00
Erwan Gouriou
a0feae0382 boards: nucleo_f103rb: fix dts file
Minor fix


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 09:02:15 -05:00
Erwan Gouriou
0a3f82da9a boards: nucleo_f411re: Fix to default configuration
Fix nucleo_f411re default configuration by deactivating I2C support.
Additionally fix wrong comment and end of file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 09:02:15 -05:00
Philémon Jaermann
a1aabbb08a drivers: watchdog: Pass timeout in ms if iwdg is started at boot
iwdg_stm32_install_timeout expects a timeout passed in
milli seconds. As the timeout is defined in micro
seconds in Kconfig.stm32, we need to divide by
USEC_PER_MSEC when CONFIG_IWDG_START_AT_BOOT is
activated because iwdg_stm32_install_timeout makes
the multiplication by USEC_PER_MSEC.

Fixes #18695

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2019-09-12 08:46:34 -05:00
Pushpal Sidhu
e5deb5adc9 dts: stm32l4r5: Add extra timer nodes not present in parent
Add timer nodes that aren't present in the parent file. Adds timers 3,
4, 5, 8, 17.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2019-09-12 08:43:53 -05:00
Björn Stenberg
b6454d5f3f STM32 wdg: Remove use of float
Using int avoids pulling in several kilobytes of float math code.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2019-09-12 08:43:33 -05:00
Marcin Niestroj
0951ce2d34 gpio: stm32: support disabling and reenabling interrupts on pin
Up to now interrupts could be only configured once, with no way to
disable them in runtime.

Allow interrupts to be disabled in runtime and then properly reenabled
on user request. This allows to ignore interrupts when software is not
expecting them.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-09-12 08:41:44 -05:00
Erwan Gouriou
b42ad680c5 dts/Kconfig: Remove symbol HAS_DTC_USB
Symbol not used, so clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou
21d39eff6c dts/Kconfig: Remove symbol HAS_DTS_QDEC.
Symbol not used, so clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou
555936f771 dts/Kconfig: Remove unused HAS_DTS_SPI
Symbol is always "and'ed" with the symbol that
selects it, so no effect. Clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou
e5380258b6 dts/Kconfig: Remove unused HAS_DTS_ETHERNET
Symbol not used clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou
e7574e1c00 dts/Kconfig: Remove unused HAS_DTS_ADC
Symbol not used clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Armando Visconti
b7944510a4 dts/bindings: sensors: remove '-magn' extension from lis2mdl name
The LIS2MDL is not a combo device, but pure magnotemeter.
Hence, '-magn' extension is not adding information and can
be removed from dts compatible name as well as binding filename.

Instead specify '-i2c' or '-spi' to distinguish between the names.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-12 07:58:34 -05:00
Kumar Gala
2f1cd9bf0a cmake: add new search locations for shield overlay and conf files
* Add support to search for a board specific shield in
  <SHIELD DIR>/boards/<SHIELD>/<BOARD>.{overlay,conf}.  So we can
  support something like:

  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.overlay
  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.conf

Fixes #19078

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-12 07:17:49 -05:00
Kumar Gala
b170d829f8 cmake: Fixup shield overlay and conf file search locations
* Fix dir name when shield name doesn't match the dir name.  So for
  shield 'x_nucleo_iks01a3_shub' we will look in now for
  x_nucleo_iks01a3/boards/<BOARD>.{overlay,conf} instead of
  x_nucleo_iks01a3_shub/boards/<BOARD>.{overlay,conf}

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-12 07:17:49 -05:00
Kumar Gala
88c4cd8273 cmake: move shield board/conf handling
Move handling for shield boards/board.overlay, shield.conf and
boards/board.conf inside the SHIELD_LIST check.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-12 07:17:49 -05:00
Andrew Boie
a470ba1999 kernel: remove z_fatal_print()
Use LOG_ERR instead.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
2192499fe0 tests: enable log in immediate mode by default
Fatal error reporting now only dumps to the log mechanism,
so enable it in immediate mode for all tests to ensure
that fatal errors are visible and no messages are lost.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
c4befd50ab tests: increase min_ram for two tests
These two tests were right at the knife edge of 16kb
on riscv64, and were not building with logging enabled
on that platform.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
df434592d6 tests: bluetooth: mesh: adjust microbit config
Disable logging defaults for this test, enabling logging
causes this test to not fit in RAM.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
7819a5a9a8 tests: profiling_api: increase idle stack size
This test for some reason wants to validate that
k_stack_analyze() works when called from the idle thread,
but with a default idle stack size of 256 this just results
in crashes.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
ab1075f0d9 board: qemu_nios2: set yaml RAM/ROM size
This emulated board has 128KB each of flash and SRAM.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Andrew Boie
06c6b424b6 log_core: always build stubs when !userspace
These functions get called from various places and
we were observing linker errors. Always build the stubs
when userspace is disabled, gc-sections will discard them
if unused anyway.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-12 05:17:39 -04:00
Johann Fischer
75b490efc2 sample: zperf: enable test for the shield link board ETH
Enable test for the shield link board ETH.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00