Commit graph

41120 commits

Author SHA1 Message Date
Ulf Magnusson
95c18f1e6b dts: gen_defines.py: Clean up 'reg' code
Reorganize write_regs() to reuse more code for *_BASE_ADDRESS and
*_SIZE, and get rid of reg_addr_ident() and reg_size_ident().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-07 16:42:33 +01:00
Joakim Andersson
57addad856 Bluetooth: host: Use direct connection if not host resolving list
Start initiator immediately instead of scanning for device first.
If the host resolving list is used we need to go via scanner to resolve
the address.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-07 16:04:03 +01:00
Antony Pavlov
88c09a8156 boards: stm32f030_demo: reduce kernel memory usage
Based on this commit

  | commit dd6186f299
  | Author: Bobby Noelte <b0661n0e17e@gmail.com>
  | Date:   Sat Sep 30 18:24:46 2017 +0200
  |
  |     boards: nucleo_f030r8: reduce kernel memory usage
  |
  |     nucleo_f030r8 fails in CI because applications need
  |     more RAM.
  |
  |     Reduce kernel memory used by stacks and ISR vector table.
  |
  |     Fixes #3923

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2020-01-07 08:15:34 -06:00
Antony Pavlov
f1bf04ade8 boards: stm32f030_demo: Set pinmux.c compilation under switch CONFIG_PINMUX
Based on this commit

  | commit e1de4cf6b5
  | Author: Alexandre Bourdiol <alexandre.bourdiol@st.com>
  | Date:   Thu Jun 6 15:47:23 2019 +0200
  |
  |     boards: Set pinmux.c compilation under switch CONFIG_PINMUX
  |
  |     Fix compilation issue for STM32 boards with CONFIG_PINMUX=n
  |     Fixes #16177

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2020-01-07 08:15:34 -06:00
Peter Bigot
2597df4965 tests: kernel: timer: fix coverity side expression complaint
Capture the value of the volatile variable outside the assert and use
the captured value in the assert.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-07 08:48:25 -05:00
Antony Pavlov
276c26b01a boards/arm: dts: fix formatting
Replace spaces by tabs. Drop extra empty lines.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2020-01-07 08:46:26 -05:00
Gerson Fernando Budke
bd0d8a35c3 drivers: ieee802154: rf2xx: Add GPIO dependency
The rf2xx driver needs GPIO driver to works. The RST, SLPTR and INT
are mandatory signals and driver uses DT to configure them. This add
the GPIO dependency on Kconfig.rf2xx file.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-07 13:51:46 +02:00
Jukka Rissanen
2a1eabecc6 drivers: eth: mcux: Disable HW accel checksum calc
Do not enable hardware accelerated checksum calculation by
default. It does not work for frdm-k64f and is causing
confusion among users.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-07 12:29:49 +02:00
Andrew Boie
8617af383d drivers: watchdog: fix system call handlers build
A directive to compile the system call handlers for the
watchdog subsystem was omitted from CMakeLists.txt, causing
the handlers not to be compiled and some issues in the C
file undetected.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-06 21:36:54 -08:00
Peter Bigot
b58e6ae5b6 doc: avoid non-standard value for Kconfig predefines
When building with Kconfig a symbol CONFIG_FOO is either undefined, or
defined to the integer literal 1.  There are styles and use cases
where this is important, e.g. using "#if (CONFIG_FOO - 0)" which would
not work with a macro expanding to the identifier y.  Use the standard
default definition instead of a special non-default one.

