Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
75547e2b40 sanitycheck: add option to list all available tags
To avoid duplication when adding a new testcase.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 13:29:37 -04:00
Anas Nashif
5df8cff046 sanitycheck: simplify logic of build_only/enable_slow checking
Make checking for flags readable and fix logic for enable_slow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 13:29:37 -04:00
Anas Nashif
ab351f407a sanitycheck: do not create overlays for filtered platforms
Only create those for tests/boards we are actually going to run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 13:29:37 -04:00
Anas Nashif
20f553fe8d sanitycheck: do not call cmake twice on run
In many cases we are calling cmake twice with the same options, first to
build, and then we do the same thing when we want to call 'make run'.
Just call cmake once.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 13:29:37 -04:00
Anas Nashif
424a3db775 sanitycheck: do not always dump footprint statistics
When running large set of tests we always get a huge list of footprint
changes that mask the test results making them impossible to see on the
screen. Show the footprint results only on-demand and not on every
build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 13:29:37 -04:00
Marti Bolivar
e32ed18076 jlink: fix flashing behavior on Windows
The object returned by NamedTemporaryFile cannot be opened a second
time while the file is still open on Windows. This is exactly what the
JLink commander needs to do with the resulting file, however, breaking
jlink flash on that platform.

Fix this by using a temporary directory instead, and creating a file
inside it. The resulting directory still gets cleaned up, but the
resulting file can be read by the commander.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-04-09 11:58:36 -05:00
Jukka Rissanen
bdda369580 tests: net: vlan: Fix VLAN disable test
Because we now return first non VLAN interface if found, the
VLAN disable test case needs adjustment.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-09 17:17:00 +03:00
Jukka Rissanen
e56a9f0ec4 net: ethernet: Return correct non VLAN interface
If we have several network interfaces and not all of them are
VLAN enabled, then we might return wrong network interface to
the ethernet device driver when it asks one. To fix this, return
the first interface that has not enabled VLAN if the tag of the
network packet is unspecified.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-09 17:17:00 +03:00
Punit Vara
4fc2ccbdab test: mbox_usage: add legacy test case for mailbox
Add different scenario for mailbox testing

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-04-09 09:11:44 -04:00
Vinayak Kariappa Chettimada
6c6d98bc4e Bluetooth: controller: Use hal/ticker.h to abstract SoC specifics
Introduce hal/ticker.h to abstract out SoC specific
implementations and move any conditional compilations to
include header files here.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-04-09 10:34:04 +02:00
Johan Hedberg
d6a549ceba Bluetooth: Mesh: Fix Node Identity advertising with PB-ADV
The Node Identity advertising should only be automatically enabled
when provisioning happened over PB-GATT, but not when it happened over
PB-ADV. Move the enabling of Node Identity to the provisioning code,
where we know the bearer that was used (this information does not get
passed to the bt_mesh_provision function).

Fixes #6338

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-04-09 11:13:10 +03:00
Ioannis Glaropoulos
316ffff6f2 tests: kernel: fix irq_vector_table test for nRF52X platforms
This commit disables Bluetooth and adds a customized vector
table for nRF52X-based platforms in the irq_vector_table kernel
test, in order to prevent UsageFault during system timer
interrupts, and, therefore, let the test execute properly.

This commit fixes #6890.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-04-08 08:47:36 -04:00
Ioannis Glaropoulos
8d2b22cd05 drivers: timer: expose RTC1 ISR handler function
This commit exposes the RTC1 ISR handling function, so the
function can be directly used in tests which generate
customized vector tables manually and require a visible symbol
for the ISR function.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-04-08 08:47:36 -04:00
Ioannis Glaropoulos
9e4bbcc937 tests: kernel: add Cortex-M33/M7 in list of MCUs
Add Cortex-M33 and Cortex-M7 in the list of supported
ARM MCUs for the arm_irq_vector_table test.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-04-08 08:47:36 -04:00
dbb2264454 usb: hid: implement set_report()
set_report() is used by the host to set a feature on the device such
as turning a LED on or off.

This is also used by protocols such as FIDO U2F to transfer data to
the device.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-04-06 23:06:07 -04:00
0d04aef6fe usb: hid: add a INT IN transfer complete callback.
int_in_ready is an optional callback that is called when the current
interrupt IN transfer has completed.  This can be used to wait for the
endpoint to go idle or to trigger the next transfer.

