Commit graph

41264 commits

Author SHA1 Message Date
Vijay Kumar B
9452a1f045 samples: net: Modify echo server / client for Stellaris Ethernet.
Add project configuration files for echo_server & echo_client.

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Vijay Kumar B
392be3a8b3 drivers: ethernet: Add DTS support for Stellaris Ethernet controller.
* Add DTS support for Stellaris ethernet controller.
  * Add base DTS binding definition for Ethernet.
  * Add DTS binding definition for Stellaris ethernet controller.

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Vijay Kumar B
cffb2d8051 drivers: ethernet: Add TI Stellaris ethernet controller driver.
The driver can be tested using different networking emulation
approaches.

This approach will work across multiple Qemu instances. There can be
more than one Qemu instance, run using the following command. They
would appear to be on the same Ethernet network.

  $ qemu-system-arm -M lm3s6965evb                      \
                    -serial stdio                       \
                    -net nic                            \
                    -net socket,mcast=230.0.0.1:1234    \
                    -kernel zephyr.elf

This approach will work with other virtualization technologies that
support connecting to a VDE switch, like VirtualBox and User Mode
Linux. The switch can be started using the following command.

  $ vde_switch --sock /tmp/switch

Qemu can be connected to the switch using the following command.

  $ qemu-system-arm -M lm3s6965evb                      \
                    -serial stdio                       \
                    -net nic                            \
                    -net vde,sock=/tmp/switch   	\
                    -kernel zephyr.elf

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Vijay Kumar B
5ff42e038d net: ethernet: Add helper functions to update error stats.
Add missed out helper functions to update the errors.tx and error.rx
in the stats structure.

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Erwan Gouriou
3c009a7f2f drivers/pwm: stm32: Use device tree for clocks and base address config
Use device tree generated #define's to configure STM PWM devices

Fixes #10449

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-04 09:07:28 -06:00
Jan Tore Guggedal
f291a520c2 dts: bindings: Add binding for ADXL372 using SPI
This patch adds dts/bindings/adi,adxl372-spi.yaml for
using ADXL372 on SPI bus instead of I2C which is used
in dts/bindings/adi,adxl372.yaml.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2018-12-04 08:58:35 -06:00
Anas Nashif
b8424b4cae crc: deprecate old headers and issue warning when used
Change code to use crc.h instead crc{8,16,32}.h and issue warning when
old headers are used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-04 08:52:46 -06:00
Anas Nashif
521ccca2ae crc: move all crc APIs into one header
Move all CRC APIs into one single header.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-04 08:52:46 -06:00
Krzysztof Chruscinski
d8e3ea6bc2 drivers: clock_control: Enable LFSTARTED event for nrf5
The LFSTARTED event was disabled so it was impossible to wake the
CPU up on LF clock being ready. The Bluetooth stack was putting
the CPU to sleep, expecting to be woken up on LFSTARTED event.
As the event never triggered, the CPU was woken up seconds later
by a different event introducing a multi-second startup delay.

Bug introduced by 23c92100ac.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-04 16:43:49 +02:00
Krzysztof Chruscinski
0c24e62f2c logging: Fix log_core initialization
Timestamp function and pool for log_strdup were initialized
in log thread initialization while they should be initialized
in log_core_init() which is performed earliest possible. Log
API was using uninitialized data when called before log thread
was started.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-04 15:05:18 +01:00
Nathaniel Graff
6243a578ab drivers/plic: Update PLIC driver with DTS symbols
Use the DTS-generated symbols for accessing MMIO registers in the PLIC.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2018-12-04 07:48:27 -06:00
Nathaniel Graff
078f6098e2 soc/sifive-freedom: Use DTS to generate PLIC addrs
Describe the MMIO register regions for the PLIC in the DTS instead of
hardcoded in soc.h

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2018-12-04 07:48:27 -06:00
Nathaniel Graff
8907c09fee soc/miv: Use DTS to generate PLIC addresses
Describe the MMIO register regions for the PLIC in the DTS instead of
hardcoded in soc.h.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2018-12-04 07:48:27 -06:00
Nathaniel Graff
c48c94c9e6 dts/plic: Remove base_label from PLIC binding
Generate the fully-qualified DTS output. We'll fixup the defines on a
per-soc basis.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2018-12-04 07:48:27 -06:00
Markus Roppelt
804f164432 dts: arm: st: Add STM32L433 dtsi file
The STM32L433 has the same layout than the STM32L432, additionally it
has GPIOD, GPIOE, I2C2, USART3 and SPI2.

