Commit graph

98463 commits

Author SHA1 Message Date
Flavio Ceolin 91b6123932 kernel: syscall: Explicitly ignoring not used return
Some syscacll return value through parameters and for these functions
the return of _arch_syscall_invoke* are not used.

MISRA requires that all return values be checked.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Flavio Ceolin a1135620ba misc: printk: Change function return
The result of both printk and vprintk are not used in any place.
MISRA-C says that the return of every non void function must be
checked.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Maureen Helm df2cc4084a tests: usb: Enable usb tests on frdm_k64f
Enables the bos and os_desc tests on the frdm_k64f platform.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-14 13:22:03 -05:00
Maureen Helm 4c81e94af1 tests: usb: Don't enable stdout console
This was causing a stack overflow on the frdm_k64f platform.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-14 13:22:03 -05:00
Maureen Helm 95be60a80f usb: device: Fix kinetis driver to compile with SYS_LOG disabled
Fixes a compile error in the kinetis usb device driver when SYS_LOG is
disabled.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-14 13:22:03 -05:00
Kumar Gala 0b48df350f ci: Increase number of build slaves to 7
Since builds have drastically increased in time, we end up timing out CI
if we have a larger number of tests to build.  Try bumping up the number
of slaves to 7 and see if that helps.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-14 13:11:21 -05:00
Krzysztof Chruscinski 4add83c5e2 samples: subsys: logging: example of kconfig.log_template usage
Logger sample extended to use template for configuration of
sample module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-14 12:32:56 -04:00
Krzysztof Chruscinski a728a46a60 logging: add template for log configuration
Added Kconfig.log_template file with template for module log
configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-14 12:32:56 -04:00
Carles Cufi 5f102fbfca scripts: ci: Set SOC_DIR for check-compliance.py
To avoid having to set it externally, set the SOC_DIR environment
variable directly in the compliance script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-14 17:45:56 +02:00
Kumar Gala 912b4a276c dts: arm: silabs: Remove use of CONFIG_SOC_* from Silabs SoC dts files
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include.  This lets us
remove:

CONFIG_SOC_PART_NUMBER_EFM32WG990F256
CONFIG_SOC_PART_NUMBER_EFR32FG1P133F256GM48

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-14 10:43:47 -05:00
Kumar Gala 52ebc02cf2 dts: arm: ti: Remove use of CONFIG_SOC_* from TI SoC dts files
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include.  This lets us
remove:

CONFIG_SOC_CC3220SF
CONFIG_SOC_MSP432P401R

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-14 10:43:47 -05:00
Sebastian Bøe d98e046a24 cmake: move ti_lm3s6965-specific code into the soc directory
As far as possible SoC-specific code should be contained to it's
directory and core systems should not be referencing specific
SoCs. This keeps the common code clean and makes it easier to maintain
out-of-tree SoCs.

To this end we move CONFIG_SOC_TI_LM3S6965_QEMU's soft-reset related
code out of arch/arm/core/cortex_m and into arch/arm/soc/ti_lm3s6965.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-14 10:22:20 -05:00
Ajay Kishore 75780a8135 tests: pipe: Enhance tests to improve code coverage
This test is intended to validate k_pipe_alloc_init()
and k_pipe_cleanup(), when CONFIG_USERSPACE is not defined.
Also added test to validate pending reader and pending writer
feature in pipe.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-09-14 09:06:31 -04:00
Krzysztof Chruscinski 1fbea945f4 logging: Refactor log_output module
Module refactored: splitted data into read-only part and control block,
adding macro for creating log_output instance

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-14 15:05:50 +02:00
Erwan Gouriou c5ada39411 scripts: extract_dts_includes.py: generate 'compatible' CONFIG flags
Generate CONFIG_DT_COMPAT flags using available nodes
'compatible' property.
Store them in a bogus node_address key of defs dict so
duplicates could be removed.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-14 08:02:53 -05:00
Erwan Gouriou 1755cf6582 dts/bindings: Add 'generation' directive on for 'compatible' property
Add 'generation: define' directive to 'compatible' property.
When existing for a type of device, move compatible property
description in device base structure (eg: i2c.yaml)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-14 08:02:53 -05:00
Kamil Gawor 8853cb3d06 subsys: bluetooth: Add notification TX complete callback
This changed added notification complete callback which
gives information if a given notification has been sent.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2018-09-14 14:39:01 +02:00
Robert Lubos 5286524a5c net: tls: Add missing entropy header
sockets_tls subsystem uses entropy driver, yet it does not include
entropy header. This commit fixes this.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-09-14 15:01:57 +03:00
Andrzej Puzdrowski 48e6ec7b49 ext: nffs: bugfix of possible to corrupt filename
Origin: Apache Mynewt NFFS
URL: https://github.com/apache/mynewt-nffs/tree/master
Commit: a2f679afe6323310ab1000385f41115df7da326e
Maintained-by: External

This patch introduce version which fixes following bug:

While inode is updated it is possible that Garbage Collection
is called which caused overwrite of inode's filename as the same
buffer was used to keep the filename and copping data in GC.

This patch uses buffer on the stack for keeping filename while inode
is updated which fix the issue.

The patch cause 128 B increase of stack consumption during inode
update the file name might be corrupted

