Commit graph

41120 commits

Author SHA1 Message Date
Paul Sokolovsky
87b5eb9fce net: sockets: Implement getnameinfo()
This function is the opposite of getaddrinfo(), i.e. converts
struct sockaddr into a textual address. Normally (or more
specifically, based on the flags) it would perform reverse DNS
lookup, but current implementation implements only subset of
functionality, by converting to numeric textual address.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 17:34:57 -05:00
Paul Sokolovsky
fcced0c489 net: socket: Define zsock_inet_ntop()
Following convention, all functions of sockets API have zsock_
prefix, then optionally aliased to bare POSIX names.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 17:34:57 -05:00
Robert Lubos
c47ef5e142 net: icmpv6: Fix echo request packet generation
`net_ipv6_finalize` expects packet cursor to be reinitialized in order
to finalize packet correctly. This commits adds missing cursor
initialization.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-19 17:34:23 -05:00
Paul Sokolovsky
f7169ec216 net: sockets: Fix logging message
A debug message told "Set EOF flag on pkt %p", but actually printed
net_context instead of net_pkt.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 17:33:44 -05:00
Paul Sokolovsky
4ff21f631a doc: sockets: Update to the current state of affairs
1. There's now proper fdtable, pointer casting to "fd" is gone.
2. select() was implemented.
3. Enumerate implemented functions more thoroughly, so users can
fulltext-search them.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 17:29:44 -05:00
Adithya Baglody
30797d9c87 doc: gcov: Added documentation for code coverage.
The documentation shows the steps to be followed for generating the
code coverage reports.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-02-19 17:17:16 -05:00
Jukka Rissanen
b71e1f941f net: core: Fix documentation for core helpers
The doxygen documentation was not properly generated for the
network core helpers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:21:01 -05:00
Jukka Rissanen
3a93b33c99 doc: net: Enhance core API documentation
Add information about net_recv_data() and net_send_data()
functions.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:21:01 -05:00
Erwan Gouriou
8223cfb18a doc/guide/dts: DTS documentation add-on
Update dts documentation.
Rework some parts to provide more clarity and elaborate
yaml bindings usage.

Fixes #10318

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 15:09:08 -05:00
Jukka Rissanen
8bf1dfc97b samples: syslog_net: Fix link to RFC 5426
The RFC link pointed to wrong document.

Fixes #13005

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:08:05 -05:00
Jukka Rissanen
d38c5a75cf net: link_addr: Add more info to link layer address API
Some doxygen comments were missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:07:41 -05:00
Jukka Rissanen
94f3091e08 doc: net: Enhance link layer address documentation
Add overview chapter to link layer address documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:07:41 -05:00
Ioannis Glaropoulos
d4c74122b1 arch: arm: indicate Secure domain fault in Non-Secure fault exception
This commit adds the logic to indicate that a Non-Secure fault
exception has been triggered due to a processor fault that has,
in fact, occurred in the Secure state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-19 12:30:12 -06:00
Ioannis Glaropoulos
049494c026 arch: arm: fix determining stacked frame for Non-Secure firmware
This commit fixes the way we determine where the stacked
frame lies for (strictly) ARMv8-M Non-Secure firmware. It
introduces no changes to the default ARMv8-M behavior (i.e.
ARMv7-M compatible).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-02-19 12:30:12 -06:00
Armando Visconti
303c8a7234 samples/96b_argonkey: change log configurations
Enable debug logging for sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-19 12:29:09 -06:00
Armando Visconti
2602a18490 drivers/audio: mpxxdtyy: Align log defines to audio dmic case
Use CONFIG_AUDIO_DMIC_LOG_LEVEL macro to define mpxxdtyy driver
log levels.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-19 12:29:09 -06:00
Piotr Zięcik
240783a229 soc: Cleanup SYS_POWER_*_SUPPORTED Kconfig options
This commit removes "select SYS_POWER_*_SUPPORTED" entries from
Kconfig on SoCs which are not implementing sys_set_power_state()
method used to control power mode.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik
4558c5c4f4 power: policy_residency: Update Kconfig options description
This commit adds better description to the Kconfig options
configuring residency-based power policy.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik
81c1d37c89 test: kernel: device.pm: Do not enable system-level PM. It is not used.
This commit disables system-level power management in the device power
management test as it is not used.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik
99c35602fe power: Do not suspend devices if device PM is not compiled in
This commit fixes compilation of System Power Management module
when Device Power Management is disabled.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Piotr Zięcik
63b0df645e power: Clean up power state names
Some of power states used numerical suffix while otthers not.
This commit adds proper suffix to all power state names.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>

