Commit graph

41120 commits

Author SHA1 Message Date
Andrei Emeltchenko
7196b80032 tests: Remove posix exclude
Build also for posix.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-01-04 09:06:50 -05:00
Jacob Siverskog
6eef6cd946 Bluetooth: host: Rethink how unpair all works
Instead of having all (=addr NULL or BT_ADDR_LE_ANY to bt_unpair) as a
special case, iterate over all connected peers and unpair them the
regular way. This means bt_gatt_clear is called too. Doing this way
allows us to remove a lot of (now) unused code as well.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2020-01-04 14:10:46 +01:00
Alberto Escolar Piedras
5d94c98915 tests filesystem.fat.api: Do not run on native_posix_64
The FAT FS code clearly does not support platforms where
long is 64bits. See
https://github.com/zephyrproject-rtos/fatfs/blob/master/include/integer.h#L30

So, do not try to run it in native_posix_64
Fixes #21536
Fixes #19231

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-01-03 15:13:59 -05:00
Jose Alberto Meza
c31c6aa99d boards: mec1501modular: Enable additional drivers for modular MEC1501
Enable PWM, ADC, KSCAN and PS2 drivers
Make VCI capable pins to GPIO mode

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-03 12:04:00 -08:00
Jose Alberto Meza
3783c83b25 soc: arm: microchip: Allow to support only light sleep
Make sure light sleep hook function is compile when needed
This solves linking error for shippable test that only enable
light sleep.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-03 12:04:00 -08:00
Jukka Rissanen
07489a1aa2 tests: net: poll: Fix the test name and add proper tag
The test name did not reflect the purpose of the test.
Also add "poll" tag so that we can more easily launch just
this test.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-03 11:26:46 -08:00
Jukka Rissanen
cbf77c1c18 tests: net: poll: Add test case for POLLOUT
We were not testing POLLOUT case so add it here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-03 11:26:46 -08:00
Jukka Rissanen
61249021c0 net: socket: poll() with POLLOUT can return immediately
If we can write to the socket in POLLOUT, then there is no need to
wait.

Note that this is not a full POLLOUT implementation but prevents
the code from waiting even if we could send data out.

