Commit graph

41120 commits

Author SHA1 Message Date
Johann Fischer
1609f4af52 samples: ili9340: add adafruit_2_8_tft_touch_v2 to samples test
Add adafruit_2_8_tft_touch_v2 to samples test.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer
65f00159c6 samples: lvgl: remove conflicting nrf52840_pca10056 overlays
Remove nrf52840_pca10056 overlays because of confict
with adafruit_2_8_tft_touch_v2 shield.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Johann Fischer
7a6e7e66db shields: add Adafruit 2.8" TFT Touch Shield v2
Add Adafruit 2.8" TFT Touch Shield v2.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-25 02:35:49 -07:00
Sean Nyekjaer
aa464c6f9e tests/drivers: adc: add config for NXP Freedom K22F board
Add the configuration block for NXP Freedom K22F board for
the adc_api test.

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
2019-09-25 02:18:38 -07:00
Tom Burdick
45c7783b1e boards: arm: Add support for NXP FRDM-K22F board
This adds support for NXP's Freedom K22 board.

Co-authored-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Co-authored-by: Tom Burdick <thomas.burdick@gmail.com>
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2019-09-25 02:18:38 -07:00
Tom Burdick
6a708e625d arch: kinetis: Add support for k2x
This adds support for Kinestis K22

Co-authored-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Co-authored-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
Co-authored-by: Tom Burdick <thomas.burdick@gmail.com>
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2019-09-25 02:18:38 -07:00
Laczen JMS
78170ecd18 cmake: app: set zephyr_extra_modules from environment
This PR adds the possibility to specify ZEPHYR_EXTRA_MODULES from an
environmental variable. To add a custom module mymodule in
path/mymodule the variable ZEPHYR_EXTRA_MODULES can be set in
`.zephyrrc` as `export ZEPHYR_EXTRA_MODULES=path/mymodule`.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-09-25 05:10:44 -04:00
Marc Herbert
fb4b932b72 tests/lib/fdtable/prj.conf: remove hardcoded CONFIG_COVERAGE=y
There is absolutely no other test in the entire codebase that hardcodes
this setting. I found no comment or any other explanation why this test
should be unique. So it really looks like just a glitch introduced when
this test was added by PR #17618 / commit f1afb4c24d.

This was discovered in three different ways:

- COVERAGE=y adds the absolute and non-deterministic source path in
  .rodata sections
- it adds .gnco files in the build directory
- it makes (some) tests run 10 times slower:

qemu_x86_64   lib/fdtable/libraries.os.fdtable PASSED (qemu 2.086s)
qemu_x86_long lib/fdtable/libraries.os.fdtable PASSED (qemu 2.316s)
qemu_xtensa   lib/fdtable/libraries.os.fdtable PASSED (qemu 2.033s)
mps2_an385    lib/fdtable/libraries.os.fdtable PASSED (qemu *31.286s*)
qemu_x86      lib/fdtable/libraries.os.fdtable PASSED (qemu *31.862s*)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-09-25 05:04:30 -04:00
Anas Nashif
f2b04d9ac2 docs: remove deprecated doxygen options
Noticed those with most recent doxygen, we do not use those options, so
it is safe to remove now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif
d803a534c0 docs: kernel: thread documentation enhancements and cleanup
Moving all thread docs into 1 page was a bit too much. Split the section
a bit and remove redundant and useless sections and move some thread
related documentation from the scheduling page to threads (thread states
and priorities).

Add a new figure for thread states.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif
25cd3f9f54 docs: kernel: K_FP_REGS is not x86 only
We have more architectures support float now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Brett Witherspoon
48533751e0 drivers: ieee802154: add CC13xx / CC26xx driver
Add IEEE 802.15.4 suuport for TI CC13xx / CC26xx devices.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-09-25 08:49:55 +03:00
Ioannis Glaropoulos
affddef4cf soc: arm: do not include kernel headers in soc.h
We shall not include core kernel headers in soc.h
header of ARM SoCs. We should try to only include
the vendor headers and auto-generated board header
from DTS. This commit implements this policy for
the SoCs, whose builds have shown to fail due to
header inclusion cycles.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-24 21:53:49 -04:00
Ioannis Glaropoulos
cfa2fb278f drivers: serial: mcux: enforce an error-free header inclusion
We need to change the order of inclusions in
uart_mcux_lpuart.c, to avoid build errors. This
is required since the driver structures contain
a field named DATA, which is also a macro defined
in the linker script.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-24 21:53:49 -04:00
Johann Fischer
9820036070 shields: link_board_eth: fix link to product website
Fix link to product website.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-24 18:41:19 -07:00
Anas Nashif
72f52c9e44 docs: add posix OS abstraction layer section
Add section about the POSIX support in Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Anas Nashif
ae5776051a docs: cleanup cmsis RTOS api docs
Fix formatting of the CMSIS RTOS APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Anas Nashif
65eebd33d9 doc: move cmsis rtos API docs to portability/
Move CMSIS RTOS API docs under portability to distinguish from
architecture and board porting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Andrei Emeltchenko
a4ba22c627 drivers: counters: Fix coding style issues
Replace zephyr_library_sourceS_ifdef with zephyr_library_sources_ifdef
and follow cmake coding style.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-09-24 11:40:53 -07:00
Andrei Emeltchenko
549fbae43b drivers: watchdog: Trivial style cleanup
Cleanup coding style.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-09-24 11:40:53 -07:00
Ulf Magnusson
e833fafd4b drivers: usb: stm32: Fix broken DT_USB_ENABLE_PIN_REMAP test
'enable-pin-remap' is defined as 'type: boolean' in
dts/bindings/usb/st,stm32-usb.yaml, so it generates either

    #define DT_USB_ENABLE_PIN_REMAP 1

