Update methods used to include JS/CSS files, avoiding deprecated
versions the don't work on Sphinx>=3.x. The new methods work on both
Sphinx==3.x and Sphinx>=2.4.x.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
add argument --pre-script to specify a pre script. This will be
executed before device handler open serial port and invoke runner.
Currently, pre_script can only get from hardware.map file. just like:
./scripts/sanitycheck --hardware-map xxx.map
and set pre_script in xxx.map file.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
In some cases it might be a good idea to reset the board for real to
make sure it is completely recovered from some failed state (simple
re-loading of the application binary or even Elf file contents doesn't
affect most of internal CPU states so doesn't help in recovery,
see https://github.com/zephyrproject-rtos/zephyr/issues/25022 &
https://github.com/zephyrproject-rtos/zephyr/issues/26665).
And so we may want to utilize some external utility which triggers the
hard reset (in case of ARC boards it is
https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset).
So we need to have a way to execute an external command before each and
every test.
Now given we already have quite some call-backs we try to use them
before re-inventing the wheel. And pre_script seem to be a good option
with just on minor note - it is called after serial port gets open.
And while in some cases it might be OK if serial port on the board is
not affected by the board's reset, if it is affected we'll be losing
connection on reset (and that's the case with ARC boards BTW as the
FTDI USB-to-Serial IC is also wired to the reset signal on most of
the boards). That said we just move invocation of pre_script before
opening the serial port and everything should be good now.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Transient network errors may cause west update to fail. Retry it in
case that happens. Updates for projects which are already up to date
won't hit the network.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add the nRF52805-specific file with radio related defintions.
Use also specific configurations for certain PPI channels used by
the controller, as this SoC has limited number of programmable PPI
channels.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Change hard-coded (D)PPI channel bitfield values to the BIT() macro
calls with the corresponding channel base value supplied as parameter,
to make it possible to actually change this base value if needed.
Remove unused *_EXCLUDE macros.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
By default show reports based on last release. Fix a few other issues
where we had 0 values and were dividing by zero.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The value of adv_type shall be 0x07 for extended advertising, it will
be converted to 0x05 inside ll_adv_params_set after some checks.
This did not cause any issues with tests since input parameters in
already implemented test cases do not test any code that was skipped
by invalid parameter, however obvious one side-effect is that phy_p
would be always set to 1M regardless of input parameter so any test
case using Coded on primary would fail.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
nRF5340 does have SWI peripheral, hence use it instead of
the single available EGU peripheral. Use of SWI will allow
controller's LLL, ULL_HIGH and ULL_LOW execution context to
be independently configured to different interrupt priority
levels.
When ULL_HIGH priority equals ULL_LOW priority, only SWI2
is used by controller. Otherwise, SWI3 is used for ULL_LOW.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Detect and handle AD data set race condition between thread
and ISR context.
Fixes#27637.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add cpu_dsb() hal interface so that data synchronization
barrier be used in ARM Cortex M4 and M33 architecture
implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Set the AD data double buffer first index as volatile
because it is modified in LLL ISR context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added tests to update AD data as fast as possible. This test
shall exercise any race condition assert checks in the
Zephyr BLE controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Increased sim_length value to 60 seconds so as to meet the
current length of 13.56 seconds and any future test timing
increases in the near future.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update bsim test to test Periodic Advertising Enable and
Disable alongwith Extended Advertising Enable/Disable.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out into function the filling of sync info
structure in the common extended advertising payload format
header.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out into function the filling of aux ptr structure
in the common extended advertising payload format header.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out into functions the calculation of common
extended advertising payload format header length.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Moved the assignment of PDU length out side of a conditional
so that code to calculate PDU length can be reused.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out sync info field population into a utility
function with set and clear interface to add or remove
the common extended advertising header format fields.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The driver must be able to read from this pin as well as write to it.
If the driver doesn't support bidirectional configuration then fall
back to the legacy mode.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
There are several references to objects[1] at updatehub_probe function.
The structures are decoded from json, and have a maximum length of 2.
However, if the returned json only has a single element in this array,
this objects[1] value will be uninitialized. Because the structure
contains pointers, these will be uninitialized, causing the code to
reference uninitialized memory as pointers.
Add zeroing memory before passing it to the JSON API and do check if
objects_len field is two.
Fixes#27718.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Renamed nrf clock control driver file since it does no long control
POWER peripheral.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
After the fallthrough comments have been replaced (see commit
741ad17a37807a5396e73c10cf3e5fb425bc87bb) with a macro expanding
to the corresponding attribute, those hints became statements,
and if one happens to occur before any switch case, a warning
reporting it as an unreachable statement is generated.
Prevent the above from happening for function ll_rx_dequeue() in
ull.c by enabling an option that will make some switch case to
appear before this problematic statement.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Removed all nrf_power/USB related stuff from clock control
driver to USB driver.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Update the driver implementation to use nrfx_clock and nrfx_power
drivers. Update also revisions of the hal_nordic and nrf_hw_models
modules, so that it is actually possible to use those drivers.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
To indicate that the CLOCK and POWER peripherals are present in those
SoCs, thus the corresponding nrfx drivers can be used.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In CMake, ZEPHYR_CURRENT_MODULE_DIR is used during processing of module
CMakeLists.txt files.
If a module is named `current` then it's corresponding
`ZEPHYR_<module_name>_MODULE_DIR` would become ZEPHYR_CURRENT_MODULE_DIR
and thus colliding with internal Zephyr CMake variable.
Using module name `current` is therefore forbidden.
Print an error to users when a module named `current` is used in
Zephyr.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit describes add a section which describes how Zephyr modules
are integrated into Zephyr build system and what Zephyr module variables
that are available during CMake and Kconfig processing.
Those variables may be used for refering other Zephyr modules or
including of additional code.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
In CMake it is possible to reference each Zephyr module as a CMake
variable. This commit introduces the same feature to Kconfig, so that
it is possible to reference a module in consistent way in both CMake
and Kconfig.
To include a file from module FOO in CMake, use:
include(${ZEPHYR_FOO_MODULE_DIR}/somefile.cmake
To source a file from module FOO in Kconfig, use:
source "$(ZEPHYR_FOO_MODULE_DIR)/Kconfig.somefile"
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit improves Zephyr modules support in CMake.
All Zephyr modules will now have a corresponding
`ZEPHYR_${module_name}_MODULE_DIR` set, regardless of whether they
define a cmake folder in module.yml.
This results in:
`ZEPHYR_${module_name}_MODULE_DIR` defined for all modules and refers to
the root of the modle.
`ZEPHYR_${module_name}_CMAKE_DIR` defined for modules that specifies
cmake in module.yml, or is having both a CMakeLists.txt and Kconfig file
in the zephyr folder.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit has no functional changes but is simply a cleanup so that
flake8 will pass without warnings.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit refactors processing of Zephyr modules.
The Zephyr module name processing has been moved to zephyr_modules.cmake
to ensure that all `ZEPHYR_<MODULE_NAME>_MODULE_DIR` are defined early
in the build system.
No changes to inclusion of Zephyr module CMake code.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is a cleanup of the cmake/kconfig.cmake file.
It removes `set(ENV{<name>} <value>)` and instead creates a shared list
that can be used for execute_process() and add_custom_target() when
running Kconfig during CMake configure time or menuconfig and related
build targets.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data via AT commands.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
To debug hard-to-reproduce faults/panics, it's helpful to get the full
register state at the time a fault occurred. This enables recovering
full backtraces and the state of local variables at the time of a
crash.
This PR introduces a new Kconfig option, CONFIG_EXTRA_EXCEPTION_INFO,
to facilitate this use case. The option enables the capturing of the
callee-saved register state (r4-r11 & exc_return) during a fault. The
info is forwarded to `k_sys_fatal_error_handler` in the z_arch_esf_t
parameter. From there, the data can be saved for post-mortem analysis.
To test the functionality a new unit test was added to
tests/arch/arm_interrupt which verifies the register contents passed
in the argument match the state leading up to a crash.
Signed-off-by: Chris Coleman <chris@memfault.com>
Trims the default memory configuration for the BBC Microbit in mesh
samples to ensure that it fits.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Changes the local network interface to exclusively handle packets for
the local interface, duplicating the buffers in the process.
The loopback mechanism now operates its own packet pool for the local
interface queue. The loopback is moved ahead of encryption, allowing the
local interface packets to go back up the stack without network crypto,
saving a full round of encrypt/decrypt for self-send.
Packets for group addresses the local node subscribes to are now
duplicated, with one unencrypted variant going into the network
queue, and the network bound packets following the regular path to the
advertiser.
Introduces one new configuration for setting the number of loopback
buffers.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add sample where a fictious lenghty operation is required before a more
elaborate handshake is perform with eSPI master.
This requires sending SLAVE_BOOT_DONE virtual wire explicitly.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Add Kconfig switch to disable automatic eSPI slave boot acknowledge.
This allows to perform lenghty operations before continue any eSPI
handshake with eSPI master.
Required for eSPI SAF boot configuration.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This will only build/run on emulation platforms.
The decision is made based on the value of the 'simulation' key in the
platform yaml file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>