Also move USART3 and SPI2 out of stm32l4.dtsi since STM32L432 does not
have it.

Fixes #10909.

Signed-off-by: Markus Roppelt <markus.roppelt@gmx.de>
2018-12-04 07:45:18 -06:00
Håkon Øye Amundsen
611b0d1e80 cmake: Move helper function up, inline variable.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
a449439504 cmake: Move check for TOTP property up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
2a3f43458b cmake: Move check for '-nostdinc' up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
d6551b5dea cmake: Move MPU userspace declaration up.
This is done to make future modifications simpler,
as more variables and functions are available.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 08:33:04 -05:00
Håkon Øye Amundsen
d85efe0b10 arch: arm: Add symbol for flash used
Add symbol which contains the number of bytes contained
in the image.

Using '_image_rom_end' will not work, as there are
symbols loaded after its value.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 14:07:59 +01:00
Andrei Laperie
35a95a9b2f net: gptp: Replace calls to power function with pre-computed values
gPTP subsystem was calling pow(x,y) function with X and Y being
constants; these are replaced with the pre-computed values.

Signed-off-by: Andrei Laperie <andrei.laperie@intel.com>
2018-12-04 15:05:36 +02:00
Paweł Zadrożniak
6e460ca64f drivers: usb: nordic: Fix class/vendor request handling
SetAddress request (0x05) is ignored and not propagated, because it
is handled by nRF hardware. Curently, request type is not checked
causing class or vendor request 0x05 to be inappropiately ignored.
Only standard requests (type = 0) shoud be ignored. This commit
fixes the issue.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-12-04 13:53:48 +01:00
Sigvart M. Hovland
3fc497ac9a ext: debug: segger: Add missing include directories
Fix #11812 by adding include paths to the `CMakeLists.txt`

Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
2018-12-04 13:46:27 +01:00
Håkon Øye Amundsen
bd2edd0eac ext: segger: Use system include directive for configuration header.
By using system include directive, we allow
the user to place external SEGGER_RTT_conf.h files to the
include path in order to override the zephyr version.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 13:45:49 +01:00
Bub Wei
c9db778042 samples: net: zperf: Refactor zperf_*_receiver_init
Drop tcp and udp rx threads which are just setting
and returning.

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2018-12-04 14:01:23 +02:00
Paul Sokolovsky
6a2853f9f4 net: ipv4: Clarify basic IPv4 packet drop logging
1. Clarify message telling that the actual packet length fed by the
driver differs from what specified in IPv4 header, and that leads to
drop.
2. Debug log any dropped packets in general.

