KCONFIG_TURBO_MODE being twisted up in the normal logic made the code
hard to follow and change.
Use a separate write_dummy_index() function for KCONFIG_TURBO_MODE
instead, and add more documentation for it. Also get rid of options.rst
and just write all the symbol link targets directly to the dummy index
file, which is a bit simpler.
As a small piggybacked improvement for default values, make the heading
'default' instead of 'defaults' when there's only one. The menuconfigs
do this too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Immediate logging is not compatible with the software-based controller
due to the additional ISR latency that it introduces. Ensure that
deferred logging is in use whenever using the software-based LL.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Disable the CONFIG_TEST_LOGGING_DEFAULTS Kconfig option which forces
immedate logging, since that is not compatible with Bluetooth and its
tests.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The log mechanism, even in immediate mode, adds somewhere
between 1K-2K of footprint to applications that use it.
We want to standardize the logging APIs for all logging
within the kernel, but need to not let platforms with
very constrained RAM/ROM in the dust.
This patch introduces CONFIG_LOG_MINIMAL, which is a very
thin wrapper to printk(). It supports the APIs expressed
in logging/log.h.
This will be the new default for test cases.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These checks should be against CONFIG_SHELL_LOG_BACKEND,
and not against CONFIG_LOG, since it's possible to enable
logging without building this particular backend.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* the old codes may not save the caller saved regs correctly,
e.g. r7- r12. Because the sys call entry is called in the form
of static inline function. The compiler optimizations may not save
all the caller saved regs.
* new codes use the irq stack frame as the sys call frame and gurantee
all the called saved regs are pushed and popped correctly.
* the side effect of new codes are more stack operations and a little
overhead.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
usb_handle_bos() and usb_handle_os_desc() are got invoked from
usb_handle_standard_request(), remove those unneeded logs.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The CMake documentation for 'project' states "Call the project()
command near the top of the top-level CMakeLists.txt". Meaning, it
should be run as early as possible.
An obscure internal error was observed when 'project' was located in
zephyr/CMakeLists.txt and was observed to be fixed after moving
'project' earlier, hence this patch that moves it earlier.
Invoking project depends on knowing information about the toolchain so
it is placed after target_toolchain.cmake.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
By default only one listener is enabled, but if user specifies
CONFIG_NET_SAMPLE_NUM_HANDLERS with value larger than 1, then
multiple threads are created, and each will be able to accept
connections.
Fixes#19374
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Kconfig does not set SETTINGS_NONE as default backend (meaning no
backend) because SETTINGS_NONE is optional. There is no difference
between SETTINGS_NONE and SETTINGS_CUSTOM. By removing the optional line
SETTINGS_NONE is selected as default, to use a custom backend
SETTINGS_CUSTOM=y must be set.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This makes it clearer that this is an API that is expected
to be implemented at the architecture level.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
All GPIOs except VCI pins come in default GPIO mode and input disabled
Need to explicitly enable input apart from setting direction.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
We now define z_is_idle_thread_object() in ksched.h,
and the repeated definitions of a function that does
the same thing now changed to just use the common
definition.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This takes an entry point and not a thread as argument.
Rename to z_is_idle_thread_entry() to make this clearer.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The main and idle threads, and their associated stacks,
were being referenced in various parts of the kernel
with no central definition. Expose these in kernel_internal.h
and namespace with z_ appropriately.
The main and idle threads were being defined statically,
with another variable exposed to contain their pointer
value. This wastes a bit of memory and isn't accessible
to user threads anyway, just expose the actual thread
objects.
Redundance MAIN_STACK_SIZE and IDLE_STACK_SIZE defines
in init.c removed, just use the Kconfigs they derive
from.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These are renamed to z_timestamp_main and z_timestamp_idle,
and now specified in kernel_internal.h.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This metric shows when the system first enters an idle
state, which has already been recorded in the arch-
independent implementation of the idle thread.
Only x86 was doing this.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is part of the core kernel -> architecture interface and
has been renamed z_arch_kernel_init().
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
z_set_thread_return_value is part of the core kernel -> arch
interface and has been renamed to z_arch_thread_return_value_set.
z_set_thread_return_value_with_data renamed to
z_thread_return_value_set_with_data for consistency.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
k_cpu_idle() and k_cpu_atomic_idle() were being directly
implemented by arch code.
Rename these implementations to z_arch_cpu_idle() and
z_arch_cpu_atomic_idle(), and call them from new inline
function definitions in kernel.h.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is part of the core kernel -> architecture interface
and is appropriately renamed z_arch_is_in_isr().
References from test cases changed to k_is_in_isr().
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is part of the core kernel -> architecture interface
and should have a leading prefix z_arch_.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Global variables related to timing information have been
renamed to be prefixed with z_arch, with naming arranged
in increasing order of specificity.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The realloc function was a bit too intimate with the mempool accounting.
Abstract that knowledge away and move it where it belongs.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add work-around for the NXP MCUxpresso SDK not exposing APIs for
setting the listen-only (LOM) bit of the FlexCAN MCR register and the
self-reception disable (SRXDIS) bit of the CTRL1 register.
These bits can only be written when the FlexCAN module is in freeze
mode. Add a set of simplified functions (not supporting errata 9595) for
entering/exiting freeze mode.
This work-around can be removed again once the NXP MCUxpresso SDK
exposes the needed functionality.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Handle case where:
- Peripheral sends security request after master has sent pairing
request or started encryption procedure.
This packet can be ignored, as long as the slave has not already
responded with pairing response.
- Central wants to start security after peripheral initiated security
request, return error code busy in this case
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move initiating security functionality and LTK requesting into the SMP
module so that SMP can track when the connection is in the encryption
process
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the bt_smp_keys_check function above all usage of the function
in order to avoid prototype declaration when making the function static.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Value MCHP_ADC_MAX_CHAN_MASK defined in microchip hal as
0x07u which is different method for mask calculation then used in Zephyr
API for 8 channels (MCHP_ADC_MAX_CHAN = 8).
Calculate bitmask ourselves using BIT_MASK().
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Removed unused peripheral tag and add drivers to
include test to drivers sanity check run.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Commit 223a2b950f ("mempool: move BUILD_ASSERT to the end of
K_MEM_POOL_DEFINE") left a redundant semicolon at the end.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
A few new contributors, after reading the uncrustify section
of the contribution guidelines, have decided to run
existing Zephyr files thru uncrustify, and include in commits
with minor fixes lots of styles changes.
This is something we do not want to encourage.
To avoid this, modify a bit the uncrustify section to
discourage people from doing just that.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Fix calling bt_hex and bt_addr_le_str multiple times in the same logging
call could result in string overwritten since log_strdup is not
guaranteed to duplicate the string buffer in all logging configurations.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>