This commit is a cleanup of the cmake/kconfig.cmake file.
It removes `set(ENV{<name>} <value>)` and instead creates a shared list
that can be used for execute_process() and add_custom_target() when
running Kconfig during CMake configure time or menuconfig and related
build targets.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data via AT commands.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
To debug hard-to-reproduce faults/panics, it's helpful to get the full
register state at the time a fault occurred. This enables recovering
full backtraces and the state of local variables at the time of a
crash.
This PR introduces a new Kconfig option, CONFIG_EXTRA_EXCEPTION_INFO,
to facilitate this use case. The option enables the capturing of the
callee-saved register state (r4-r11 & exc_return) during a fault. The
info is forwarded to `k_sys_fatal_error_handler` in the z_arch_esf_t
parameter. From there, the data can be saved for post-mortem analysis.
To test the functionality a new unit test was added to
tests/arch/arm_interrupt which verifies the register contents passed
in the argument match the state leading up to a crash.
Signed-off-by: Chris Coleman <chris@memfault.com>
Trims the default memory configuration for the BBC Microbit in mesh
samples to ensure that it fits.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Changes the local network interface to exclusively handle packets for
the local interface, duplicating the buffers in the process.
The loopback mechanism now operates its own packet pool for the local
interface queue. The loopback is moved ahead of encryption, allowing the
local interface packets to go back up the stack without network crypto,
saving a full round of encrypt/decrypt for self-send.
Packets for group addresses the local node subscribes to are now
duplicated, with one unencrypted variant going into the network
queue, and the network bound packets following the regular path to the
advertiser.
Introduces one new configuration for setting the number of loopback
buffers.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add sample where a fictious lenghty operation is required before a more
elaborate handshake is perform with eSPI master.
This requires sending SLAVE_BOOT_DONE virtual wire explicitly.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add Kconfig switch to disable automatic eSPI slave boot acknowledge.
This allows to perform lenghty operations before continue any eSPI
handshake with eSPI master.
Required for eSPI SAF boot configuration.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This will only build/run on emulation platforms.
The decision is made based on the value of the 'simulation' key in the
platform yaml file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Generate errors for implicit conversions that may alter a value, that
covers conversions implicit conversions to narrower types, different
signal, different essential types (float -> int), ... From GCC
documentation
(https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gcc/Warning-Options.html)
"""
Warn for implicit conversions that may alter a value. This includes
conversions between real and integer, like abs (x) when x is double;
conversions between signed and unsigned, like unsigned ui = -1; and
conversions to smaller types, like sqrtf (M_PI). Do not warn for
explicit casts like abs ((int) x) and ui = (unsigned) -1, or if the
value is not changed by the conversion like in abs (2.0). Warnings
about conversions between signed and unsigned integers can be disabled
by using -Wno-sign-conversion.
For C++, also warn for confusing overload resolution for user-defined
conversions; and conversions that never use a type conversion
operator: conversions to void, the same type, a base class or a
reference to them. Warnings about conversions between signed and
unsigned integers are disabled by default in C++ unless
-Wsign-conversion is explicitly enabled.
"""
This partially cover rules: 10.4, 10.5, 10.6, 10.7 and 10.8
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add implicit-fallthrough flag when CONFIG_MISRA_SANE is set.
It will require __fallthrough macro or a proper comment tells the
compiler that this happens intentionally.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add a Kconfig option to enable compiler flags that help to enforce
some code guideline rules.
Note: As the current code base is not in compliance with the adopted
code guideline, some rules will generate warnings during the
build. This is intended to help to spot violations.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit adds a node for the ASMedia 2364 controller that acts as an
I2C master on the I2C0 bus. This node contains the GPIO used by the MCU
to notify the ASM2364 that data are available to read.
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
The FaZe board can be found in the Seagate FireCuda Gaming SSD devices.
A NVMe SSD and two chips are embedded: an ASMedia ASM2364 USB-to-PCIe
bridge controller and a NXP LPC11U67 MCU. The former is handling the USB
type-C to SSD I/Os while the latter is dedicated to the LED effects. The
two chips are connected together through I2C and GPIOs.
This Zephyr port is running on the LPC11U67 MCU.
Here is a list of the devices connected to the LPC11U67 on a FaZe board:
- ASMedia ASM2364 USB-to-PCIe bridge (I2C master on port O)
- 6 RGB LEDs connected connected to a TI LP5030 LED controller
(I2C device on port 1)
- 1 white LED (SSD activity blinking)
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch introduces some tests for the LED drivers. The following
functions of the LED API are tested:
- led_get_info
- led_on
- led_off
- led_set_color
- led_set_brightness
Note that the led-controller-0 alias must be defined in the DTS of the
board used to run this tests.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch introduces the "led" shell command. This allows to run the
LED API functions (and to test the LED drivers) from the Zephyr shell.
The following subcommands are supported:
- on
- off
- get_info
- set_brightness
- set_color
- set_channel
- write_channels
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This sample controls up to 12 LEDs connected to a LP503x driver.
First, for each LED information is retrieved using the led_get_info
syscall and printed in the log messages. Next, from an infinite loop, a
test pattern (described below) is applied to all the LEDs simultaneously
(using the led_write_channels syscall) and then to each LED one by one
(using the led_set_{brightness,color} syscalls).
Test pattern:
For each color in red green blue white yellow purple cyan orange:
- set the color
- turn on
- turn off
- set the brightness gradually to the maximum level
- turn off
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch adds support for the Texas Instruments LP5030 and LP5036
I2C LED controllers. They are respectively providing up to 30 and 36
channels (i.e. 10 or 12 RGB LEDs).
In addition to the channel/color registers this LED controller provides
a per-LED brigthness register. This driver implements both LED-based and
channel-based API methods:
- led_on
- led_off
- led_get_info
- led_set_brightness
- led_set_color
- led_set_channel
- led_write_channels
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
This patch adds a DTS binding for the Texas Instruments LP5030 and
LP5036 I2C LED controllers. They are respectively providing up to 30
and 36 channels (i.e. 10 or 12 RGB LEDs).
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Some LED controllers are connected to a large number of LEDs (i.e.
array/strip of LEDs). A user may need to set several LEDs at the same
time. The LED oriented syscalls are not adapted to this task. Indeed a
call per LED is needed to configure a group of LEDs. To that end, this
patch adds the led_set_channel and led_write_channels syscalls to the
LED API. They offer direct access to the raw channels. They respectively
allow to set a single channel and to write several contiguous channels
(and therefore to configure a group of LEDs).
Moreover the addition of the led_write_channels syscall also aims at
closing the gap with the LED strip API.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
For the LED controller without any hardware blinking capability this
doesn't really make sense to make the blink callback mandatory. It is
better to let it undefined. This way this will allow the LED API to
fall back to a common software blink implementation.
In addition some controllers with RGB LEDs don't have the capability
to configure the LED brightness but only the channel/color levels.
Their drivers may only implement the set_color callback.
That's why this patch makes the blink and set_brightness LED API
callbacks optional.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The led_set_color syscall adds support for multicolor (i.e.
multi-channel) LEDs to the LED API. It allows a user to set all the
colors/channels of a LED at once by passing a color array. Note that
this array must provide an entry per color/channel and must also be
ordered following the color mapping of the LED. This color mapping can
be either retrieved from the "color-mapping" DT property or from the LED
driver itself (by using the led_get_info syscall).
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
When supported by the driver the led_get_info syscall allows a user
to retrieve the following information about each LED available:
- The LED label.
- The number of colors/channels.
- And for a multicolor LED a pointer to a channel-color mapping.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
Actually the LED API functions are handling channel objects. The "led"
parameter passed to the functions is defined as a channel number. This
patch redefines it as a LED number instead.
Note that this patch doesn't change anything for the drivers handling
mono-color (or single channel) LEDs. For the drivers handling multicolor
(or multi-channel) LEDs, such as the lp5562, then the API is broken.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The led-controller DT binding gathers some common properties for LED
controllers and for the LED child nodes.
One notable property is "color-mapping" which allows to define a channel
to color mapping for multicolor LEDs.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
Some ARMv8-M platforms may come with only 8 (instead of 16)
MPU regions. In these platforms, by design, a memory domain
may contain up to 2 application memory partitions, when we
build with MPU_GAP_FILLING support. To be able to test this
valid configuration we slightly modify the test code in the
mem_protect suite, and add-remove the second partition (with
index-1) instead of the third (index-2).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We need to exclude the .gap_filling test from running on
ARMv8-M platforms with 8 MPU regions available, since the
userspace test defines and uses a memory domain whose number
of partitions exceed the maximum number of permitted partitions
in ARMv8-m SoCs with MPU_GAP_FILLING=y.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Remove non necessary eswifi lock/unlock in read procedure (eswifi
lock support nesting).
Return NULL packet in case socket is closed by remote (tested with
net shell and net recv).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Update the hal_nordic module revision, to prevent implicit-fallthrough
warnings reported in sanitycheck.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is needed for sanitycheck hardware maps which take the serial
number directly from USB metadata.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
In case optional timings property has been defined in DT, let's use it
and look for a matching peripheral clock and i2c bus clock so that
timing value is used instead of using runtime algorithm.
If matching the current configuration, the value will be set directly to
the I2C_TIMINGR register through the LL API.
This property is only valid for I2C V2 peripheral, so the timing config
structure member is only added in case of CONFIG_I2C_STM32_V2. Also the
initialization of the member is done conditionnaly, only in case
it is defined in DT, otherwise timings table will be empty.
Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
By default the I2C timing (I2C_TIMINGR register) of I2C V2 peripheral is
computed depending on clocks at runtime with relatively low precision.
This optional property allows to provide a list of pre-computed values
(typically computed from STM32CubeMX SW tool) instead of using runtime
algorithm.
The precomputed value is only valid for a given clock configuration and
I2C speed setting, so this valid configuration is provided with each
value entry.
Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
Adding the first list item in the same line as @details, creates a list
with a single item inside a paragraph, and another list with the
remaining items. What is wanted here is to have a single list with all
items, so the first item needs to be in a new line.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
enable CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY:
In function `bt_le_oob_get_local':
subsys/bluetooth/host/hci_core.c:8878:
undefined reference to `bt_smp_le_oob_generate_sc_data'
Signed-off-by: chao an <anchao@xiaomi.com>
This fixes an error introduced in commit
9b2e9eda89
It seems that in a couple of instances, the "_VAL" suffix was
forgotten. One of these broke the le-audio build.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Whenever we have an error in the script, exit immediately and avoid
confusing unrelated messages about disk space and such.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year. The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.
All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible. No in-tree devicetree files make use of this
driver.
Remove the confusion about which driver to select by removing the
unmaintained redundant driver.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Depending on how people set up their Python, west might not be on
PATH.
I'd like to have a special-purpose step by step guide for how to
handle this in the documentation to save support time when this
happens. I think it's worth special casing since west is the first
runnable program that pip installs onto a new user's system when
they're following the GSG.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add CONFIG_NET_CONFIG_AUTO_INIT=y to enable the bluetooth
device network interface.
Due to #27405 feature PR allowing application to init the network
whenever it wants, IPSP sample stopped initing the
bluetooth network.
The IPSP sample was not updated to enable
CONFIG_NET_CONFIG_AUTO_INIT in prj.conf
and didn't call net_config_init_app(...)
as suggested in the feature PR.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>