Commit graph

41120 commits

Author SHA1 Message Date
Tomasz Bursztyka
b5bcd25398 net/iface: Coalesce all RS timers through one
This reduces the size of struct net_if_ipv6 by 24 bytes by moving
the k_delayed_work attribute into net_if core code.
Then each net_if_ipv6 can be added to the timer handler via a slist.

This does not make much gain if the system has only 1 network interface
It starts to be interesting if it has 2+ network interfaces then.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
09e7262be8 net/iface: Coalesce all DAD timers through one
This reduces the size of struct net_if_addr by 24 bytes by moving
the k_delayed_work attribute into net_if core code.
Then each net_if_addr can be added to the timer handler via a slist.

This does not make much gain if the system has only 1 unicast IPv6
address. It's a nice memory improvment once it has 2+ unicast IPv6
address. Note that having IPv4 enabled along with IPv6 will also see
memory improvements since both IPv6 and IPv4 use the same struct
net_if_addr.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
ca5d24d2cd net/iface: Remove useless attributes in net_if_ipv6 structure
DAD use dad_count attribute in struct net_if_addr, since DAD is ran on
each and every ipv6 unicast address.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
4e3a93d530 net/iface: Initialize IPv4/6 address so it removes more ifdef
Just create init functions for each IP version.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
6a513e4394 net/iface: Reduce ifdef usage on various options
Offload, DAD, RS and IPv4 autoconf.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
cf6c5428e1 net/iface: Reduce usage of ifdef around CONFIG_NET_IPV4
Let's regroup all the IPv4 related function into one ifdef. There is no
need to implement a dummy function for each: if IPv4 is not enabled,
these functions are unused in the core.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Tomasz Bursztyka
315b47b56b net/iface: Reduce usage of ifdef around CONFIG_NET_IPV6
Let's regroup all the IPv6 related function into one ifdef. There is no
need to implement a dummy function for each: if IPv6 is not enabled,
these functions are unused in the core.

Fixes #8728

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-09 14:54:23 +03:00
Krzysztof Chruscinski
09993873bd logging: Fix corruption in log panic when scheduler was active
Logger had false assumption that once log_panic is called then
context switch will never occur and was not protecting against
reentrancy in panic mode. Added interrupt locking when accessing
unprotected part.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-07-09 11:59:49 +02:00
Danny Oerndrup
74da439322 debug: tracing: Rewrite assert on current_thread in CPU stats module
The function sys_trace_thread_switched_out asserts in case
sys_trace_thread_switched_in was not called first. This is unintended
as tracing.h describes that out should be called before in, thus the
reverse of what the assert expects.
Fix assert on initial thread switch in, where out is called with
current_thread being NULL.

Signed-off-by: Danny Oerndrup <daor@demant.com>
2019-07-09 10:45:35 +02:00
Andrew Boie
49cf4867c7 sanitycheck: select gcov tool based on target
Use PATH gcov if no SDK in use, or native-posix derived
targets are in use.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-09 10:20:31 +02:00
Andrew Boie
f3c624c831 doc: update coverage documentation
The sanitycheck defaults have changed, and the same options
work for emulators and native_posix.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-09 10:20:31 +02:00
Wentong Wu
859ca42006 scripts: elf_helper: correct kernel object address check range
kernel object should not located in app_smem area.

Fixes: #17338.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-07-08 13:28:13 -07:00
Robert Lubos
c37faaa56d net: lwm2m: Ignore close return value
Explicitly ignore return value from `close` call.

Coverity-CID: 198870

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-07-08 21:40:15 +03:00
Andrei Emeltchenko
7cc57a1586 samples: usb: webusb: Remove dependence on GPIO
Remove old dependence.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-07-08 11:20:53 -07:00
Alberto Escolar Piedras
e4a4797488 nrf52_bsim: Add nrfx path to include path
To allow NRF drivers to include nrfx HAL or drivers headers
like with the real HAL, include the top nrfx/ folder
just as the real nrfx does.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-07-08 17:40:21 +02:00
Armando Visconti
75e1f4ef1a sample/shield: add support to x-nucleo-iks01a3 shield
Provide two basic example samples to test the x-nucleo-iks01a3 shield:

    - Standard (Mode 1)
    - SensorHub (Mode 2)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-08 10:07:23 -05:00