or

    #define DT_USB_ENABLE_PIN_REMAP 0

depending on if 'enable-pin-remap;' appears on the node or not.

Since a macro is always generated, #ifdef won't work. The test needs to
be this instead:

    #if DT_USB_ENABLE_PIN_REMAP == 1

(Should be careful with '#if HMZ == 0' though, because it's true even if
HMZ is undefined.)

This behavior was inherited from the old scripts, and some things depend
on it, e.g. by expanding macros in initializers.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-24 09:36:31 -07:00
Ioannis Glaropoulos
4be1f45d1e arch: arm: minor clean-up in irq_init.c and timing_info_bench.c
- Remove redundant inclusions in irq_init.c
- Remove comment about thread_abort function,
  which does not belong in this file (probably
  left-out during code refactoring)
- Include arm cmsis.h only under #ifdef CONFIG_ARM

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-24 16:59:42 +02:00
Andrzej Głąbek
35754375bc soc: nordic: Get rid of nrf_common.h
This file contains redundant definitions of a bunch of nRF IRQ numbers
(not all, however) that only generates confusion, as enumeration values
provided by MDK can be used instead.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-24 16:20:16 +02:00
Andrzej Głąbek
c24c463328 soc: nordic: Include <nrfx.h> instead of <nrf.h> from <soc.h>
This change is done so that there is no need to additionaly include
<nrfx.h> before <soc/nrfx_coredep.h> (what might be a bit surprising)
and so that <nrfx_config.h> doesn't need to be include separately for
nRF SoCs requiring a special mapping of peripheral accessing symbols.

This commit removes also no longer needed inclusions and updates
the hal_nordic module with required minor correction of nrfx_glue.h.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-24 16:20:16 +02:00
Andrzej Głąbek
57c6cfc9cd nordic: Use hal/ in all inclusions of nrfx HAL header files
Header files of nrfx HALs are not supposed to be included directly
but only with their names prepended with the hal/ directory (so that
an inclusion of an nrfx HAL header clearly differs from an inclusion
of an nrfx driver header).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-24 16:20:16 +02:00
Mieszko Mierunski
cacb529206 drivers: nrf: Add 2 stop bits option to nrf UARTE and UART driver
nrf52840 and nrf9160 have possible configuration of two stop bits
for UART and  UARTE, this commit adds handling of it to driver.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-09-24 15:23:33 +02:00
Radoslaw Koppel
c68ff8b99c settings: Generic function to call set handler
This commit implements generic function to decide
witch functions to call for selected value name with given
loading parameters.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-09-24 14:15:38 +02:00
Radoslaw Koppel
6c2add5445 settings: Direct loading functionality
This commit allows loading data from settings permanent storage
directly to the given callback function.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-09-24 14:15:38 +02:00
Vinayak Kariappa Chettimada
f965b9c685 Bluetooth: controller: Fix DLE event on PHY update
Fix HCI Data Length Update event generation on PHY update
procedure, i.e. preserve Data Length Parameters on PHY
update.

Fixes BT LL.TS.5.1.1 tests:
LL/CON/MAS/BV-126-C
LL/CON/MAS/BV-127-C
LL/CON/SLA/BV-129-C
LL/CON/SLA/BV-130-C

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-24 10:37:44 +02:00
Vinayak Kariappa Chettimada
5ef52da005 Bluetooth: controller: Fix mayfly optimization
Fix incorrect reset of mayfly pended flag. This fix reduces
CPU use by mayfly.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-24 10:37:23 +02:00
Ioannis Glaropoulos
3bf872110d bluetooth: controller: nRF52811: fix LE Coded S2 Radio Timings
The nRF52811 Radio is similar to nRF52840 and exhibits
similar Radio Timings constants. We align the LE Coded
PHY (S2) RX chain delay with that of nRF52840, which,
eventually fixes the TIFS for nRF52811. In nRF52840 we
correct the inline comment only.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-24 09:02:15 +02:00
Krzysztof Chruscinski
19b535f8e6 tests: drivers: counter: Minor comment improvement in test
Improved message on failed assertion.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-09-24 09:01:22 +02:00
Krzysztof Chruscinski
3036c3627d drivers: counter: nrf_rtc: Fix top value handling
Top value interrupt was not enabled because channel index was
used instead of mask. Additionally, interrupt was enabled only
when user callback was provided and not in case there was
custom top value and no top callback.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-09-24 09:01:22 +02:00
Vinayak Kariappa Chettimada
3202f91748 Bluetooth: controller: Fix to reject invalid enable command
Fix to reject invalid advertise and scan enable commands.

