This enables cmake extensions that can look up the path for any
devicetree alias, or check if the alias is missing, etc.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Using edt.chosen_nodes looks like a simple attribute lookup, but it's
actually calling a property that will create a new list of chosen
nodes every time. Apply a small optimization by only creating the list
once.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This adds an spi master mode driver via bitbanged gpio. Only syncronous
transfers are implemented. Clock signal timing is accomplished via busy
waits, the gpios are manipulated via the standard gpio interface; these
two factors limit the frequency at which it can operate - but here
a simple and generic implementation was chosen over performance.
The driver supports the various clock polarity and phase
configurations, and can also work with word sizes which are non
multiples of 8bits, currently up to 16 bits.
A sample program is also added demonstrating basic use of the driver
with 9bit data words.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
This commit implements west flash command for Telink B91 platform.
west flash command uses ICEman and SPI burn from AndeSight for flashing.
Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
We are reusing already checked out trees that might be in the middle of
a rebase or conflict. Remove files preventing us from doing another
rebase after the tree was reset.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We were missing smaller sets and skipping tests when the set is smaller
than the allowed number of tests per node.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Merge all results from all nodes and generate an HTML report and upload
it as an artifact for review of failures offline.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The macro Z_PROGBITS_SYM has "\%" but this is not correct
usage to escape "%". So remove the extra slash. Note that
this macro is used directly to generate assembly code
so it cannot be "%%" as in escaping "%" in printf().
Fixes#40439
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename PM_STATE_DT_ITEMS_LEN to DT_NUM_CPU_POWER_STATES to make its
purpose more clear. This macro could be made part of a Devicetree API
for PM in the future.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Rename the PM_STATE_DT_ITEMS_LIST macro to PM_STATE_LIST_FROM_DT_CPU to
make its purpose more clear. Similar naming scheme is found e.g. in the
GPIO API.
Associated internal macros and docstrings have been adjusted, too.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Rename the PM_STATE_INFO_DT_ITEMS_LIST macro to
PM_STATE_INFO_LIST_FROM_DT_CPU to make its purpose more clear. Similar
naming scheme is found e.g. in the GPIO API.
Associated internal macros and docstrings have been adjusted, too.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
PM_STATE_DT_ITEM could not be used as a standalone initializer since it
had a trailing ',', making it an internal helper in practice. This
change renames the macro to PM_STATE_DT_INIT, and moves the ',' to the
UTIL_LISTIFY helper.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
PM_STATE_INFO_DT_ITEM could not be used as a standalone initializer
since it had a trailing ',', making it an internal helper in practice.
This change renames the macro to PM_STATE_INFO_DT_INIT, and moves the
',' to the UTIL_LISTIFY helper.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use DT_PHANDLE_BY_IDX in the intermediate UTIL_LISTIFY helper so that
initializer macros receive the node with properties of intereset.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Make the timer drivers expression more generic to cover both
implementation and Kconfig files.
Missing drivers were added to pass compliance checks. Owners added based
on maintainership, driver author, etc.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
A couple of drivers violated MISRA 5.7 rule (Tag name should be unique),
triggering CI compliance errors.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
A Cortex-M specific function (sys_clock_isr()) was defined as a weak
function, so in practice it was always available when system clock was
enabled, even if no Cortex-M systick was available. This patch
introduces an auxiliary Kconfig option that, when selected, the ISR
function gets installed. External SysTick drivers can also make use of
this function, thus achieving the same functionality offered today but
in a cleaner way.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Remove the weak symbol definition
- Notify about the capability of disabling via a selected Kconfig option
(CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT)
- Provide a dummy inline function when the functionality is not
available
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Split Kconfig into individual files for each driver. This improves
overall readability of the Kconfig options.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The weak symbol sys_clock_driver_init has been removed, therefore moving
the init responsability to the drivers themselves. As a result, the init
function has now been made static on all drivers and moved to the
bottom, following the convention used in other areas.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Adds the ability for I2C drivers to report synchronous transfer stats
using a I2C specific macro to define the device instance.
The macro creates a container for device_state which allows for per
instance device class common data structure to be used in the device
class api (ex: i2c.h). This is used to maintain per driver instance
stats for all i2c drivers. This is a reusable idea across other device
classes as desired.
Using Kconfig device class stats may be turned on/off individually
this way as well, in this case I2C_STATS.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Checkpatch was checking for macro concats (##), however
we often use UTIL_CAT to allow for multiple macro expansion passes
to succeed.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Logging v2 supports 255 arguments but since logging v1 was supporting
only 15, and it is still compiled, more than 15 could not be used.
Extending logging v1 macro to accept up to 31 arguments. It will fail
during processing in case of v1 but will work with v2 enabled. It is
a temporary solution since v1 will be removed at some point.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Clang 12.0.0 complains about
"cast to smaller integer type 'enum control_method' from 'void *'
[-Werror,-Wvoid-pointer-to-enum-cast]".
Cast it to intptr_t type first.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
kconfiglib doesn't render backslashes in menu strings, and the prompts
in the module menu will be unintelligible on Windows. Print these
menus as posix paths on Windows as well, so they don't look broken in
menuconfig.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
data cache mode setup and enabling should be done only when
CONFIG_ESP_SPIRAM is enabled. Otherwise, memory layout will
conflict with defaults.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
MCUX PWM driver used hardcoded clock source. update driver to use clock
bindings to determine PWM peripheral clock frequency.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Adds optional device tree properties to insert delays between spi chip
select assert/deassert and the clock edges, and also between spi
frames and transfers to the mcux flexcomm spi driver. If the properties
are not set, no additional delay is inserted.
Verified expected behavior on mimxrt685_evk and check with a scope
that the pre- and post-delay could be changed from the device tree
properties.
Signed-off-by: Bryce Wilkins <bryce.wilkins@gmail.com>
As per the GATT documenation, the conn pointer may actually
be NULL in the notify callback, indicating that the connection
is being unpaired.
Add a check for conn == NULL to avoid calling bt_conn_index
on a NULL pointer.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes an issue on SOF-supported boards where the build system
incorrectly believed that the rimage target was changing when rerunning
CMake, even though the user did not change any configuration. This issue
was introduced in commit 525fa76f4d.
Create initial build dir:
$ west build --board intel_adsp_cavs18 samples/subsys/audio/sof
Re-run CMake with no arguments in that build dir:
$ cd build
$ cmake .
CMake Warning at /home/mhelm/zephyrproject/zephyr/cmake/extensions.cmake:2403 (message):
The build directory must be cleaned pristinely when changing rimage target,
Current value="", Ignored value="cnl"
Call Stack (most recent call first):
/home/mhelm/zephyrproject/zephyr/cmake/extensions.cmake:829 (zephyr_check_cache)
/home/mhelm/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs18/board.cmake:6 (board_set_rimage_target)
/home/mhelm/zephyrproject/zephyr/cmake/app/boilerplate.cmake:635 (include)
/home/mhelm/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/mhelm/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:5 (find_package)
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
If variable exit is not defined, the test is not properly executed.
Note that in case of an actual error the var would be defined and the
test executed properly.
Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
The pinctrl_soc_pin_t is used as an opaque type in pinctrl to store pin
configurations which are SoC dependent.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Only certain type of admonitions were styled (e.g. notes, warnings,
etc.). This change also styles generic admonitions such as:
```rst
... admonition:: Rationale
...
```
Fixes#40622
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The default config for cavs25 should be a 4 core config. Variants that
have less cores, need to override the config option to a smaller value.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
logging.log_msg2_64b_timestamp and logging.log_msg2_fp_64b_timestamp are
currently failing on qemu_cortex_a9 due to #39978. Disable them on that
platform until the issue is fixed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The UART1 is not actually accessible on the HiFive1 since the
QFN48 package for the FE310, used by this board, does not expose the
required pads. However, it is still possible to use the UART1 on HiFive1
emulators (e.g. using UART0 for debugging and UART1 for SLIP).
Unfortunately, the UART0 and UART1 currently have different default
configurations when it comes to the configured transmission watermark
(txcnt). With a txcnt of zero (the default for UART1) the UART is not
actually usable (see #18118). Contrary to UART0 (see #23699), the UART1
does therefore not work by default on Zephyr which took me some time to
figure out.
This commit aligns the default UART1 configuration with the UART0,
thereby making it work by default.
Signed-off-by: Sören Tempel <tempel@uni-bremen.de>
ARC_HAS_ACCL_REGS should set to y to protect ACCL and ACCH registers
during irq. These registers could be used as GPRs by compilers and
therefore need store/restore during irq.
Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
As described in #39978, an issue is currently preventing those tests
from executing correctly. Disable them until a fix is found.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Currently, can_configure() pass a hard-coded 0 for the data bitrate
(which is only used for CAN-FD), breaking this API for CAN-FD enabled
applications.
Instead pass in the provided bitrate for both arbitration phase and data
phase.
Fixes: #34375
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The can_configure() API call does not handle CAN-FD bitrates. Deprecate
the can_configure() API wrapper function in favour of the newer
can_set_bitrate() and can_set_mode() functions.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Switch from using can_configure() to using can_set_mode() for disabling
CAN controller transmissions.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The CCC update should be done after the connection is encrypted.
Before the connection is encrypted, the GATT Server does not know
if the reconnecting peer was actually bonded.
Fixes: #40759
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interfaces to other modules.
In this sample, it's better to put the shared variables in one place,
and provide the interfaces to other modules, such as app_a, app_b,
and main.
Signed-off-by: Paul He <pawpawhe@gmail.com>