Also consistently use space rather than tab indentation within the
multi-line setting, and alphabetize the CONFIG_ predefines.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-06 21:53:46 -05:00
Jan Van Winkel
78c6241ee2 samples: display: Build for st7789v_waveshare_240x240
Update sample.yaml file for ST7789v sample to also build with
st7789v_waveshare_240x240 shield.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Jan Van Winkel
a781d1267f samples: display: Enable display support in ST7789V sample
Enable display support for ST7789V sample by setting CONFIG_DISPLAY in
prj.conf.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Jan Van Winkel
6c5477dd3f boards/shields: st7789v: Use conditional Kconfig
Use conditional Kconfig, as introduced by PR #20934, for ST7789V
based shields.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Jan Van Winkel
2e713dc34b drivers: display_st7789v: Name pixel format choice
Made the unnamed choice for ST7789V pixel formats named so that the
default value can be set in defconfig files.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-01-06 14:25:00 -05:00
Anas Nashif
e9450065de sanitycheck: additional scripting hook after flashing
Support custom hooks after flashing is completed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
4522e10d65 sanitycheck: report overflow on SRAM overflow
Instead of failing, report overflow when the SRAM overflows.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
bdffb88950 sanitycheck: close pipe file handles
Make sure we close the pipe file handles after we are done, otherwise we
will end up with too many open file descriptors and crash...

Fixes #20974
Fixes #21637

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
64c84b15ce sanitycheck: more debug messages
More debug messages to help locate issues and debug bugs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
1b1a7e242b sanitycheck: run pre/post script using dedicated function
Reduce duplicated code by introducing a dedicated function for running
custom scripts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
32e924459d sanitycheck: log errors when executing binaries
Add some verbosity into the log file to help with debugging.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
52b66c6ad1 sanitycheck: when timing out in handler, show correct log file
Fix issue where we timeout in handler and show the device.log file
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
813deb7967 sanitycheck: use Unknown instead of N/A for fail reason
Instead of N/A, use Unknown which is more appropriate, N/A does not
really apply here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Anas Nashif
5c331f95ad sanitycheck: add Digilent to device discovery
Some platforms use this USB device for serial, detect it when generating
hardware map.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-06 13:58:10 -05:00
Andrei Emeltchenko
e8da2b80f9 doc: native_posix: Add mention about virtual USB
Add information and link to Virtual USB controller.