f
2019-02-19 13:25:36 -05:00
Piotr Zięcik
c45961daae power: Rework OS <-> Application interface
This commit simplifies OS <-> Application interface controlling power
management. In the previous approach application-based PM required
overriding sys_suspend() and sys_resume() functions. As these functions
actually implemented power state change, in such case application
basically had to provide own implementation of all PM-related stuff,
which was not portable and hard to maintain.

This commit changes this scheme: The sys_suspend() and sys_resume()
are now system functions while the application could either use
built-in power management policies or provide its own. All details
of power mode switching are now handled by the OS.

Also, this commit cleans up the Kconfig options related to system-level
power management grouping them under common CONFIG_SYS_PM_ prefix.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-19 13:25:36 -05:00
Sebastian Bøe
c330f32079 cmake: x86: Refactor build scripts
The same pattern is used five times In the x86 build scripts and the
same code has been copied and modified the same amount of times. This
has resulted in a system that is difficult to make changes to.

To enforce consistency and improve maintainability we refactor the
code into a function.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Sebastian Bøe
00b2e54b1c cmake: x86: Add wrapper targets for custom commands
In general, to have correct dependencies, one must not only depend on
files, but also a wrapper target for the file. This is done for some
of the files in arch/x86/CMakeLists.txt, but not all.

To be consistent with how dependency management is done we add wrapper
targets and add dependencies to them.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Sebastian Bøe
d515315a86 ld: Change the name of input section irq_vectors_alloc_data
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.

To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.

Being consistent simplifies the system and fosters code-reuse.

This patch renames irq_vectors_alloc_data.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Sebastian Bøe
c5837eabcb ld: Change the name of input section .gdt_ram_data to gdt
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.

To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.

Being consistent simplifies the system and fosters code-reuse.

This patch renames gdt.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Sebastian Bøe
d1a14b7eb2 ld: Change the name of section .user_mmu_data to user_mmu_tables
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.

To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.

Being consistent simplifies the system and fosters code-reuse.

This patch renames user_mmu_tables.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Sebastian Bøe
d5ea49bcbd ld: Change the name of input section .mmu_data to mmu_tables
The arch/x86/CMakeLists.txt build scripts names five sections that are
generated from .bin files. Two of them are named the same as the .bin
file, and the other three are named inconsistently.

To be consistent, we will rename the three that are named inconistenly
to align with the two that are named as the .bin file.

Being consistent simplifies the system and fosters code-reuse.

This patch renames mmu_tables.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-19 10:00:14 -08:00
Mark Ruvald Pedersen
63df409906 cmake: Toolchain abstraction: C++
Introduce toolchain_cc_cpp_*-family of macros.

Move the following into the toolchain_cc_cpp_* macros:
 * Common base set of flags
 * C++ standard version
 * RTTI
 * Exceptions

These macros must be implemented by every compiler port.
These macros set the respective flags, but leaves logic and control to
the root CMakeLists.txt file.

No functional change expected.

Clang's C++ flags are compatible with gcc, and are thus
inherited.

This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting easier porting to other (commercial) toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-19 12:33:19 -05:00
Mark Ruvald Pedersen
efb50e7af2 cmake: remove redundant compiler flags for C++
The compiler flags -ffunction-sections and -fdata-sections are already
universally set from arch/common/CMakeLists.txt, so we shall not set
them again for C++ only.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-02-19 12:33:19 -05:00
Paul Sokolovsky
26e562c0bd scripts: gitlint: Consistent case for Signed-off-by
The commit header as added by "git commit -s" is "Signed-off-by:",
and not any other casing. While it perhaps case-insensitive, use
canonical casing to not confuse (attentive) users.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 12:12:42 -05:00
Tomasz Gorochowik
ec424b7a45 arch: arm: mpu: nxp: disable mpu before reprogramming
This is needed, because an interrupt can happen after the main/static
MPU region is disabled and before it is re-enabled.

This region gets implicitly disabled inside the _region_init call, when
its configuration registers change:

  SYSMPU->WORD[index][0] = region_base;
  SYSMPU->WORD[index][1] = region_end;
  SYSMPU->WORD[index][2] = region_attr;
  SYSMPU->WORD[index][3] = SYSMPU_WORD_VLD_MASK;

The TRM says this about the WORD0, WORD1 and WORD2 registers:

  Writes to this register clear the region descriptor’s valid bit
  (RGDn_WORD3[VLD]).

And thus if an interrupt happens after writing to WORD0 and before
writing VLD to WORD3 again, the code executes with enabled and yet
misconfigured MPU.

