This commit removes the CMakeLists.txt file for the stale 'random'
driver sample.
The 'random' driver sample was previously renamed to 'entropy'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Before we try to set IP addresses to the network interface,
make sure that the interface is up.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add build time check that guarantees that iface_api struct is the
first entry inside L2 driver data. This makes sure we do not miss
a case when the ordering of the fields in the struct is changed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The definition was removed in commit 7ccc7889fa ("logging: Remove
SYS_LOG implementation").
Adding detection of unused symbols in samples and tests to CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Basic tool to help checking Kconfig options against a list of
hardening preferences.
This tool is available as a kconfig target, so to run it:
make/ninja hardenconfig
[Flavio Ceolin: Simplify logic and fix python lint issues]
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The implementation did not account for the incrementing the reference
count past the maximum positive value. Doing so on a signed integer
results in undefined behavior. Switch to an unsigned integer where
such an increment results in a zero count, and add an assert that this
has not happened.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When items were removed from the list there was not lock which may
lead to race condition and list corruption. Extracted list handling
into external function.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
If clock started immediately after requesting then request was
not yet placed in the list and user callback was not called.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The original v1.3 had MMA8653+MAG3110, but v1.5 has verified LSM303AGR
and theoretical FXOS8700. Add the v1.5 variant 1 nodes in disabled
form; they can be enabled through overlays.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
In order to enable sample to be run and evaluated in sanitycheck,
add a harness_config to validate sample output:
- Add "regex" to match on sample output
- Add "timeout" to save some time when debugging
- Add "ordered" instruction. Since sample is running a while loop
test verdict can potentially be computed on previous run output,
issuing a wrong status.
Last, since sanitycheck regex does not play well them, rework
sample to output without parenthesis.
Tested on disco_l475_iot1
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Document this behavior. This partially addresses #20708, but we'll
have to deal with driver bugs case by case now that the desired
behavior is clear.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Erroring out for 'status = "ok"' broke backwards compatibility for a
downstream project. Accept it instead.
Maybe the error could be selectively re-enabled later.
The rest of the code only checks for 'status = "disabled"' (like the old
scripts), so no other updates are needed.
(It's a bit weird that we duplicate the property check in base.yaml.
Thinking of including base.yaml implicitly. Could clean things up then.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit renames two defines:
CS_INTERFACE -> USB_CS_INTERFACE_DESC
CS_ENDPOINT -> USB_CS_ENDPOINT_DESC
in order to match current naming convention when it comes
to descriptors fields.
All relevant files are updated to match renamed macros.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Some of defines are present in several header files.
Those defines are the same with value but with different naming.
Common defines are brought to usb_common.h
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Upper layers like OpenThread expect the radio driver to forward ACK
frame received by the radio.
Simulate this behavior on kw41z by recreating the ACK frame from the
available data.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
echo_client and echo_server configuration for 802.15.4 and OpenThread is
covered by overlay files and default board configuration. Board-specific
configuration for frdm_kw41z was redundant in this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Allow to select Sleepy End Device, and configure it during OpenThread
initialization.
According to Thread Specification, Sleepy End Devices should always
attach to the network as SED, to indicate increased buffer requirement
to a parent. Therefore, we reconfigure the Link Mode on each boot.
Note, that Poll Period value is not stored in the persistent storage,
hence we also need to initialize it on each boot.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
OpenThread radio layer did not implement `ieee802154_radio_handle_ack`
API and provided fake ACK frame to the OpenThread.
This prevented proper Sleepy End Device operation, as it expects to
receive information in the ACK whether it should wait for more data to
come or should it put the radio to sleep.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
nRF5 driver did not utilize `ieee802154_radio_handle_ack` API, therefore
did not provide ACK frames to the upper layer. This commit fixes this
problem.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There is no code to handle __syscall_inline so it is better removing
it from doxygen and checkpatch.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add support for the built-in Programmable Interrupt Controller
found in the SweRV EH1 RISC-V CPU
Signed-off-by: Olof Kindgren <olof.kindgren@gmail.com>
Use the folder the config file is in as an additional search directory
for openocd. This way additional files, like custom debug interface
files can be put in the support folder of a board and the openocd.cfg
can use them.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
This adds a README.rst for the UP Squared board GPIO counter sample
using details in the application source code and giving context.
This offers overview, requirements, and instructions to build and
flash, in complement to the cited reference.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The start/stop functions do a whole pile of supervisor-
only stuff; resolve this by making them ztest-specific
system calls.
Fixes: #20927
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is causing problems, as if we create a thread in
a system call we will *not* be using the kernel page
tables if CONFIG_KPTI=n, resulting in a crash when
the later call to copy_page_tables() tries to initialize
the PDPT (which is in the same page as the privilege
stack).
Just don't fiddle with this page's permissions; we don't
need it as a guard area anyway since we have a stack
guard placed immediately before it, and this page
is unused if user mode isn't active.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Created MEC1501 deep and light sleep example for MCHP MEC1501.
Modifications were made to SoC, board, timer, and hello world
sample program. Power management split into SoC power
implementing the interface and device power for device specific
logic.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Extended flash simulator for posix architecture to read/write data
from a binary file on the host file system.
Further enable the flash simulator by default on native_posix(_64)
boards and updated the documentation accordingly.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
The counter driver tests have been updated so the driver needs
to be updated too.
() Test expects a free running counter.
() Test expects any alarms cannot be set beyond the top value.
() Also, the counter only triggers interrupts when counter reaches
zero (as configured as counting down), it can be do relative
alarms. So return -ENOTSUP when absolute alarms are requested.
() The test expects the callback to be removed once alarm is
triggered. Implement this too.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The sensor API returns the temperature in celsisus degree. The Bluetooth
temperature characteristics uses M = 1, d = -2, b = 0, which corresponds
to a resolution of 0.01 degree. This means that the value returned by
sensor_value_to_double has to be multiplied by 100.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The mesh_badge sample uses a GATT Characteristic instead of a Mesh
Device Property to report the temperature. In addition to that the
status message is filled with with a GATT Unit instead of a the Mesh
Device Property.
Fix that by reporting a Present Device Operating Temperature, ie 0x0054
instead. This has the advantage of keeping the an s16t value to report
the temperature. This however change the marshalled format from B to A.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
When the value of an unknown sensor property ID is requested, the length
field should represent the value of zero, as explain in the comment in
sens_unknown_fill. However the marshalled representation of a zero
length is wrong in the code. The format A uses a 1-based uint4 length
value, so the range 0x0–0xF represents the range 1-16. The zero length
is represented by format B using the 0x7F value.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
We remove the custom fixed MPU region definition from ST
STM32 SoC definitions, as the common fixed MPU
region definition is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We remove the custom fixed MPU region definition from ARM
- Beetle
- Musca_a
- Musca_b1
- MPS2 (an385 and an521)
SoC definitions, as the common fixed MPU region definition
is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We remove the custom fixed MPU region definition from Silicon
Labs exx32 SoC definitions, as the common fixed MPU region
definition is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
For the NXP Kinetis SoCs with the NXP MPU regions, we keep
the confiruation of the fixed SoC MPU regions at each SoC
definition.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We remove the custom fixed MPU region definition from NXP IMX
RT, Kinetis, and LPC SoC definitions, as the common fixed MPU
region definition is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We remove the custom fixed MPU region definition from Atmel
SAM SoC definition, as the common fixed MPU region definition
is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We remove the custom fixed MPU region definition from Nordic
nRF SoC definition, as the common fixed MPU region definition
is now used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We move the configuration of the fixed MPU regions for ARM
Cortex-M SoCs in a common place under soc/arm/common/cortex-m,
instead of having this configuration present in each ARM SoC or
SoC Series definition. The rationale behind this is that for all
SoCs the fixed MPU regions configured at SoC definition are only
used for enforcing default Flash and SRAM access policies, and
currently, this is common to all ARM SoCs with MPU support.
We also simplify the Flash and SRAM MPU region definition,
aiming at using a single MPU region index to program each
of them.
We still support the possibility for ARM SoCs to opt-out and,
instead, define their own custom fixed MPU regions at SoC
definition. We do it using a Kconfig option, introduced
explicitly for this purpose.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Put a short Kconfig overview on the index page that links to the other
Kconfig documentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a new 'Setting Kconfig configuration values' page in the new Kconfig
section in 'User and Developer Guides'. Move all the information on
setting Kconfig symbols from 'Application Development' and the board
porting guide into it. The same page now covers both configuration files
and Kconfig.defconfig files.
Add links to the new page in various places to make it easy to find.
Also add some more references to the top-level Kconfig page and other
Kconfig pages.
A lot of stuff was rewritten while moving it over (the CONF_FILE
documentation has been cleaned up in particular). Some new information
has been added as well, like a tip re. minimal configurations being
helpful when making Kconfig settings permanent, and a warning re.
dependencies being ORed rather than ANDed when defining a symbol in
multiple locations.
Fixes: #20915
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The SOC Definitions section had backslashes before * in globbing
'source's.
Also change the language for the code block from 'console' to 'none'.
Kconfig isn't shell.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Move the documentation for the menuconfig and guiconfig interfaces from
Application Development to a new Interactive Kconfig Interfaces page in
User and Developer Guides.
Also tweak Application Development to mention the configuration
interfaces earlier. It's good to encourage people to try things out in
menuconfig, because dependencies often get lost when people seldom run
it and just hand-edit files.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The Kconfiglib Kconfig extensions are documented in the porting guide,
which is a pretty weird place to document them. Document them under a
new page in the Kconfig section of User and Developer Guides instead.
Also remove the section about the old Zephyr Kconfig behavior for
defaults (tried last-to-first instead of first-to-last). The behavior
was changed 16 months ago (and was undocumented before that), so it
might not be that useful to mention anymore.
Piggyback misc. small language cleanups and organization nits.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Touch up the Kconfig preprocessor function documentation a bit and add
some more details to the example. Use the Kconfig preprocessor call
syntax instead of Python syntax in the function synopses.
Also move the preprocessor docs to a separate page, and add a top-level
Kconfig section to User and Developer Guides that links to the Kconfig
tips page and the preprocessor page.
Trying to avoid the Kconfig tips page becoming a dumping ground for
random Kconfig documentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>