Armando Visconti
196997439b boards: add support for shields x-nucleo-iks01a3
x-nucleo-iks01a3 shield is an arduino compatible companion board
which can be used on top of Nucleo standard boards. It extend
the Nucleo functionalities adding following MEMS sensor support:

    - LSM6DSO accel and gyro
    - LIS2MDL magnetometer
    - LIS2DW12 accel
    - LPS22HH pressure
    - HTS221 humidity

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-08 10:07:23 -05:00
Armando Visconti
14ac665ba0 boards/arm: Add arduino_header support to nucleo f401re and f411re
Add arduino_header support to nucleo f401re and f411re boards.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-08 10:07:23 -05:00
Jukka Rissanen
57101e56f4 net: llmnr_responder: Fix debug prints after receiving query
The hostname needs to have log_strdup() when printing it.
Also it is useful to print information if the sending fails.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-08 16:02:38 +03:00
Tomasz Bursztyka
11a8b42d8b net/llmnr: Fix LLMNR answer creation
- answer offset was 1 byte off.
- request offset, when copied into the answer, was off as well.

Fixes #16142

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-08 16:02:38 +03:00
Marc Herbert
e5cedcae43 sanitycheck help: how to spot tests that were not run and just built
There are a few reasons why sanitycheck will only build a test and not
run it: list them in the developer guide. Also lists the --options that
provide that information and update their --help message.

A couple other --help fixes.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-08 08:07:57 -04:00
Marc Herbert
d7ca903b72 sanitycheck: replace cmake -H "not meant for public use" with -S
https://www.mail-archive.com/cmake-developers@cmake.org/msg16769.html

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-08 08:04:39 -04:00
Jukka Rissanen
b68d6a9a26 net: tcp: Adjust data length if TCP options are present
Skip the TCP options before giving the data to application.
Without this, the TCP options would be passed to the application.

Fixes #17055

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-08 10:27:33 +03:00
Marc Herbert
eee564fbfb doc: add space after cmake -Bdir and ninja -Cdir options
Let's be consistent with official cmake, ninja and make documentations.

https://cmake.org/cmake/help/latest/manual/cmake.1.html
cmake --help
man cmake

https://ninja-build.org/manual.html#_running_ninja
ninja --help

https://www.gnu.org/software/make/manual/make.html#Options-Summary
info make 'Options Summary'
etc.

Related to issue #15315

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-07 16:34:12 -04:00
Marc Herbert
cd4c268a99 subsys tracing: remove (uintptr_t) casts in snprintk and use %p
Fixes -Werror=format: '%x' expects argument of type 'unsigned int', but
argument N has type 'long unsigned int'

Reproduced with sanitycheck -p bl652_dvk (or -p any other
HAS_SEGGER_RTT) and by adding CONFIG_SEGGER_SYSTEMVIEW=y to
samples/philosophers/prj.conf. sanitycheck adds -Werror.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-07 08:58:11 -04:00
Anas Nashif
3f057403cb manifest: update to latest ci-tools revision
- Fix CODEOWNER processing for files in CODEOWNERS but not in tree.
- Reject comma in entry path

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-06 11:38:27 -04:00
Jan Van Winkel
18ef131c80 gui: Move lvgl into a zephyr module
Removed lvgl sources from CMakefile.txt and only keep zephyr glue
logic.

Further added lvgl module to west.yml.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-06 07:58:44 -04:00
Andrew Boie
eb07943b2d tests: crc: convert to regular test case
The special 'unittest' target has largely been supersesed by
native_posix, and converting this to a regular test will allow
us to see code coverage for the CRC functions in our coverage
reports.

