Commit graph

41120 commits

Author SHA1 Message Date
Carles Cufi
9b13d51589 doc: Consolidate Python and pip documentation
The documentation that describes how Python and pip interact with the OS
when installing packages used to be under a common section, and was
moved to the west bootstrap one later on. Since this information is
required early on (for example on Linux when installing CMake via pip3),
move the info to its own section and link to it from others.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
6c73652358 doc: getting_started: Remove Linux distro versions
Remove the version numbers from the distribution listings, since those
get outdated quickly and on top of that they are causing confusion due
to those being now too old to contain recent versions of CMake and DTC.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
ad5791cf89 doc: getting_started: Document DTC version installation
Document that the SDK contains a bundled dtc binary and how to use it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
51fdef5603 doc: getting_started: Add CMake snap installation option
Document how snap can be used on Ubuntu to install a recent CMake
version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Peter A. Bigot
137ea74052 sys/sem.h: fix path to atomic.h
Use of old location produces a compiler warning.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-26 06:37:59 +03:00
Andrew Boie
81ef42d2bc sanitycheck: simplify fault detection
Any fatal error will print "ZEPHYR FATAL ERROR" now, so
we don't have to maintain a set of strings in the
sanitycheck harness.py

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
96571a8c40 kernel: rename NANO_ESF
This is now called z_arch_esf_t, conforming to our naming
convention.

This needs to remain a typedef due to how our offset generation
header mechanism works.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
c9a4bd47a7 arm: dump registers on fatal exceptions
We had a function that did this, but it was dead code.
Move to fatal.c and call from z_arm_fatal_error().

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
fe8d75acbf arm: fix exception reason code for bad syscall
ARM was reporting as a CPU exception and not a kernel
oops.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
297ca06934 arc: use z_fatal_error() for spurious IRQs
We shouldn't special-case this to just spin forever.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
8a9e8e0cd7 kernel: support log system for fatal errors
We introduce a new z_fatal_print() API and replace all
occurrences of exception handling code to use it.
This routes messages to the logging subsystem if enabled.
Otherwise, messages are sent to printk().

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
5623637a48 kernel: abolish _default_esf
NANO_ESF parameters may now be NULL, indicating that no
exception frame is available.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
71ce8ceb18 kernel: consolidate error handling code
* z_NanoFatalErrorHandler() is now moved to common kernel code
  and renamed z_fatal_error(). Arches dump arch-specific info
  before calling.
* z_SysFatalErrorHandler() is now moved to common kernel code
  and renamed k_sys_fatal_error_handler(). It is now much simpler;
  the default policy is simply to lock interrupts and halt the system.
  If an implementation of this function returns, then the currently
  running thread is aborted.
* New arch-specific APIs introduced:
  - z_arch_system_halt() simply powers off or halts the system.
* We now have a standard set of fatal exception reason codes,
  namespaced under K_ERR_*