Fixes #18867

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-03 11:26:46 -08:00
Jukka Rissanen
e1b8a2ee7e tests: kernel: poll: Add checks when having zero events
Make sure that we test scenario when number of events is zero.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-03 11:26:46 -08:00
Jukka Rissanen
cc6317d7ac kernel: poll: Allow 0 event input
Allow caller to supply 0 events in which case the function just
does the sleep. This is useful so that the caller does not need
to create artificial events.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-01-03 11:26:46 -08:00
Ulf Magnusson
ac09bb33cf dts/bindings: ti,tmp116: Use 'required' instead of 'category' key
'category' is deprecated. See commit fcd665a26c ("dts: bindings: Have
'required: true/false' instead of 'category: ...'").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 09:43:33 -06:00
Sahaj Sarup
4dca5285f0 arm: board: 96b_stm32_sensor_mez: enable USART3
This patchset enables USART3 on the 96Boards STM32 Mezzanine.
It is broken out to J10 Grove Connector.

Changes:

- Enabled USART3 in board dts.
- Updated board index.rst with uart pinouts.
- soc dtsi: enabled usart3.

Test: Tested USART3 as console at 115200 baud

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2020-01-03 09:37:08 -06:00
Andrew Boie
bd13710524 sanitycheck: use abs path for logs
Makes it much easier to inspect them in a different terminal
from where the test was run. These paths tend to be long
anyway, even if relative.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 08:40:34 -05:00
Andrew Boie
114c01b3b9 sanitycheck: allow outdir to be overwritten
Sanitycheck used to delete the output directory if -n
wasn't used, but now it renamed it. Add a new flag to
enable the old behavior.

Do not use logging for these early messages, logger
hasn't been set up yet.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 08:40:34 -05:00
Andrew Boie
2d8d4c5562 sanitycheck: fix early messages
When managing build artifacts the logger hasn't been
initialized. Use print() here instead.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 08:40:34 -05:00
Andrew Boie
1fe1f3a23d sanitycheck: clean up TTY on exit
The code has a lot of sys.exit() calls, but internally these
just raise a special exception. Add a try...finally block
to ensure 'stty sane' is run before leaving the script.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 08:40:34 -05:00
Ulf Magnusson
0fb370b257 drivers: spi: kconfig: Turn pointless 'menuconfig' into 'config'
Same deal as in commit 677f1e6 ("config: Turn pointless/confusing
'menuconfig's into 'config's"), for a newly-introduced SPI_MCUX_FLEXCOMM
symbol.

Also clean up the header to be consistent with recent cleanups.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 07:32:32 -06:00
Ulf Magnusson
0d6e853edc kconfig: NXP IMX: Remove unused HAS_IMX_{RDC,CCM} symbols
The HAS_IMX_{RDC,CCM} symbols were added to ext/hal/nxp/imx/Kconfig in
commit 3afc2b6c61 ("ext/hal/nxp/imx: Import the nxp imx7 freertos bsp"),
and later copied over to modules/Kconfig.imx in commit 12438e1047 ("ext:
hal: Make NXP HALs a Zephyr module").

Never used.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 07:25:49 -06:00
Håkon Øye Amundsen
c9a2a5e7fb scripts: cmake: move print from python to cmake
Prior to this all hex files included in a merge would
be printed on every invokation of cmake.

Allow the user to explicitly require this information
by moving the print to a VERBOSE-only cmake message.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-01-03 08:20:08 -05:00
Andrzej Głąbek
49bd19f3f2 soc: nrf5340: Fix busy waiting on nRF5340 application core
This patch adds a temporary workaround for the incorrect initialization
of the SystemCoreClock global variable that is done for the application
core of nRF5340 (see system_nrf5340_application.c) and that results in
k_busy_wait() producing delays of twice the requested time.
The problem is that the call to SystemCoreClockUpdate() that is done
at the end of SystemInit() correctly sets the value of SystemCoreClock
to reflect the hardware state after reset (HFCLK128M divided by 2),
but then the SystemCoreClock variable is initialized (by z_data_copy()
called from z_arm_prep_c()) to the __SYSTEM_CLOCK value that is defined
as 128000000. This in turn results in nrfx_coredep_delay_us() (used by
k_busy_wait() by default for nRF SoCs) delaying for twice the requested
number of microseconds.
The temporary workaround is to call SystemCoreClockUpdate() at a later
stage of the system initialization, in its nRF53 specific part.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-01-03 14:19:38 +01:00
Vinayak Kariappa Chettimada
c9c65a9b9b Bluetooth: controller: split: Pass scanner LLL context in event
Pass the scanner LLL context in the generated connection
complete event with unknown connecion id for HCI Create
Connection Cancel Command Response.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Vinayak Kariappa Chettimada
13a3270096 Bluetooth: controller: split: Fix assert in PDU Rx quota increment
Directed advertising timeout released PDU Rx quota which it
should not be.

Relates to assert in #21006.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Vinayak Kariappa Chettimada
ca8b6028c6 Bluetooth: controller: split: Move statements close to related context
Minor refactor, move statements close to related context.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Vinayak Kariappa Chettimada
4f42baa43d Bluetooth: controller: split: Use define instead of magic number
Use HCI Error Code define instead of magic number.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-03 14:16:16 +01:00
Ulf Magnusson
bd9962d8d9 kconfig: Remove '# hidden' comments on promptless symbols
Same deal as in commit 41713244b3 ("kconfig: Remove '# Hidden' comments
on promptless symbols"). I forgot to do a case-insensitive search.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 11:38:40 +01:00
ZhongYao Luo
a94e81ba3e Bluetooth: RFCOMM: Fix length errors when payload exceeds 127
hdr->length is the length of the payload, it should be
buf->len - sizeof(*hdr) - 1 or buf->len - (sizeof(*hdr) + 1)

Signed-off-by: ZhongYao Luo <LuoZhongYao@gmail.com>
2020-01-03 10:14:59 +01:00
Aurelien Jarno
b35d414916 Bluetooth: Mesh: Fix PreviousAddress endianess in Friend Request
The upper transport layer is using big endian ordering. The
PreviousAddress field of a Friend Request message should therefore
be converted to native endianess using sys_cpu_to_be16().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-01-03 10:14:10 +01:00
Andrew Boie
d76ae46c0c lib: os: make snprintk fns generally available
The intention of disabling CONFIG_PRINTK is that all
invocations of it will compile to nothing, saving a lot
of runtime overhead and footprint since all the format
strings are completely dropped; instances of printk()
and related functions are no-ops.

However, some subsystems need snprintk() for string
processing, since the snprintf() implementations in even
minimal C library are too costly in text footprint or
stack usage for some applications. This processing is
required for the application to even function.

This patch continues to have disabling  CONFIG_PRINTK to
cause the non snprintk functions to become no-ops, but
now we always compile the necessary bits for snprintk(),
relying on gc-sections to discard them if unused.

z_vprintk() is now unconditionally defined in the header
since it is not tied to any particular output sink and
is intended for users who know exactly what they are
doing (it's in zephyr private scope).

Relates to: #21564

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-03 10:13:30 +01:00
David B. Kinder
17299f0734 doc: document python build scripts
We have a collection of python scripts that are part of our build
system.  This PR collects docstring comments added to these scripts into
a summary document.  Previous references to just the script name in
other documentation are updated to point to this build tool
documentation.

Some of the scripts needed an update to be processed (via include
directives) consistently.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-02 17:09:29 -05:00
Erwan Gouriou
9055cfe57e doc/guides: shields: Document shield conditional configuration
Update doc with new Kconfig.shield files.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
dfebba471c boards/shields: adafruit_2_8_tft_touch_v2: Move to Kconfig.defconfig
Move adafruit_2_8_tft_touch_v2 to Kconfig.defconfig format.
As part of this change Kconfig flags SPI and DISPLAY are removed
from the shield configuration as they are part of application
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
ffbfd51a9b boards/shields: dfrobot_can_bus_v2_0: Move to Kconfig.shield format
Move dfrobot_can_bus_v2_0 to Kcondig.shield foramt and as part of
this change introduce nrf52_pca10040 board specific configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
0c3ef63c5f boards/shields: fdrm_cr20a: Move to conditional Kconfig
Move shield to Kconfig.shield format.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
a8a9d34fce boards/shields: frdm_kw41z: Move to conditional Kconfig
Add Kconfig.shield to frdm_kw41z.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
0f63dee3c3 boards/shields: link_board_can: Move to conditional Kconfig
Move link_board_can to conditional Kconfig.
As part of this change, some board specific symbols are moved
to reel_board specific file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
35bbcc968c boards/shields: link_board_eth: Move to conditional Kconfig
Move link_board_eth to conditional Kconfig.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
b8c921c972 boards/shields: sparkfun_sara_r4: Move to conditional Kconfig
Move sparkfun_sara_r4 to conditional Kconfig.
As part of this change, remove disco_l475_iot1 specific configuration
as it is already part of board default configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
4faf6546b1 boards/shields: ssd1306: Factorize and move to conditional Kconfig
Factorize definitions for ssd1306_128x32 and sd1306_128x64 shields
and move to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(I2C, SSD1306) are removed as they are application responsibility.
Also disabling SSD16XX is removed as SSD16XX should not be enabled
by default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
980ddb6b98 boards/shields: waveshare_epaper: Move to conditional Kconfig
Move wavehare epaper shields to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(SPI, SSD16XX) are removed as they are application
responsibility. GPIO is removed as well as it should be 'y' by
default on  all boards according to Default board configuration
guidelines.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
f74667bfc7 boards/shields: x_nucleo_iks01ax: move to conditional Kconfig
Add Kconfig.shield file for x_nucleo_iks01ax shields.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
7533a65797 doc/guides: shields: Document possibility to enable several shields
It is actually possible to use several shields in the same project.
Reflect it in the shields documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
1155c526ac boards/shields: Move wnc_m14a2a to conditional Kconfig
Put shield configuration Kconfig flags in new Kconfig.defconfig.
This way shield BLE subsystem can now be selected by application
using NETWORKING symbol, similarly to what is done when modem is
directly present on board.
Additionally, move board Kconfig files to a similar scheme where
shields related Kconfig flags are made available under shield,
board and NETWORKING symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
32e2681fa5 boards/shields: x_nucleo_idb05a1: Move to conditional Kconfig
Put shield configuration Kconfig flags in new Kconfig.defconfig.
This way shield BLE susbystem can now be selected by application
using BT symbol, similarly to what is done when BlueNRG ship is
directly present on board.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
e3bed1f260 boards: Kconfig: Enable use of shield conditional Kconfig files
To make use of shields Kconfig.defconfig, parse these files
and newly created Kconfig.shield files which will define the
SHIELD_XXX Kconfig symbols that will be used for conditional
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
17537c77c8 script/Kconfig: kconfig functions: Add shields_list_contains function
Add shields_list_contains Kconfig function which return bool based on
check of shield presence in cmake SHIELD_AS_LIST.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
6202d9c014 cmake: make shield list available to Kconfig
For application portability, it is required that feature activation
is made conditional in shield configuration. This way features remain
controlled on application side.
To enable this we need that list of user activated shield is made
available to Kconfig.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Henrik Brix Andersen
5640d65775 boards: actinius_icarus: add RGB LED to dts
Add the RGB LED present on the Actinius Icarus board to the device
tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
e9b2fdaeb2 boards: nrf52840_papyr: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52840_papyr board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
ff525c7284 boards: nrf52840_mdk: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52840_mdk board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Henrik Brix Andersen
d45b279e50 boards: nrf52832_mdk: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52832_mdk board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00