Fixes #9749

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-09-14 13:13:59 +02:00
Paul Sokolovsky da4c00c021 libc: minimal: Add sys/fcntl.h enough to compile net/lib/sockets
Contains defines enough to compile BSD Sockets subsystem. Values are
compatible with Newlib.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-09-13 14:29:17 -04:00
Flavio Ceolin 585d90f8fc kernel: Fix k_stack_alloc_init behavior
The implementation of this syscall can return either 0 or -ENOMEM, but
when USERSPACE is enabled and it is called through syscall it always
return 0.

Just change this syscall implementation to return the value of
_impl_k_stack_alloc_init

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-13 13:20:13 -04:00
Maureen Helm b7fdc2397a CODEOWNERS: Add @MeganHansen to review nxp board docs
Adds @MeganHansen as a code owner to review nxp board documents.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-13 12:17:57 -04:00
Rajavardhan Gundi dc45def9d0 drivers/gpio_sam: Fix incorrect flag checking
Corrected the checking for edge/level interrupts in the flags
variable.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-09-13 11:29:17 -04:00
Erwan Gouriou ba31cb55cd cmake: Add zephyr base address when looking file into soc/
When checking availability of soc/${ARCH}/CMakeLists.txt,
we should use ${ZEPHYR_BASE} as path base.

Fixes #9956

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-13 10:11:57 -05:00
Maureen Helm 232cb657fc sensor: Remove unnecessary Kconfig parentheses in sensor drivers
Removes Kconfig parentheses that become unnecessary after commits
7fe3a481d0 and
ab9017ec83.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-13 10:49:54 -04:00
Varun Sharma 28f5da6c38 subsys: shell : fs new shell module for fs mount operation
Fixes # 7348, also includes test cases

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2018-09-13 09:27:45 -04:00
Carles Cufi d3390305d1 cmake: menuconfig: Fix missing SOC_DIR macro
menuconfig was being invoked without an initialized SOC_DIR, leading to
errors when parsing the top-level Kconfig.zephyr file.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-13 08:58:20 -04:00
Erwan Gouriou 7a9f4f6879 doc: fix desription SoC tree structure example
Example of st_stm32 soc tree structure was instantiating
'stm32l0' dir as subdir of 'common' which is not the case.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-13 08:55:59 -04:00
Kamil Piszczek 3e8f118d8f Bluetooth: shell: adding command for directed advertising
Added a new command, which can be used to test the directed advertising
API. This command allows user to turn on directed advertising in two
modes: low and high duty. High duty mode is the default one.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-09-13 14:21:21 +02:00
Kamil Piszczek 9af28ddc09 Bluetooth: host: directed advertising support
Added implementation to the directed advertising API in the Connection
Management module. Introduced a new connection state for this type of
advertising. The new state is symmetric to the connection state used for
scanning.

Added a new advertising option that can be used to trigger low and high
duty directed advertising. Added macros for default values of
Advertising Parameters, which are used to trigger directed advertising.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-09-13 14:21:21 +02:00
Tomasz Bursztyka e8dee89079 net/udp: Separating net_context from udp and other cleanup
- Up to net_context to give the source port.
- net_udp_append is unused anywhere: let's remove it.
- left over macros on _raw versions removed as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-09-13 14:34:25 +03:00
Maureen Helm 7fe3a481d0 sensor: Remove redundant Kconfig "depends on SENSOR" in sensor drivers
The sensor driver Kconfigs are sourced inside an "if SENSOR..endif"
conditional, so it is redundant for sensor drivers to explicitly
"depends on SENSOR".

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-13 01:02:37 -04:00
Maureen Helm ab9017ec83 sensor: Eliminate repetitive Kconfig "depends on" in sensor drivers
For each sensor driver, wrap all Kconfig symbols in a big if/endif
conditional rather than repeating "depends on" for each symbol.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-13 01:02:37 -04:00
Anas Nashif 1666130416 doc: custom SOC configurations
Document how to use out-of-tree SOC configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 96455d5881 build: support out of tree SoC definition
Add the glue to make this work with SoC code outside of the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif abcf2ad5a8 kconfig: move soc selection to ZEPHYR_BASE/soc/
Rather than do that for each architecture, source SoC Kconfigs where the
code is maintained, under ZEPHYR_BASE/soc.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 66b524a62a soc: support out of dir soc code
Just like boards, support also SoCs out of the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif d7f7324d60 CODEOWNERS: adapt to new location of soc code
soc code is now under ZEPHYR_BASE/soc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 563c161a80 posix: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 696aa869d5 nios2: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 279cc2e448 riscv32: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif cea0b3a9c2 xtensa: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif f183444682 arc: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 70d819b405 arm: soc: move arm SoCs to top-dir
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 5744437d25 kconfig: adapt help messages for new location of SoC code
Point to the new location of the soc code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif cff0005a87 x86: move soc/cpu to top-level under soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 3d1252ff2d soc: adapt Kconfig/CMake for soc in top /
Change build system to point to soc/ in the top directory rather than
under arch/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif 81b272119a docs: fixed documenation pointers
Fixed URL to documentation, now latest docs are under /latest/..
Fixes #9932

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-12 12:03:18 -04:00
Flavio Ceolin 3259ac08ca kernel: userspace: Sanitize switch usage
MISRA-C requires that every switch clause has a break instruction.
Changing gen_kobject_list script to generates compliance code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-12 10:05:06 -04:00
Flavio Ceolin a3cea50ce7 kernel: Add missing break/default in switch statement
Explicitly add default clause and break instruction in every clauses in
switch statement.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-12 10:05:06 -04:00