Fixes #13232.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-01-06 13:57:36 -05:00
Peter Bigot
74ef395332 kernel: move test of kernel startup state to more visible location
The original implementation left this function hidden in init.h which
prevented it from showing up in documentation.  Move it to kernel.h,
and document it consistent with the other functions that allow caller
customization based on context.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-06 13:55:31 -05:00
Ulf Magnusson
1404aaf099 kconfig: Remove '# hidden' comment on ARCH_HAS_CUSTOM_BUSY_WAIT
Straggler. See commit 41713244b3 ("kconfig: Remove '# Hidden' comments
on promptless symbols").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-06 13:34:00 -05:00
Pawel Czarnecki
65b47118c5 boards: litex_vexriscv: Enable LiteX PRBS driver
This enables LiteX PRBS random number generator driver
for litex_vexriscv board.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-06 13:33:25 -05:00
Pawel Czarnecki
894b488b06 drivers: entropy: Add driver for LiteX PRBS module
This adds PRBS ranom number generator driver for
LiteX SoC builder with its bindings.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-06 13:33:25 -05:00
Olof Johansson
3b733b5282 interrupt_controller: plic: use shared symbol for DT_*
miv already had it defined, but let's shorten the names and use
them in the driver. This also adds it for sifive-freedom.

Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-06 13:28:21 -05:00
Olof Johansson
a6b3b616f5 riscv: use standard MSTATUS
This is no longer needed, since all in-tree platforms are only using
the standard mstatus formats. Remove it to avoid the complexity.

Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-06 13:27:45 -05:00
Vinayak Kariappa Chettimada
19ac87c4f0 Bluetooth: controller: Add set adv param cmd param validation
Added implementation to validate HCI LE Set Advertising
Parameters Command parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-06 17:42:34 +01:00
Vinayak Kariappa Chettimada
ec1e66ebd8 Bluetooth: controller: Add Kconfig option for parameter checking
Added Kconfig option to conditionally compile in HCI command
parameter validation code.

When building a combined host plus controller application,
only validations in the host at the top level close to the
API caller is sufficient.

The controller validations are included in controller only
builds.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-06 17:42:34 +01:00
Henrik Brix Andersen
eb42a24dc6 boards: nxp: pinmux: enable ftm pwm outputs based on DT_INST_* defines
Enable the NXP FTM PWM outputs in the board pinmux files based on the
DT_INST_* defines instead of CONFIG_PWM_* to match the pwm_mcux_ftm
driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Henrik Brix Andersen
ebb4126cbe soc: nxp: ke1xf: rename ftm instances to pwm to match other SoCs
Rename the NXP FTM instances in the KE1xF SoC to PWM to match the
other SoCs/boards using the FlexTimer as PWM generator.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Henrik Brix Andersen
87e768c79d soc: arm: nxp: remove unused DT_FTM_* dts fixups
Remove the now unused DT_FTM_* dts fixups from NXP ARM SoCs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Henrik Brix Andersen
9efc58961c drivers: pwm: mcux_ftm: use DT_INST_* defines instead of dts fixups
Convert the NXP MCUX FTM driver to use the DT_INST_* defines instead
of a mix of CONFIG_PWM_* and dts fixups. This simplifies adding new
device tree properties to the ftm nodes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Henrik Brix Andersen
7694ebb694 drivers: pwm: mcux_ftm: only emit warning on period change from zero
Only emit a warning about changing PWM period for all channels of a
given FTM instance when changing the period from zero to
non-zero. This silences the useless warning issued at first FTM PWM
channel configuration.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Antony Pavlov
010797394b boards: arm: nucleo_f030r8: use smaller board image
At the moment we have different images for
for Nucleo F030R8 and Nucleo F070RB boards,
the images have the same pixel size but different
file formats, e.g:

  NAMES="f030r8 f070rb"
  for i in $NAMES; do
    file boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg: JPEG image
  data, Exif standard: [TIFF image data, little-endian,
  direntries=0], baseline, precision 8, 500x367, frames 3
  boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg: JPEG image
  data, JFIF standard 1.01, aspect ratio, density 1x1,
  segment length 16, progressive, precision 8, 500x367, frames 3

The nucleo_f030r8.jpg file is larger:

  for i in $NAMES; do
    ls -1 -sh boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg;
  done

  128K boards/arm/nucleo_f030r8/doc/img/nucleo_f030r8.jpg
  40K boards/arm/nucleo_f070rb/doc/img/nucleo_f070rb.jpg

Applying simultaneous black/white threshold to the images
and comparing them with imagemagick tools shows that
the images have no significant difference.

  for i in $NAMES; do
    convert boards/arm/nucleo_$i/doc/img/nucleo_$i.jpg \
            -threshold 80% /tmp/$i.png;
  done
  compare $(for i in $NAMES; do echo -n  "/tmp/$i.png "; done) \
            -compose src /tmp/diff.png

See also 'boards: arm: unify Nucleo-64 boards connectors image'
(https://github.com/zephyrproject-rtos/zephyr/pull/15926).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2020-01-06 09:47:46 -06:00
Jonas Norling
d7d3462d91 drivers: eth: native_posix: Don't sleep when there is data to read
Don't sleep 50ms after each received packet, sleep only when there
wasn't anything to receive. Otherwise data could get stuck for a long
time if there was more than 20 packets coming in per second. The
read() call on a TUN/TAP device returns only a single packet per call.

Also remove the call to eth_stats_update_errors_rx() because this else
clause isn't actually a receive error, we're just waiting for more
packets.

Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
2020-01-06 17:03:13 +02:00
Ulf Magnusson
7e0af9e0b8 kconfig: Remove redundant $ZEPHYR_BASE from 'source's
The $srctree environment variable is already set to point to the Zephyr
root, so no need to do

    source "$(ZEPHYR_BASE)/Kconfig.zephyr"

in samples. Just

    source "Kconfig.zephyr"

works.

(Things would break if $srctree was set to anything else, because every
'source' in the Kconfig files will be relative to it.)

Also add a 'mainmenu' title to the littlefs sample. It shows up at the
top of menuconfig/guiconfig. Source Kconfig.zephyr instead of Kconfig to
avoid overriding it.

As a sidenote, $(FOO) is better $FOO in Kconfig. $FOO is legacy syntax
that Kconfiglib only supports to be compatible with old Linux kernels.
$(FOO) uses the Kconfig preprocessor.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-06 09:48:53 -05:00
Marco Peter
1ee99d2568 drivers: flash: Build STM32 flash support only when selected
The current configuration causes the STM32 flash support always to be
built, even if an unrelated flash driver, by example the SPI_NOR driver
is selected.
This behaviour gets especially problematic (build failure) if the flash
hardware of the given MCU is not supported (e.g. STM32F2).
The suggested change should ensure that STM32 flash support only is
built when it actually is selected.

Signed-off-by: Marco Peter <marco@peter-net.ch>
2020-01-06 08:51:18 -05:00
Christopher Friedt
5308a941a9 Bluetooth: controller: define adv channel access address as macro in pdu.h
The new macro is PDU_AC_ACCESS_ADDR

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-01-06 09:58:18 +01:00
Wentong Wu
7d2586533d power: add DEVICE_PM_LOW_POWER_STATE for device power management
When system going to sleep state, make peripherals go to state
DEVICE_PM_LOW_POWER_STATE which needs less time than state
DEVICE_PM_SUSPEND_STATE to save more power.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-01-04 09:23:15 -05:00
Wentong Wu
e71485e8ff power: active all devices if not all devices enter suspend state
Active all devices if not all devices enter suspend state when system
decide going to suspend state.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-01-04 09:23:15 -05:00
Wentong Wu
9989e5ee06 power: correct log level for power management
Current PM policy allow devices make the decision if going to
sleep/deep sleep state, so it's not error message if some
devices don't enter suspend state, change it to debug level.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-01-04 09:23:15 -05:00
Wentong Wu
de931d501e Style: remove extern on the function declarations in the header
Remove extern on the function declarations in the header file to
keep consistent with others.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-01-04 09:23:15 -05:00
Ulf Magnusson
e9dca5560b dts/bindings: ti,tmp116: Remove unused 'alert-gpios' property
Johann Fischer pointed out that the driver for this sensor
(master/drivers/sensor/tmp116/tmp116.c) doesn't use GPIOs, in
https://github.com/zephyrproject-rtos/zephyr/pull/21605, though there
seems to be an ALERT pin from looking at the datasheet
(http://www.ti.com/lit/ds/symlink/tmp116.pdf).

Remove the unused property declaration.

I was originally just going to change a 'category: optional' to
'required: false' (and 'type: compound' to 'type: phandle-array').
Either solution is fine with me. Could keep the declaration if people
are planning to use it soon.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-04 09:22:38 -05:00
Paul Sokolovsky
b3ef46ed63 samples: sockets: big_http_download: Increase stack size.
x86-mmu now crashes with default 1K, bump to 2K, which hopefully might
work even for 64-bit archs.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-01-04 09:19:16 -05:00
Stephanos Ioannidis
244148a883 cmake: qemu: Use chardev for console
The current QEMU console configuration directly connects the console
serial port to the backend using '-serial' option.

This is less than ideal because only single console instance can be
connected to a backend and aggregation of multiple console outputs is
not possible (e.g. multiple console serial ports and semihosting
console to single console backend).

In order to solve this problem, single multiplexed chardev console
backend is declared and all consoles are connected to it.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-04 09:18:51 -05:00
Andrei Emeltchenko
e742637147 tests: Remove posix arch_exclude for libcxx
Remove arch_exclude: posix also for
tests/application_development/libcxx.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-01-04 09:06:50 -05:00