This commit introduces EXTRA_CONF_FILE and deprecates OVERLAY_CONFIG.
It has often caused confusion that OVERLAY_CONFIG adds extra
configuration fragments to the value of CONF_FILE (default: prj.conf),
but the similar named variable DTC_OVERLAY_FILE replaces the default
dtc overlay file used by the build system.
To remove such confusion, this commit introduces the EXTRA_ prefix in
front of CONF_FILE to clearly indicate it's purpose.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit extends zephyr_get() to support multiple variable names to
be fetched into a single variable.
Example:
zephyr_get(FOO VAR FOO_A FOO_B FOO_C)
will lookup each FOO_A, FOO_B, FOO_C for supported scopes and return
the value in FOO of the first scope encountered having one of the
variables defined.
If MERGE is specified, then all scopes for all vars are looped and the
variable values are merged into FOO and returned.
This functionality will allow to deprecate user-facing settings while
ensuring that both the new and deprecated variables are considered
in zephyr_get() and also taking into consideration the scope with
highest precedence.
This allows Zephyr CMake to do:
zephyr_get(FOO VAR FOO DEPRECATED_FOO)
zephyr_get(BAR MERGE VAR BAR DEPRECATED_BAR)
This allows support of old and new setting for a given number of
releases.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This is usually needed for reliable SPI communication when SCK
frequency is >= 4 MHz, so make it the default setting.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- remove deprecated `label` properties
- add `spi-flash0` alias
- correct `sfdp-bfp` property value to reflect exactly what is returned
by the flash chip
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Changes the warning from being text in Kconfig for filesystem
management as a whole to being a cmake warning which is displayed
if the user has not enabled file access hooks with a link to the
documentation on how to set them up.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add a config to decide if a new dedicated thread for Host Command is
created during initialization.
If not, the ec_host_cmd_task has to be called by another thread to
handle host commands.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Add a new _test_ that is used to build all regulator drivers. SoC
regulators, such as Raspberry Pi Pico core supply are excluded as they
are typically built as part of the platform.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The mcumgr subsystem as a whole is already maintained by @nordicjm
(#57780) and I am no longer actively using mcumgr, so removing myself
from the equation and letting more capable hands take over.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
The function nrf_reset_network_force_off contains workaround for
errata 161 for nRF5340 SoC. This function should be used instead of
manual writing to NRF_RESET->NETWORK.FORCEOFF register.
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
The command at most takes 11 args. argc = num of args + 1 (command
name) => 12. We substruct 3 from argc (cmd name, mod id, addr). This
gives argc = 9 when all args are provided for vendor model.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Shield's Kconfig.defconfig files should only be used to configure
components options, or drivers specific (eg init priority, ..), depending
on driver activation which remains application responsibility.
High level components (such as DISPLAY) should not be enabled by default on
boards activation (which is similar to policy used for boards).
Additionally, clean up busses activation (SPI, I2C), which is not required
as bus activation is already done automatically on bus devices activation.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Before Kconfig clean up to be performed in boards/shields, update samples
to enable the components they require.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
If an operational amplifier is used on the DAC output it is
preferrable to disable the DAC output buffer.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Make it possible to be able to change speed and duplex for the
STM32H7xx and API_V2 from the configuration settings.
This exists for the non-STM32H7x already today, so this is basically
copying the code for the other STM32's.
Please note that ST has a series incompability. For F1 and F2,
the duplex settings are named ETH_MODE_FULLDUPLEX respective
ETH_MODE_HALFDUPLEX. For F4, H7 and F7 the duplex settings are named
ETH_FULLDUPLEX_MODE respective ETG_HALFDUPLEX_MODE.
This should really be queried from the PHY (as previous programmer have
written in the code). But while waiting for a proper PHY solution,
this is intended as a stop-gap solution.
Signed-off-by: Stefan Petersen <spe@ciellt.se>
Since aadca692b3
the board code already sets the stdout/err buffering,
even if there is no console driver;
So there is no need to set it also in the console driver.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The scope for the burst number for tx and rx is currently at module
level in both lll_central_iso.c and lll_peripheral_iso.c
This PR puts the scope to the lll level
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Minimal requirements for nanopb were not accurate
to allow its usage (and causing related tests to build fail).
This change updates requirements for protobuf (>=3.20.3) and
grpcio-tools (>=1.47.0) to use protocol buffer.
Fixes#56103
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Chain-load images might behave differently comparing to the usual
standalone boot, as for example some peripheral initialization
might be done already.
Add an additional test with CONFIG_ASSERT=y as enabled asserts
could break up chain-loaded image.
Signed-off-by: Denis Mingulov <denis@mingulov.com>
It is possible that stm32_clock_control_init function is started
when the image is chain-loaded and hardware clocks are already
initialized to some state (PLL1).
Currently due to an assert in get_startup_frequency function
(which will trigger k_fatal_halt) the boot will stop on the
early stage if CONFIG_ASSERT=y. This is reproducible for example
with standalone MCUboot and TF-M with MCUboot.
Fixed by adding support for HSE and PLL1 clock sources at
get_startup_frequency.
Signed-off-by: Denis Mingulov <denis@mingulov.com>
This adds code to always map data TLB for VECBASE so that
we would be dealing with fewer data TLB misses during
exception handling. With VECBASE always mapped, there is
no need to pre-load anymore.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the TLB miss handling to the C exception handler.
This also allows us to handle page faults (for example,
unmapped pages) during this time as any more exceptions
handled in the C handler will not trigger the double
exception handler but the same C handler.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Instead of being able to arbitrarily set the PTEVADDR for page
table, this provides choices (currently just one). This is in
preparation to enable handling memory management exception in
C code. For that to work, we will need to pre-load the page
table address (PTEVADDR) for the memory page containing
exception code and data (containing jump addresses), and
various stacks. This is to prempt any TLB misses during handling
the level 1 interrupt code. If a TLB miss is encountered during
handling of level 1 interrupt, we will be thrown into double
exception handling code where we will get stuck in infinite
loop. However, in order to pre-load the page table entries,
PTEVADDR needs to be calculated. This requires the use of
PTEVADDR base which cannot be loaded via l32r, as we may cause
a data TLB miss. So we must be able to grab the PTEVADDR base
address strictly within code, and must be without any data
load. So changing CONFIG_XTENSA_MMU_PTEVADDR to be based on
choice so we can have pre-defined bit shift value for shift
operation. This shift value will be used in exception handling
code.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add a build option to tell if memory should be mapped in cached
and uncachedr regions.
If the memory is neither in cached nor uncached region it is not double
mapped.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
z_page_frame can't be packed on Xtensa due memory alignment
constraints. When this is struct is packed it is 5 bytes long it will
cause an memory alignment problem on Xtensa.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Initial support for Xtensa MMU version 3. It is using a two level page
table based on fact that the page table is in the virtual space. Only
the top level (page directory) is wired mapped in the TLB to avoid
second level page miss.
The mapped memory is completely fragmented in multiple sections, maybe
we find a better way in future.
The exception handler is where we effectively map the memory, the way it
works is:
1) SW try to access some memory address
2) The address is not mapped, so the MMU will try the auto-refill,
looking the page table
3) The page table contents is not mapped (remember, just the top-level page
is mapped)
4) An exception will be triggered, in the exception we try to read the
portion of the page table that maps the original address
5) The address is not mapped, so the MMU will try again the auto-refill.
This time though, the address is mapped by the top level page that is
properly mapped. (The top-level page maps the page table itself).
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add enabled vbat node for all boards of supported STM32 SoC series which
have the required adc node enabled.
Add volt-sensor alias pointing to said vref node.
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
Add enabled vref node for all boards of supported STM32 SoC series which
have the required adc node enabled.
Add volt-sensor alias pointing to said vref node.
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
Add new vref node to the DTS definitions of supported SoCs.
Extend DTS ADC channel properties where missing.
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
Add VREF+ sensor driver and DT node definition.
This driver allows determining the actual voltage applied to an SoC's
VREF+ pin, by comparing the VREFINT internal bandgap voltage reference
with its factory calibration data.
In packages where VREF+ is bonded to VDDA, this permits direct measurement
of VDDA voltage.
Signed-off-by: Kenneth J. Miller <ken@miller.ec>
Since f5830f3c3f, running tests with no optimization has to be confirmed
by setting ZTEST_ALLOW_NO_OPTIMIZATIONS. This is normally done on a per
test basis, but since nrf52_bsim disables optimizations in the
defconfig, the default option has to be flipped at board level so that
every test for this board builds correctly.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Unlike tracing module mainly for debug usage, this is
to allow runtime profiling IRQ performance data, and
target to enable it in product release since platform
can choose to make it work with low weight protocol.
Enable this option and implement runtime_irq_stats()
in platform code, such as Intel ISH platform implement
with SHMI protocol to allow host profiling irq stats.
Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
Many tests are known to fail when built and no compiler optimizations.
Add a CMake check to error out when building a ztest based test with no
optimization, ask not file issues about it but also adds an opt-out
option to bypass the error for tests are actually designed to work in
this setup.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
After generating a hardware-map a platform field is marked
as 'unknown'. If it is not changed, do not process them
when running --device-testing.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The previous counter documentation said:
> Absolute alarm cannot be set further in future than top_value
> decremented by the guard period. Relative alarm ticks cannot
> exceed current top value (see @ref counter_get_top_value).
And further down:
> Absolute value cannot exceed: (now + top_value - guard_period)
> % top_value.
The first documentation snippet is not wrong but may be confusing.
On casual reading one might assume that the absolute tick value
should not be set above top minus guard. Users have to understand
driver internals to follow that explanation.
The second documentation snippet is only correct when counting
downwards (which several drivers don't). When counting upwards,
the given formula is wrong.
This commit improves and corrects the documentation.
Fixes: #57594
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This change introduces test coverage for payload length calculation
to stabilize the change introduced earlier and ensure that future
changes will not cause regressions in that area.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The current implicit MAC payload length algorithm (based on
an otherwise irrelevant footer pointer) produces invalid
(non-standard) values for beacon and command frames.
This change produces standard-conforming MAC payload length
values and simplifies access to payload length.
It would have been possible to fix the current footer pointer
based approach but there are arguments in favor of the new
approach:
- The footer pointer is used nowhere in the current code
base and makes length calculations rather non-obvious.
- The new approach does not use more memory and is easier
to understand and use.
- This change is a first step to support of IEEE 802.15.4
information element (IE) support. At a later stage the
distinction between MAC payload length and frame payload
length will be introduced and become relevant to
distinguish between header and payload IEs. At that point
the current implicit length calculation algorithm will
break down anyways.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>