Replaces the Mesh model settings_commit callback with a start callback,
indicating that the mesh model behavior is ready to start. Everything
that was previously done in the settings_commit callback may be moved to
this callback, which gets called just after mesh settings are committed,
instead of in the middle of the process.
This resolves an issue where models had no context in which to start
their behavior, as the previous settings_commit call fired before the
mesh was declared valid, making access APIs inaccessible.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Current implementation of application's cfg_write callback only has the
possibility of returning boolean status, which in case of failure only
allows for one error code; BT_ATT_ERR_WRITE_NOT_PERMITTED.
This change makes the application able to add own security check on
characteristic subscription in the cfg_write callback and report a more
relevant error code (e.g. BT_ATT_ERR_AUTHORIZATION).
Signed-off-by: Kim Sekkelund <ksek@oticon.com>
Remove toggling the advertise enable state when the advertiser name has
been updated. Advertise and scan response data should be used by the
controller on subsequent advertising events.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Prior to this you would get compilation error when building
samples for the nrf5340_dk_nrf5340_cpuappns board.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Gets these commits in:
check_compliance.py: Detect refs to undef. symbols in samples and
tests
Extend the check for references to undefined Kconfig symbols to also
detect undefined symbols in samples and tests.
Samples and tests were skipped due to using separate Kconfig trees,
which hid the symbols defined in them. Work around it by grepping
for Kconfig symbol definitions in them instead.
Keep properly parsing the main Kconfig tree, as it's needed to see
symbol names that are stitched together with the Kconfig
preprocessor.
------------------------------------------------------------------
check_compliance.py: Detect bad header comments and other nits
Add a generic kitchen-sink Nits test for various minor nits that
aren't already covered by tools like checkpatch.pl and pylint. So
far checks this:
- Header comments in Kconfig files
- Missing newlines at the end of various source files (probably a
bad editor setting)
- Leading/trailing blank lines in files
------------------------------------------------------------------
check_compliance.py: Kconfig: Flag redundant $ZEPHYR_BASE in
'source'
'source's like
source "$(ZEPHYR_BASE)/Kconfig.zephyr"
can be simplified to
source "Kconfig.zephyr"
since $srctree already points to the Zephyr root.
Flag it in the Nits test.
This also avoids absolute paths showing up in some places.
------------------------------------------------------------------
check_compliance.py: Improve error reporting for Git commands
Similar improvements to
https://github.com/zephyrproject-rtos/zephyr/pull/21577. No custom
potentially-missing working directory is used here, but always
including the exception message still feels more robust.
Use err() instead of sys.exit() in git(), and have it include the
command name, which is helpful in logs.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit adds support for the on-board flash MX25R8035F that is
directly connected to the efr32fg soc.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
This commit adds support for the on-board flash MX25R8035F that is
directly connected to the efr32mg soc.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
This commit adds SPI driver and its bindings using the USART peripheral
for Silicon Labs EFM32 and EFR32 MCUs.
Signed-off-by: Christian Taedcke <hacking@taedcke.com>
calling UARTE power management with DEVICE_PM_SUSPEND_STATE
then DEVICE_PM_OFF_STATE causes a deadlock in while loop.
It waits for an event witch never comes
Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
This commit relocates the exception vector table address range
configuration routine that was previously implemented as part of
Cortex-R architecture reset function to SoC platform-specific
initialisation routine.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit addresses the following issues:
1. Add a new Kconfig configuration for specifying Dual-redundant Core
Lock-step (DCLS) processor topology.
2. Register initialisation is only required when Dual-redundant Core
Lock-step (DCLS) is implemented in hardware. This initialisation is
required on DCLS only because the architectural registers are in an
indeterminate state after reset and therefore the initial register
state of the two parallel executing cores are not guaranteed to be
identical, which can lead to DCCM detecting it as a hardware fault.
A conditional compilation check for this hardware configuration
using the newly added CONFIG_CPU_HAS_DCLS flag has been added.
3. The existing CPU register initialisation code did not take into
account the banked registers for every execution mode. The new
implementation ensures that all architectural registers of every
mode are initialised.
4. Add VFP register initialisation for when floating-point support is
enabled and the core is configured in DCLS topology. This
initialisation sequence is required for the same reason given in
the first issue.
5. Add provision for platform-specific initialisation on Cortex-R
using PLATFORM_SPECIFIC_INIT config and z_platform_init function.
6. Remove seemingly pointless and inadequately defined STACK_MARGIN.
Not only does it violate the 8-byte stack alignment rule, it does
not provide any form of real stack protection.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Removed in commit 0eb6ffa3e9 ("logging: kconfig: Remove legacy SYS_LOG
symbols").
Detected by an improved CI check that also checks samples and tests.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
As of January 2020, David is no longer working on the Zephyr
documentation, so he should not be automatically added as reviewer.
I've commented out rather than removed the lines so when a replacement
is found, the lines can easily be added back.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add board support files for mimxrt1010_evk, the development board for
i.MXRT1010 (CM7) SoC.
- Add pinmux, dts and doc.
- Tested samples: hello_world, philosophers, synchronization,
basic/blinky, basic/button.
Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
This commit restores the old behaviour of locating Zephyr modules under
CMAKE_BINARY_DIR instead of CMAKE_CURRENT_BINARY_DIR during building of
Zephyr modules.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
stderr from the binary handler (native_posix for example) was redirected
to the logger as errors, this is confusing the console and users, so
remove this.
Fixes#21784
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
EEPROM simulator and native_posix have been unified to one solution,
the old eeprom,native_posix is removed.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Add support for a eeprom simulator. The PR limits the addition to
qemu_x86 but it can easily be added to other devices by defining the
eeprom simulator in the dts and setting 'CONFIG_EEPROM_SIMULATOR=y'
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If bt_gatt_subscirbe fails value_handle must be reset since otherwise it
will not possible to subscribe again as the parameters will be consider
in use.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This further reduce the overhead on each subscription at expense of
having a dedicated array to store subscriptions, the code now maintain
a separate list for each peer which should also scale better with large
number of subscriptions to different peers.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This should reduce the footprint on applications that do a lot of
requests i.e have a lot of subscriptions.
Fixes#21103
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In STM32 flash driver, don't use semaphore if multithreading
isn't defined.
If multithreading isn't defined, a call to sem_give function
generates a hardware fault exception.
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
The _thread_idx_map bitfield which has '1' set for free
thread indexes really needs to live in the
data section reserved for kernel object metadata, as this
is a part of memory that is allowed to shift addresses
between zephyr_prebuilt.elf and zephyr.elf.
However, if an application defines enough static threads
that there are no free indexes, the entire bitfield will
be zeroed and the bitfield will end up in the main BSS
section.
Force this data to always be in the .kobject_data.data
section regardless of its contents.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add sample for reading the temperature of a 3-wire PT100 sensor using
the Texas Instruments LMP90100 Sensor Analog Frontend (AFE) Evaluation
Board (EVB) shield.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add shield definition for the Texas Instruments LMP90100 Sensor Analog
Frontend (AFE) Evaluation Board (EVB).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add driver for the Texas Instruments LMP90xxx series of multi-channel,
low-power 16-/24-bit sensor analog frontends (AFEs).
The functionality is split into two drivers; an ADC driver and a GPIO
driver.
Tested with LMP90080 and LMP90100.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Improve positioning of tracing calls. Avoid multiple calls and missing
events because of complex logix. Trace the event where things happen
really.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If the working directory for a command was missing (usually due to
forgetting to run 'west update'), you'd get a FileNotFoundError
exception along with a cryptic error like
'git' not found
Only catch OSError instead (which is a base class of FileNotFoundError),
and always show the exception message. It makes it clear that it's the
working directory that's missing.
Add some other misc. improvements too:
- Turn stderr output from external commands into a warning instead of
an error
- Add err() and warn() helpers
- Include the command name in messages
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fix controllers address check in cases of controller-based privacy.
When controller has been instructed by the host to use privacy
the controller should look up the peer identity address and generate
an address based on the local IRK. In the case where no match
is found or the local IRK is all zeroes the controller shall use
the fallback address. If the fallback address is not valid the
controller shall return invalid params.
This commit fixes these issues:
- Starting a private advertiser without valid random address set
but a valid local IRK exists. In this case the advertiser should
be able to advertise using the RPA regardless of a valid random
or public address.
- Starting a private advertiser with a fallback to the public
address type or an adveriser using public address does not
check if a valid public address exists. The host cannot
advertise with an all-zero public address.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Turn the CONFIG_* identifiers in the /chosen table into links to the
Kconfig reference.
Also explain why devicetree information doesn't show up in the Kconfig
reference.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
It's cryptic that some identifiers for devicetree-related stuff start
with DT_*, while others start with CONFIG_*. Explain what's going on,
and link to the Kconfig preprocessor documentation.
Also remove an early mention of bindings that might be confusing.
Bindings are much more about checking devicetree conformance than about
controlling output, though they do some of that too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>