Fixes #13482

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-02-19 11:06:25 -06:00
Anas Nashif
b0c71afc1a ci: Use latest docker image: 0.6.1
Use latest docker image with renode and an update to the SDK pre-release
0.10.0-rc3 (not used by default).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-19 11:30:27 -05:00
Tomasz Bursztyka
5dc84fa6ed drivers/console: Switch telnet console driver to new net_pkt API
This simplifies a bit the driver itself as it does not need to create
the net_pkt it wants to send anymore.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-02-19 11:29:07 -05:00
Aurelien Jarno
2c41103c8f usb/net: fix ECM driver in composite mode
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.

This patch updates the ECM driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-19 11:26:47 -05:00
Aurelien Jarno
70d13d87e2 usb/net: fix EEM driver in composite mode
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.

This patch updates the EEM driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-19 11:26:47 -05:00
Aurelien Jarno
70a0137f1f usb/net: fix RNDIS driver in composite mode
Since commit b48a8c3247 ("usb: device: Add composite status callback")
the cb_usb_status callback is not called anymore in composite mode. The
cb_usb_status_composite callback is called instead.

This patch updates the RNDIS driver to use either one or the other
depending on CONFIG_USB_COMPOSITE_DEVICE.

Note that in practice the RNDIS driver is forced to composite mode for
better compatility with Windows, so this fix is required to get the
RNDIS driver working.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-19 11:26:47 -05:00
Anas Nashif
04743c9a79 posix: rename priority in sched_param struct
Priority member in the sched_param struct should be named
sched_priority.

Fixes #13470

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-19 11:24:45 -05:00
Carles Cufi
40b63e5dc8 doc: Fix the doxygen output directory references
Use a variable to set the doxygen output directory so we can refer to it
later when fixing mtimes instead of hardcoding it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-19 16:44:21 +01:00
Sathish Kuttan
31ab23fce8 doc: intel_s1000: 2-Way audio sample documentation
Documentation for a sample application to demonstrate audio
capture and playback on an Intel S1000 CRB connected to a
host over I2S.

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-19 10:43:52 -05:00
Sathish Kuttan
acd2ff70dc samples: intel_s1000: 2-Way Audio Sample Application
Sample application to demonstrate 2-way audio capture/playback from a
host connected over I2S to S1000

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2019-02-19 10:43:52 -05:00
Kumar Gala
1f79491ecf boards: x86_64: qemu_x86_64: Remove board.h
board.h shouldn't be needed and the file has no contents.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-19 08:29:28 -06:00
Erwan Gouriou
c55c188e68 drivers/sensor/vl53l0x: Remove unnecessary lib include check
vl53l0x driver is using an external library to build, located under:
ext/hal/st/lib/sensor/vl53l0x.
This library is expecting stdint.h lib to be available and to
secure this for driver library inclusion work, a stdint.h file
header check was done. This check was based on assumptions on possible
header names for stdint.h.
Due to recent renaming of the zephyr header files, this check was
returning a false positive, generating warning at compilation.

Rather than updated with new header names, remove this check, since
driver porting is completed and stdint.h inclusion is actually
done.

Fixes #10134

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:48:10 -06:00
Erwan Gouriou
9a07a2850b drivers/flash: Rework CMakeLists.txt for stm32 drivers
Optimize CMake rules for STM23 series driver build.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
910b8b32fc boards: nucleo_f334r8: Provide flash storage partition
Add 6kb storage partition and declare nvs is supported.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
82403f68e2 drivers/flash: Move STM32F3 to generic STM32 series driver
A common driver is shared between stm32 chips, which was not the case
for stm32f3 series. As a consequence stm32f3 was not maintained
equally and was missing features such as flash layout or dts based
configuration.
Besides, drivers had some flows such as wrong bus clock and
missing HSI clock activation which lead to issues on boards not
using HSI as main clock.
As a consequence this commit moves stm32f3 series flash driver to
common stm32 flash drivers.

Fixes #4197

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
9e713ae77d dts/arm/st: stm32f3: Provide erase and write block size
On currently supported stm32f3 chips,
erase-block-size = 2048
write-block-size = 2
Set these property in stm32f3 series root dtsi file.

Fixes #9686

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
b3252a8a71 boards: stm32f3_disco: Add a storage partition
Add a 6kb "storage" partition to enable nvs samples test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
f0cac35a58 boards: nucleo_l432kc: Fix comment on partition description
Comment for storage partition could be misleading.
Clarify this is a partition used for file system.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00
Erwan Gouriou
5629f61b40 boards: nucleo_f091rc: Increase storage partition size
Storage partition minimum size is 6kb for successful test of
nvs sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 07:45:50 -06:00