* CONFIG_SIMPLE_FATAL_ERROR_HANDLER deleted
* LOG_PANIC() calls moved to k_sys_fatal_error_handler()

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Andrew Boie
81245a0193 arm: don't use exc reason codes for internal state
We are standardizing to a arch-independent set of exception
reason codes, don't overload it with internal state of
the ARM fault handling code.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Nicolas Pitre
11d4f01870 Z_ISR_DECLARE: ensure proper alignment on 64-bit targets
Prevent spurious unexpected alignment on 64-bit targets.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-25 14:01:24 -07:00
Paul Sokolovsky
6b90a02bb4 libc: minimal: time.h: Don't (re)define struct timespec.
By the latest convention, libc's define struct timespec in
sys/_timespec.h. This is consistent with Newlib and ensures
about errors due to redefinitions.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Paul Sokolovsky
b7bb48eeac posix: unistd.h: open() doesn't belong here
Per POSIX, open() is defined in <fcntl.h>. fcntl.h in turn comes from
the underlying libc, either newlib, or minimal libc.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Paul Sokolovsky
1347bf9b48 posix: mqueue.h: Move O_CREAT and friends to fcntl.h
That's the header which is supposed to define them, there was even
FIXME on that in mqueue.h.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Paul Sokolovsky
15a9709186 posix: time.h: Add workaround for outdated newlib used by Xtensa
Unfortunately, Zephyr SDK 0.10.0 ships with outdated Newlib 2.0.0
(from 2015 or earlier) which lacks sys/_timespec.h header, requiring
ugly workaround of defining struct timespec inline (the whole idea
was to standardize on sys/_timespec.h header for different libc's).

This is similar to earlier workaround for struct timeval definition
introduced in a6aee9b4c8. Zephyr SDK ticket for this issue
is https://github.com/zephyrproject-rtos/sdk-ng/issues/64, and it
will ve possible to remove both workarounds when Xtensa toolchain
will be upgraded to newlib version consistent with other
architectures.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Paul Sokolovsky
3a4553913e posix: struct timespec: Move definition to sys/_timespec.h
POSIX subsys defines struct timespec in <time.h> (as POSIX public
API requires), but newlib defines in in sys/_timespec.h, which
inevitably leads to inclusion order and redifinition conflicts.
Follow newlib way and define it in single place, sys/_timespec.h,
which belongs to libc namespace. Thus, we move current definition
to minimal libc, and will use either minlibc's or newlib's
definition, instead of trying to redefine it.

This is similar to the introduction of sys/_timeval.h done earlier.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Paul Sokolovsky
3693f85805 posix: Move sys/stat.h to minimal libc
Newlib libc already provides sys/stat.h, so trying to have sys/stat.h
on the level of POSIX subsys inevitable leads to include order and
definition conflicts. Instead (as most of other sys/* includes)
should come from the underlying libc.

While moving, made unrelated change of removing #include <kernel.h>,
to accommodate the change reviewers.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-07-25 13:50:58 -04:00
Jose Alberto Meza
491702a6c6 boards : arm : Add ESPI support for MEC15xx EVB
Expose eSPI block with interrupts enabled for channel 0 & 1
eSPI handshake has been tested using espi driver sample app

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
11d0725489 samples: drivers: espi: Add eSPI driver sample app
Show eSPI API driver usage, including early configuration,
send of virtual wire packets and callback mechanism

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
64c334f0b3 drivers: espi: Add driver for microchip XEC family
Add eSPI Microchip XEC driver
Include support for peripheral & virtual wires (channel 0-1)
OOB and flash support can be added in the future

Fix compilation error in pinmux driver

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
fce306466d ext: hal: mchp: Fix compilation for MEC1501 HAL macros
Correct HAL macros related to eSPI block
Add GIRQ bit definitions for VWires and some peripherals

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
1810d10386 dts: espi: mchp: Add dts bindings for XEC eSPI driver
Add device for eSPI driver for MEC family

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
24df22887a dts: espi: Add dts bindings for eSPI
Add generic device tree bindings for eSPI devices

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
a7e44ebf44 drivers: espi: Add Kconfig for eSPI driver
Adds the Kconfig for generic eSPI drivers

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
e3f32948f2 API: espi: Add API for Enhanced Serial Peripheral Interface
This API defines following call for eSPI bus drivers

    - espi_set_config
    - espi_get_channel_status
    - espi_send_read_request
    - espi_send_write_request
    - espi_send_vwire
    - espi_receive_vwire
    - espi_send_oob
    - espi_receive_oob
    - espi_flash_read
    - espi_flash_write
    - espi_flash_erase

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Kumar Gala
3837a545f2 dts/bindings: Cleanup microchip,xec-rtos-timer binding
* Remove version field
* Utilize base.yaml to reduce duplication
* Remove document separators

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-25 10:57:55 -04:00
Yannis Damigos
a4d9c3b4ff olimexino_stm32: Enable I2C1
Enable I2C1 on olimexino_stm32

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-07-25 10:52:59 -04:00
Erwan Gouriou
55684e03ac dts/arm/st: Remove nodes i2s4, i2s5 and i2s6
stm32f429.dtsi wrongly introduced i2s nodes 4, 5 and 6.
Remove them as actually only i2s nodes 2 and 3 are supported on
these socs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-07-25 10:52:26 -04:00
Erwan Gouriou
749c22401b boards: stm32h747i_disco: Fix picture size
Set board picture to a reasonable size.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-07-25 10:51:49 -04:00
Kwon Tae-young
6a01db3be0 drivers: i2c_ll_stm32_v1: add timeout
Sometimes i2c operation does not return in a while loop.
Fix this by adding timeout to the i2c driver.

Fixes: #12261

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-07-25 10:50:50 -04:00
Rick Conrey
b87ba9c95f tests: spi: enable SPI on STM32WB
configure SPI loopback test to work with nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey
9bf2e3fdcb boards: nucleo_wb55rg: enable SPI1 on nucleo_wb55rg
enable SPI1 on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey
3f58038c03 drivers: pinmux: enable SPI pins on stm32wb
enable spi pins on stm32wb

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey
9d371d835d soc: stm32wb: Enable SPI on stm32wb
enable spi on stm32wb

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey
bcd5f321e0 dts: wb: Enable spi on stm32wb
enable spi on stm32wb

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey
32a3ae8ab9 drivers: spi: Enable SPI on stm32wb
Enable FIFO for stm32wb

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Kumar Gala
352687df05 nxp_imx: Fix dts build error
The SoC clock init code for USB was using a deprecated DTS define.
Switch to using the non-deprecated form.

Fixes: #17772

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-25 16:10:11 +02:00
Andrzej Głąbek
ad69bb9d96 ext: nordic: Align nrfx_config_* files with templates from nrfx v1.7.2
These files should be kept aligned with their templates, so that it is
easy to tell what adjustments are needed to integrate nrfx into Zephyr.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-07-25 16:08:43 +02:00
Andrzej Głąbek
396bbae5f1 ext: hal: nordic: Update nrfx to version 1.7.2
Update nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.7.2/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.7.2
commit: 13a7de7de72cfd444af468f11c0dbb9db7a26172
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-07-25 16:08:43 +02:00
Kumar Gala
9c8c33128b mec1701: fix dts build error
This file wasn't migrated to the new DTS define for the
IRQ priority.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-25 08:32:33 -04:00
Tomasz Bursztyka
c7d7b8cd19 doc/networking: Update network management part relevantly
There had been some changes applied on the API after that documentation
was made. Reflect the API behavior change and correct a minor issue.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-25 15:21:49 +03:00
Alexander Wachter
62ded2ded4 tests: net: 6Lo: Add test criterion HDR diff
This commit adds a test criterion that checks how many bytes
are compressed.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-25 15:19:28 +03:00
Alexander Wachter
0f8c2acece tests: net: 6lo: Adapt tests to deal with headers in multiple frames
The testcases are adapted to handle more than one net buffer in
a net_pkt. After the IPHC optimization it is possible that IP header
is not in the same buffer than the UDP header.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-25 15:19:28 +03:00
Alexander Wachter
144dc592a6 net: ip: 6lo: Remove unnecessary net_buf allocation and memmove
This patch tries to avoid memmoves and buffer allocations when there
is enough space in the original buffer. Headers are still contiguous
but not in the same buffer.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-25 15:19:28 +03:00
Alexander Wachter
f10da7b643 net: ip: 6lo (IPHC) uncompression rework
This is a rework of the 6lo IPHC uncompression.
The uncompression now tries to work in place on the original buffer
instead of allocation a new one. If there is not enough tail-room,
a new buffer is allocated and filled with the IP and maybe UDP header.
The compressed header is pulled from the original buffer and the
buffer is preserved.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-25 15:19:28 +03:00
Alexander Wachter
0261ecdee4 net: ip: net_pkt: Add pkt_cursor_advance before contiguous check
When net_pkt_skip skips the entire data in a net buffer, the cursor
still points to this buffer on data that is off by one.
Calling pkt_cursor_advance in net_pkt_is_contiguous fixes this and
moves the cursor to the next buffer.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-25 15:19:28 +03:00