Fixes: #16943

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-06 00:31:04 +02:00
Sebastian Bøe
b8d4a77ecd size_report: Don't crash when observing stripped symbols
When stripped symbols are present in the build size_report has crashed
due to it not being aware of this case.

This patch causes stripped symbols to be ignored instead, allowing
analysis of the non-stripped symbols.

It is left as future work to somehow display how much space stripped
symbols are taking up.

Stripped symbols can be present when third-party binaries are linked
into the build.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-07-05 14:18:49 -04:00
Nicolas Pitre
6455ddbd4e test/usb: fix pointer type mismatch
The 4th argument of usb_dc_ep_write() should be a u32_t* not a size_t*.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-05 14:16:50 -04:00
Francois Ramu
45eb589c5c dts: remove unused clock-controllers property #17122
The 'clock-controllers' property is not specified and not used for any
generation.  Lets remove it.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
9f6a28742d boards: arm: Add nucleo for nucleo_g071rb board
This patch adds support for the STM32 nucleo_g071rb board
 from STMicroelectronics.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
26c38a49a2 soc: arm: uart: Add STM32G0X UART support
Add UART support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
f9d2a41612 drivers: interrupt_controller: Add STM32G0X interrupt support
Add interrupt support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>

# Conflicts:
#	drivers/interrupt_controller/exti_stm32.c
2019-07-05 10:35:55 -05:00
Francois Ramu
dd3ee06af7 drivers: gpio: Add STM32G0X pinmux support
Add gpio support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>

# Conflicts:
#	drivers/gpio/gpio_stm32.h
2019-07-05 10:35:55 -05:00
Francois Ramu
9b2025c891 drivers: pinmux: Add STM32G0X pinmux support
Add pinmux support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>

# Conflicts:
#	drivers/pinmux/stm32/pinmux_stm32.h
2019-07-05 10:35:55 -05:00
Francois Ramu
da48451a01 drivers: pwm: Add STM32G0XX pwm support
Add pwm support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
624c566306 drivers: clock_control: Add STM32G0XX clock support
Add clock support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
bfc2ea6dd5 drivers: flash: Add STM32G0XX flash support
Add flash support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Francois Ramu
7ea00134f5 soc: arm: st_stm32: Add STM32G071 SoC series
This patch adds support for the STM32G071xx
 from STMicroelectronics.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Sathish Kuttan
3d32acf376 samples: intel_s1000: update sample audio app doc
Update to documentation for the sample audio application running
on Sue Creek S1000 board from Intel.
Added section on how to control the audio application on target
from a Linux host and updated the console output section
accordingly.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
a4c3de16f2 samples: intel_s1000: script to control from host
Add python script and associated configuration YAML file
to control audio sample application running on
Intel Sue Creek S1000 from a Linux host.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
192ca06a9e samples: intel_s1000: add files to cmake build
Add tuning driver, audio block processing threads,
background processing thread and USB transport driver
to the cmake build in audio sample app.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
dff993ba11 samples: intel_s1000: update project configration
Add USB HID configurations to the audio sample app project
configuration.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
c3bf362c28 samples: intel_s1000: tuning commands in audio app
Add processing of sample tuning commands in the audio
sample app.
Add audio processing stubs.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
47e2e624c8 samples: intel_s1000: track status of audio app
Add a status check to start/stop audio in order to start
audio only if it's not already running and to stop audio
only if it is running.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
75ff541a01 samples: intel_s1000: add background thread
Add background thread in audio sample app for
Intel® Sue Creek S1000 board

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
a2f1ad41e8 samples: intel_s1000: audio processing threads
Add processing threads for small/large audio blocks
in audio sample app for Intel® Sue Creek S1000 board

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
881971ad26 samples: intel_s1000: tuning driver for audio app
Add a tuning interface driver to send receive tuning/control
commands over a USB transport.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00
Sathish Kuttan
3adf7e034e samples: intel_s1000: USB control for audio sample
Add USB transport driver to control the sample application
from a host connected to Intel® Sue Creek S1000 board
via an USB interface.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-07-05 10:13:51 -04:00