Fixes BT HCI.TS.5.1.1 tests:
HCI/DDI/BI-06-C
HCI/DDI/BI-07-C

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-24 08:15:56 +02:00
Vinayak Kariappa Chettimada
0ef062407c Bluetooth: controller: split: Fix to reject invalid enable command
Fix to reject invalid advertise and scan enable commands.

Fixes BT HCI.TS.5.1.1 tests:
HCI/DDI/BI-06-C
HCI/DDI/BI-07-C

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-24 08:15:32 +02:00
Krzysztof Chruscinski
cc5094b3bf logging: Add option to block in thread context
Added CONIFG_LOG_BLOCK_IN_THREAD option to block until buffer for
log message is available. When log message is called in the thread
and there is no buffer available in the pool, thread will block with
configurable timeout (CONFIG_LOG_BLOCK_IN_THREAD_TIMEOUT_MS). If
buffer cannot be allocated by that time, message will be dropped.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-09-23 22:04:42 -07:00
Ioannis Glaropoulos
95c2968d32 soc: arm: nxp: cleanup in soc.h headers
A commit that organizes the soc.h header of NXP SoCs:
- removing redundant inclusions of sys/util.h
- removing inclusions of device.h and kernel_includes.h
- including the auto-generated DTS board header
- including the fsl_common.h header
- fixing minor style issues

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-23 18:02:00 -07:00
Ioannis Glaropoulos
48fa076a56 arch: arm: userspace: minor refactor in z_arch_is_user_context
Refactor z_arch_is_user_context() for ARM, so it uses
the CMSIS CONTROL_nPRIV_Msk instead of hard-coded 0x1.
Fixing also some typos in include/arch/arm/syscall.h.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-23 18:02:00 -07:00
Charles E. Youse
66a2ed2360 arch/x86: (Intel64) move RAX to volatile register set
This used to be part of the "restore always" set of registers because
__swap was expected to return a value.  No longer required, so RAX is
moved to the volatile registers and we save a few cycles occasionally.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
074ce889fb arch/x86: (Intel64) migrate from __swap to z_arch_switch()
The latter primitive is required for SMP.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
32fc239aa2 arch/x86: (Intel64) use TSS for per-CPU variables
A space is allocated in the TSS for per-CPU variables. At present,
this is only a 'struct _cpu *' to find the _kernel CPU struct. The
locore routines are rewritten to find _current and _nested via this
pointer rather than referencing the _kernel global directly.

This is obviously in preparation for SMP support.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
1d8c80bc05 arch/x86: (Intel64) move STACK_SENTINEL check
This function call was erroneously inserted between the instruction
that set the Z flag and the instruction that tested the Z flag. The
call is moved up a few instructions where it can't junk CPU state.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
e2a0eb0d1c boards/qemu_x86: remove stale flash reference from qemu_x86_long
The QEMU x86 .dts files were re-arranged before long mode was
merged. We don't need this reference to the flash region anymore.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
e4d5ab363c arch/x86: (Intel64) define TSS in C, not assembly
Declare the 64-bit TSS as a struct, and define the instance in C.
Add a data segment selector that overlaps the TSS and keep that
loaded in GS so we can access the TSS via a segment-override prefix.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
a1afde043c arch/x86: share declaration of _interrupt_stack
This is moved from arch/x86/include/ia32/kernel_arch_func.h to the
common header arch/x86/include/kernel_arch_func.h so it can be shared.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
a8de9577c9 arch/x86: restructure ISR stacks (conceptually)
This is largely a conceptual change rather than an actual change.
Instead of using an array of interrupt stacks (one for each IRQ
nesting level), we use one interrupt stack and subdivide it. The
effect is the same, but this is more in line with the Zephyr model
of one ISR stack per CPU (as reflected in init.c).

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
e6a874d515 subsys/logging: change default stack size on x86 in long mode
The default stack size of 768 is just too small.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Charles E. Youse
bd094ddac2 arch/x86: inline x2APIC EOI in 64-bit code
Like its 32-bit sibling, the 64-bit code should EOI inline rather than
invoking a function. Defeats the performance advantages of x2APIC.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-23 17:50:09 -07:00
Peter Bigot
d2ad8fca48 tests: exclude platforms with limited flash
Platforms with limited flash are now failing to link.  Add or increase
flash requirements for test cases to exclude the ones that will fail.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-23 17:49:46 -07:00
Andrew Boie
4ce988ab43 doc: provide error handling documentation
We don't really have docs on how fatal errors are induced
or handled. Provide some documentation that covers:

- Assertions (runtime and build)
- Kernel panic and oops conditions
- Stack overflows
- Other exceptions
- Exception handling policy

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-23 23:45:08 +02:00