This is needed for protocols like FIDO U2F that use the interrupt
endpoint for transfers.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-04-06 23:06:07 -04:00
Erwan Gouriou
9708372080 doc: provide board porting guidelines
Provide board porting guidelines to help achieving a coherent
board library to ease work for people developing application
not board specific and define clear objective to help board
porting reviews.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-06 22:23:45 -04:00
Andrzej Puzdrowski
00f6fc9643 ext: lib: tinycbor: fix half-FP feature compilation
half-FP feature requires <math.h> form newlib_libc. It was include
wrongly by default. This path fix conduction for related include
directive.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-04-06 17:01:49 -04:00
Andrzej Puzdrowski
ca1cb05438 ext: lib: tinycbor: fix Zephyr specific settings
This path make logic for enabling float and half-float
support positive driven and fix NEWLIB_LIBC selections for
these features.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-04-06 17:01:49 -04:00
Ulf Magnusson
8fc44f2988 kconfiglib: Update to e8408a06c68d8
Update Kconfiglib to upstream revision e8408a06c68d8 (+ local Zephyr
modifications) to get commit e8408a06c68d8 ("Move sanity checking to
after _finalize_tree()") in. It fixes some obscure false-positive
warnings for named choices that came up in
https://github.com/zephyrproject-rtos/zephyr/issues/6948.

Origin: https://github.com/zephyrproject-rtos/Kconfiglib/tree/zephyr

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-06 20:53:41 +02:00
Leandro Pereira
bf44bacd24 kernel: mutex: Copy assertions to assertions to syscall handler
Always ensure that the mutex owner is the current thread and that the
count is sane.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-06 11:52:32 -07:00
Carles Cufi
361ef34043 doc: subsys: Remove unnecessary subsystem from titles
In order to be consistent with the rest of the subsystems, remove
"subsystem" from the title.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-06 07:30:33 -04:00
Loic Poulain
7c5c222ca0 samples: net: Add test cases for USB EEM
Add test for zperf and http_server apps.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-04-06 06:50:34 -04:00
Loic Poulain
d80ae8aeeb usb: netusb: Add CDC EEM network usb function
Add CDC Ethernet Emulation Model function driver. This usb network
function can be used for ethernet over USB. Ethernet packet are
encapsulated within EEM packets. An EEM pkt contains 2-byte header
and 4-byte sentinel (or crc).

Note that EEM packets can be split across USB packets but shall not
be split across USB transfers.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-04-06 06:50:34 -04:00
Loic Poulain
992e32842b usb: netusb: Rework netusb media connect/disconnect
Consider media connected when interface is selected by the host and
disconnected on device diconnection.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-04-06 06:50:34 -04:00
Andrzej Puzdrowski
f1275a78f2 doc: subsystem: settings subsystem doc
This patch introduce doc for settings subsystem
with FCB and File System beck-ends.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-04-06 12:46:39 +02:00
Jukka Rissanen
444dfa742f net: l2: Remove l2_data section start and end pointers
As the l2_data section might contain different size context elements
like "struct ethernet_context" for Ethernet and "void *" for
Dummy L2, remove the __net_l2_start and __net_l2_end variables so
that user does not accidentally try to use them as that would not work.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-06 06:33:46 -04:00
David B. Kinder
9abc31e315 doc: clean up QEMU networking doc
Noticed a typo in the first sentence, then some missing articles further
down, and some other clarity and grammar edits came along.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:18:06 -04:00
David B. Kinder
e48b64d1be doc: fix doc misspellings in doc, boards, samples
Occasional spelling-check scan found some misspellings.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:17:01 -04:00
David B. Kinder
3314c3675f doc: misspellings in public API doxygen comments
occasional spelling-check pass found some misspellings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:16:24 -04:00
Loic Poulain
4b78225393 doc: usb: Update API doc
Add missing DC driver functions:
- usb_dc_ep_read_wait
- usb_dc_ep_read_continue
- usb_dc_ep_mps

Add missing DC status code:
- USB_DC_INTERFACE

Document new transfer API.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-04-05 16:43:43 -04:00
Ramakrishna Pallala
fe46c75d25 lib: posix: Fix integer overflow in timer_gettime
Fix 'Unintentional integer overflow' coverity issue
in timer_gettime().

Coverity-CID: 183038

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Ramakrishna Pallala
4226c6d8b2 lib: posix: Fix mutex locking in pthread_cancel
Fix mutex locking sequence in pthread_cancel()

Coverity-CID: 183055

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Ramakrishna Pallala
46931c9a44 tests: posix: Resolve header file dependencies
Fixed header file dependencies by reordering the
inclusion sequence in posix tests.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Ramakrishna Pallala
f603e603bb lib: posix: Move posix layer from 'kernel' to 'lib'
Move posix layer from 'kernel' to 'lib' folder as it is not
a core kernel feature.

Fixed posix header file dependencies as part of the move and
also removed NEWLIBC related macros from posix headers.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Carles Cufi
cd05a630c8 doc: getting_started: Modernize macOS instructions
Modernize macOS instructions to fit the latest packages offered by
Homebrew and macOS High Sierra.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 12:48:33 -04:00
Ilya Tagunov
77bbc42eaf arch: arm: soc: stm32l0: fix port H EXTI
Ports F and G are not present on some STM32L0 parts, so
for these parts port H external interrupt should be enabled
by writing value 0x5 instead of 0x7 to SYSCFG_EXTICRn registers
(see e.g. RM0367, 10.2.4).

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2018-04-05 10:31:43 -05:00
Carles Cufi
bd583ed92d samples: mgmt: Expand smp_svr sample documentation
Expand the contents of the smp_svr sample documentation so that it
covers all steps needed to perform DFU over BLE.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Carles Cufi
8a8d981822 doc: subsys: Add dfu and mgmt subsytem doc
Add documentation for two closely-related subystems: dfu and mgmt, which
are currently undocumented.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Carles Cufi
81d211f3c8 samples: hci_uart: Add references to sections
Add a couple of references so that we can link to those from other
documentation sections.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Carles Cufi
6fd8a0b3ca doc: dts: Add reference to mcuboot flash partitions
Add a reference to the MCUboot flash partition doc so we can link to it
from other documentation pages.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Jukka Rissanen
ffd0a1f5d0 net: core: Check interface when receiving a packet
Although very unlikely, make sure that if the net_recv_data() is
called with NULL network interface or packet, we recover that and
return error to the caller.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-05 10:46:55 -04:00
Yannis Damigos
9287a9bf68 boards/arm/olimexino_stm32: Don't enable I2C and SPI
The test "net/utils" fails to build on olimexino_stm32
due to "region `SRAM' overflowed by 192 bytes".

Disabling I2C and SPI on board level the test build fine.

Moreover, according to issue #6858, we will only configure
board valuable HW and connectors on board level and the
user should enable what is needed on application level.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-04-05 09:38:02 -05:00
Jukka Rissanen
b70b4bcad6 net: shell: Add network interface up/down command
User is able to take a network interface down or bring it up.
The command syntax is "net iface [up|down] [index]"

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-05 17:21:31 +03:00
Andrew Boie
95f1432275 sys_mem_pool: add test case
This is loosely based on the existing mheap_api_concept test
case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-04-05 07:03:05 -07:00
Andrew Boie
aa6de29c4b lib: user mode compatible mempools
We would like to offer the capability to have memory pool heap data
structures that are usable from user mode threads. The current
k_mem_pool implementation uses IRQ locking and system-wide membership
lists that make it incompatible with user mode constraints.

However, much of the existing memory pool code can be abstracted to some
common functions that are used by both k_mem_pool and the new
sys_mem_pool implementations.

The sys_mem_pool implementation has the following differences:

* The alloc/free APIs work directly with pointers, no internal memory
block structures are exposed to the end user. A pointer to the source
pool is provided for allocation, but freeing memory just requires the
pointer and nothing else.

* k_mem_pool uses IRQ locks and required very fine-grained locking in
order to not affect system latency. sys_mem_pools just use a semaphore
to protect the pool data structures at the API level, since there aren't
implications for system responsiveness with this kind of concurrency
control.

* sys_mem_pools do not support the notion of timeouts for requesting
memory.

* sys_mem_pools are specified at compile time with macros, just like
kernel memory pools. Alternative forms of specification at runtime
will be a later enhancement.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-04-05 07:03:05 -07:00
Andrew Boie
e3076a4717 tests: add tag for memory pool tests
There are four of them, make it simpler to run just these tests in
sanitycheck.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-04-05 07:03:05 -07:00
Jukka Rissanen
687c3339b7 net: if: Use DEVICE_NAME_GET() instead of fixed string
The DEVICE_NAME_GET() macro should be used instead of fixed
string when creating a device pointer in net_if_dev structure.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-04-05 09:39:20 -04:00
Tomasz Jurtsch
938a969926 boards: SiFive HiFive1 board
Added support for the HiFive1 board from SiFive

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
Signed-off-by: Tomasz Jurtsch <tjurtsch@antmicro.com>
2018-04-05 08:08:08 -05:00
Tomasz Jurtsch
6dae38cb98 arch: riscv32: fe310: Always-On domain adress definition
Added always-on domain address definition

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
Signed-off-by: Tomasz Jurtsch <tjurtsch@antmicro.com>
2018-04-05 08:08:08 -05:00