These changes come from the experience of developing a networking
driver, where figuring out why packets get dropped may require
quite a head-scratching.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-12-04 12:29:03 +02:00
Jukka Rissanen
3ac7c12b4f drivers: eth: native_posix: Enable PTP clock support for gPTP
If gPTP is enabled, then enable also PTP clock driver so that
gPTP sync starts to work properly for native_posix board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-04 01:15:38 -05:00
Jukka Rissanen
e694b1a5f9 drivers: eth: native_posix: Fix PTP driver init priority
The PTP driver was init too late which prevented gPTP from
working in native_posix board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-04 01:15:38 -05:00
Andrei Emeltchenko
1bf0870d2a doc: up_squared: Add network booting documentation
Add instructions for booting Zephyr over network.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
9c144e9c0a doc: up_squared: Use contents instead of hardcoded toc
Use contents instead of hardcoded chapters in TOC.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
32655ae2e7 doc: up_squared: Clean up documentation
Cleanup documentation following common standards

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Andrei Emeltchenko
b05c6834ad scripts: Add net and tftp to grub
This allows to boot over network for up_squared board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-12-04 00:01:35 -05:00
Anas Nashif
fa963a94a1 ci: do not use pull request branch with commit based CI
Use correct variable for branch when not in pull request mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 19:28:01 -05:00
Anas Nashif
3a361ecdc7 ci: do not build btsim if not installed
Do not attempt to build btsim if software is not installed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 19:28:01 -05:00
Anas Nashif
e81c902488 ci: PULL_REQUEST is reserved, use something else
Use PULL_REQUEST_NR instead of PULL_REQUEST which is reserved by
shippable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 18:45:26 -05:00
Krzysztof Chruscinski
d3c651d748 tests: subsys: logging: Add test for message drop notification
Extended logger suite to test correctness of reporting dropped
log messages.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Krzysztof Chruscinski
e781daacbf logging: Clean up in log_backend.h (asserts and doxygen)
Cleaning up doxygen comments. Replacing assert() with __ASSERT_NO_MSG.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Krzysztof Chruscinski
a211c42a29 logging: Add dropped messages notification to backends
Extended backend interface to allow notifying backend
that log messages has been dropped due to insufficient
internal buffer size. Notification contains number of
log messages dropped since last notification. It
is optional for a backend to implement handler.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-03 14:22:42 -08:00
Diego Sueiro
f7f31b1e13 boards: enable UART_INTERRUPT_DRIVEN for i.MX7 and i.MX6 boards
This patch enables the UART_INTERRUPT_DRIVEN by default for
colibri_imx7d_m4, udoo_neo_full_m4 and warp7_m4 boards.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-12-03 15:15:36 -05:00
Diego Sueiro
f1caf676ca drivers/serial: Fix uart issues for i.MX7 and i.MX6
This patch fixes the uart isr calling the callback with wrong data
(#11465) and the uart_poll_in checking the wrong status flag.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-12-03 15:15:36 -05:00
Andrew Boie
e48bc56b11 elf_helper: skip SYS_INIT() "devices"
SYS_INIT instantiates a device struct, but this is really
just used to run some functions at boot, it does not correspond
to a device driver belonging to a subsystem. Don't put them in
the kernel object table.

These are easy to filter since they are all named with the
_SYS_NAME macro.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:44:01 -08:00
Andrew Boie
cf268c39a2 kernel: add note in device.h
DEVICE_AND_API_INIT() is preferred over DEVICE_INIT() since
DEVICE_INIT() does not set the API struct at build time.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:32:58 -08:00
Andrew Boie
0bf3e38be1 CODEOWNERS: add owners to mem protection scripts
Based on original author/organization.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-03 11:32:22 -08:00
Peter A. Bigot
5bb18ac719 kernel: update documentation referencing old init levels
A couple references to the old PRIMARY and SECONDARY levels were left in
place when everything moved to the new levels.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-12-03 11:29:43 -08:00
Anas Nashif
d1bca4e056 ci: use set -x for verbosity
set -v was too verbose, so change to -x and remove extra sourcing of
zephyr-env.sh.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
45cbc81160 ci: pass pull request number to CI script
For further processing, pass pull request number to the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
5dd2593bcd ci: remove sanitycheck options from .shippable
They are now defined in CI script directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
d95ce03c1d ci: define BSIM_* variables in ci script directly
Rather than pass them as options, just set it directly in the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Anas Nashif
a0a1bffd1c ci: move pos processing to the CI script
Move post processing to script and remove duplicatated code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-03 13:00:02 -05:00
Aurelien Jarno
6fd1691b94 kernel: Add a "nocache" read-write memory section
Add a "nocache" read-write memory section that is configured to
not be cached. This memory section can be used to perform DMA
transfers when cache coherence issues are not optimal or can not
be solved using cache maintenance operations.

This is currently only supported on ARM Cortex M7 with MPU.

Fixes #2927

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-12-03 09:54:31 -08:00