Python scripts should be executed indirectly by the python
interpreter, not directly in a CMake COMMAND. This is for portability
reasons.
Directly executing a python script depends on non-portable shebang
logic and/or "default application" behaviour.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Remove the CMakeLists.txt file that is in the 'common' directory of
nffs_fs_api. It has likely been added by mistake as it does not make
any sense as it is written.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Adds support for configuring the CS toggling delay and using a
different device ID so that compatible flash chips can also be
used by this driver.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdtech.com>
This fixes a regression introduced in commit 6af5d1cd1f
("Bluetooth: Compress bt_keys struct").
Instead of passing a value zero as the random number, the
value at the RAM address zero was being used by the start
encryption function call. It is now fixed by consistently
using byte-array to store EDiv and Rand values.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This corrects two things:
- moves addition of the proper "system_*.c" file to sources, so that it
is done only when CONFIG_HAS_NRFX is active (related CONFIG_SOC_* may
be activated also for simulated targets which do not want to compile
code with system initialization for the real SoC)
- removes redundant check of HAS_NRFX when adding "nrfx_glue.c"
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds a translation layer to make the nrfx driver for nrf52 PWM
peripheral accessible via the Zephyr's API.
Signed-off-by: Justin DeMartino <jdemarti@gmail.com>
Bool symbols implicitly default to 'n'.
A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.
Piggyback removal of some 'default ""' properties on string symbols. The
empty string is the default.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit removes the direct inclusions of device.h or gpio.h
from soc.h header files in ARM SOCs, to avoid soc.h include
kernel.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit creates a new header file (kernel_include.h) that
contains all header files to be included by kernel_init.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit includes the arch/arm/cortex_m/cmsis.h directly
in arm_mpu.h. This is requires as arm_mpu.h uses CMSIS macro
defines directly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fixes#8391
Enables the i2c drivers for these boards.
Required to enable i2c with these boards.
Tested samples/sensor/tmp112 for nrf52_blenano2
with i2c enabled.
Signed-off-by: Mandar Chandrakant Thorat <mandar.chandrakant.thorat@intel.com>
It should be possible to make both these options off, and that
should be default, otherwise targets not supporting them yet, e.g.
native_posix, have build issues.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Console subsystem is intended to be a layer between console drivers
and console clients, like e.g. shell. This change factors out code
from shell which dealed with individial console drivers and moves it
to console subsystem, under the name console_register_line_input().
To accommodate for this change, older console subsys Kconfig symbol
is changed from CONFIG_CONSOLE_PULL to CONFIG_CONSOLE_SUBSYS
(CONFIG_CONSOLE is already used by console drivers). This signifies
that console subsystem is intended to deal with all of console
aspects in Zephyr (existing and new), not just provide some "new"
functionality on top of raw console drivers, like it initially
started.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Update Kconfiglib to get upstream commit ca89ca0c0c420 ("Add dependency
loop detection") in.
Upstream commit message
=======================
Pretty long overdue.
Until now, dependency loops have raised a hard-to-debug Python
RecursionError during evaluation. A Kconfiglib exception is raised now
instead, with a message that lists all the items in the loop.
See the comment at the start of _check_dep_loop_sym() for an overview of
the algorithm. At a high level, it's loop detection in a directed graph
by keeping track of unvisited/visited nodes during depth-first search.
(A third "visited, known to not be in a dependency loop" state is used
as well.)
Choices complicate things, as they're inherently loopy: The choice
depends on the choice symbols and vice versa, and the choice symbols in
a sense all depend on each other.
Add the choice-to-choice-symbol dependencies separately after dependency
loop detection, so that there's just the choice-symbol-to-choice
dependencies to deal with. It simplifies things, as it makes it possible
to tell dependencies from 'prompt' and 'default' conditions on the
choice from choice symbol dependencies.
Do some flag shenanigans to prevent the choice from being "re-entered"
while looping through the choice symbols. Maybe this could be cleaned up
a bit somehow...
Example exception message:
Dependency loop
===============
A (defined at tests/Kdeploop10:1), with definition...
config A
bool
depends on B
...depends on B (defined at tests/Kdeploop10:5), with definition...
config B
bool
depends on C = 7
...depends on C (defined at tests/Kdeploop10:9), with definition...
config C
int
range D 8
...depends on D (defined at tests/Kdeploop10:13), with definition...
config D
int
default 3 if E
default 8
...depends on E (defined at tests/Kdeploop10:18), with definition...
config E
bool
(select-related dependencies: F && G)
...depends on G (defined at tests/Kdeploop10:25), with definition...
config G
bool
depends on H
...depends on the choice symbol H (defined at tests/Kdeploop10:32), with
definition...
config H
bool
prompt "H" if I && <choice>
depends on I && <choice>
...depends on the choice symbol I (defined at tests/Kdeploop10:41), with
definition...
config I
bool
prompt "I" if <choice>
depends on <choice>
...depends on <choice> (defined at tests/Kdeploop10:38), with
definition...
choice
bool
prompt "choice" if J
...depends on J (defined at tests/Kdeploop10:46), with definition...
config J
bool
depends on A
...depends again on A (defined at tests/Kdeploop10:1)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The following dependency loop existed:
config SPI_SLAVE
bool
(Defined at drivers/spi/Kconfig:27)
...is selected by...
config SPI_2_NRF_SPIS
bool
select SPI_SLAVE
(Defined at drivers/spi/Kconfig.nrfx:210)
...is in the choice...
choice
bool
depends on SPI_2
(Defined at drivers/spi/Kconfig.nrfx:192)
...that depends on...
config SPI_2
bool
depends on SPI_SLAVE
(Defined at
arch/x86/soc/intel_quark/quark_se/Kconfig.defconfig.series)
...that again depends on SPI_SLAVE
(This might not be a problem in practice, but it'd be difficult to
detect.)
I think the underlying issue is that SPI_2_NRF_SPIS 'select's SPI_SLAVE,
while SPI_2 'depends on' it.
Fix it by having SPI_2_NRF_SPIS 'depend on' SPI_SLAVE as well. This will
require SPI_SLAVE to be explicitly enabled before SPI_2_NRF_SPIS can be
enabled.
No configuration files in Zephyr itself seem to currently enable
SPI_2_NRF_SPIS (and it defaults to n), so no tweaks should be needed
there.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Since USB Binary Device Object Store (BOS) descriptor might be defined
in several places create usb_bos_desc section.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
At the moment USB Device stack is not possible to enable for
native_posix architecture since there is not USB controller.
The patch allows to enable stack making possible to use it in unit
tests.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
_impl_rtc_(enable|disable) does not return a value while
Z_SYSCALL_HANDLER(rtc_(enable|disable)) expects to return a value.
Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
This resolves#5723 by adding support for assigning to Kconfig options
from the CMake CLI.
CMake CLI Kconfig options can be specified like so:
'cmake -DCONFIG_ASSERT=y'
The lifetime of such an option is the same as the lifetime of a CMake
cache variable, and in principle any method of populating the
CMakeCache could be used, such as cmake-gui.
This has been implemented by scanning the CMakeCache variables before
Kconfig is executed and writing any that are prefixed with 'CONFIG_'
to a new Kconfig fragment in the build directory that is merged in
with a high precedence.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This is a migration from using code generation to using the C language
which we in the general case we should aways strive towards.
It is equivalent to the simplification that was done with
_irq_spurious here:
https://github.com/zephyrproject-rtos/zephyr/pull/7574
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
All architecture defines OCTET_TO_SIZEOFUNIT and SIZEOFUNIT_TO_OCTET
as identity functions. But the only user is tests/benchmarks/app_kernel.
It's effectively a no-op. Remove them.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
Set Zero Latency IRQ to priority level zero and SVCs to priority level
one when Zero Latency IRQ is enabled.
This makes Zero Zatency truly zero latency when the kernel has been
configured with userspace enabled, or when IRQ offloading is used.
Exceptions can still delay Zero Latency IRQ, but this is considered
ok since exceptions indicate a serious error, and the system needs to
recover.
Fixes: #7869
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit adds support for Microsemi Mi-V RISC-V softcore CPU
running on the M2GL025 IGLOO2 FPGA development board.
signed-off-by: Karol Gugala <kgugala@antmicro.com>
This commit moves code from fe310 platform into RISC-V privilege common
folder. This way the code can be reused by other platforms in future.
signed-off-by: Karol Gugala <kgugala@antmicro.com>
RISC-V qemu does not use PLIC controller, so plic.c file fails to
compile with qemu target. This change disables plic if qemu is
chosen.
signed-off-by: Karol Gugala <kgugala@antmicro.com>
Due to the fact that cmake doesn't allow to build empty "library"
(which would be the case when neither CONFIG_NET_APP_SERVER nor
CONFIG_NET_APP_CLIENT is defined).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
net_app library consisted of 2 disjoint parts: a) library to
setup/configure networking on the application startup; b) library
to setup client and server connections.
As the configuration library is universally useful and is a generic
Zephyr networking component, split it out to a seperate top-level
networking library under net/lib/config/.
Fixes: #7658
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Currently tests/benchmark/footprint build is failing for
nrf52_pca20020 board. In minimal configuration, all modules are
disabled, including GPIO, because of that defines related to GPIO
are missing in board.c file and compilation fails.
To solve it, I selected GPIO to be always turned on for
nrf52_pca20020 board.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
SDA and SCL pins can now be configured through DTS.
Pins on development kits have been assigned according to arduino
headers.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Changes add a translation layer to make nrfx TWI and TWIM drivers
work with Zephyr API.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
As part of HAL_CAN_Init we check the initial state of the can handle.
Setting it to HAL_CAN_STATE_RESET as an initial state to start the
Init properly.
Resolves: #8416
Coverity-CID: 186580
Signed-off-by: Sritej Kanakadandi Venkata Rama <sritej.kvr@gmail.com>
This patch changes the backoff factor to be random between zero and
2^be-1, as defined by the standard.
The previous implementation generated either a power-of-two number or
zero for bo_n, because it only overlaps a single bit with the random
number. The overlap is very rare, as in random, and results in the
backoff time being zero most of the time.
Signed-off-by: Franco Saworski <franco.saworski@blik.io>
The genrest.py script (used to create the Kconfig configuration option
documentation) was depending on the environment's locale settings to
properly handle UTF-8 character encoding in the reST files it creates.
When we reused this script for another project, that environment's
LC_CTYPE was set to C, telling Python to use ASCII as the (default)
encoding. This patch is a prophylactic measure to prevent potential
failures by adding the encoding option on the open() calls.
It also includes a small tweak to the introduction.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The payload size was hardcoded to 64.
This commit adds a configuration option to choose > 64 bytes
when the device allows larger packets.
A configuration option USB_HID_MAX_PAYLOAD_SIZE is added in
subsys/usb/class/hid/Kconfig
The default value is set to 64
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Added CONFIG_USB_DW_USB_2_0
Updated global configuration register to use UTMI 16 bit PHY
Updated device configuration register to use High Speed
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>