The ZephyrBuildConfiguration package allow downstream users to control
the Zephyr build system using a cmake package.
A Zephyr Build Configuration package allows for setting of additional
DTS_ROOT, BOARD_ROOT, and similar variables without having to patch
Zephyr repo, but it also allows for inclusion of additional boilerplate
code for more advanced use cases.
The repository or folder containing the Zephyr Build Configuration
package must be on toplevel in the Zephyr workspace.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The cell paramater should have been last to match both the
DT_*_CELL_BY_NAME macros as well as how DT_PHA_BY_IDX works. We fix the
DT_INST_*_CELL_BY_NAME macros as well.
The dma macro's implemented the behavior correctly, but got the argument
names in correct. We fix that to make everything consistent.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Prevent usage of system work queue before it is ready by delaying
initialization of temperature device. Work queue is not used until
application stage.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
There does not seem to be a simple way to express the fact that UART1
can be initialized later at the POST_KERNEL level. The existing code
is wrong in the sense that it always initializes DT instance 1 later,
instead of doing it for UART1 (which may not be instance 1).
In addition, UART instances on other platforms are
also initialized at the PRE_KERNEL_1 level regardless of the instance
index, so let's do the same on this platform for consistency.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The power configuration is dependent on which UART is physically used.
In order to allow DT_INST_FOREACH_STATUS_OKAY() to iterate through
instances without the assumption that index 0 corresponds to UART0
(which would be incorrect in the case when only UART1 is enabled),
we need to check the base address to identify which UART is being dealt
with.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Support for the socketpair(2) system call was recently
added for 2.3.0 .
This change adds a sample application that demonstrates
how it can be used.
Fixes#25527
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Add a note for composite (CDC+DFU) device overlay.
Composite device CDC+DFU may not work with Windows OS host.
Windows OS does not send reset after DFU_DETACH request
(does not re-enumerates) and thus make it unable for
the device to restart in DFU mode.
For more details refer to #23337.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Update V2.3.0 release note for stm32 with:
- Added SoC series
- New boards support
- Noticeable changes in stm32 drivers and subsystems
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2 useful functions implemented, sample for read()/write() added
(or rather, existing sample to modified to support that).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
We fix (by inverting) the logic of the IS_MPU_GUARD_VIOLATION
macro, with respect to the value of the supplied 'fault_addr'.
We shall only be inspecting the fault_addr value if it is not
set to -EINVAL.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Enhance the sample console output of the arm_interrupt
test, to reflect recent changes in test context as well
as kernel fault handling log output format.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We add a test case to verify that the Cortex-M fault
handling is able to catch stacking errors explicitly
due to exception entry frame stacking (that is, when
the Cortex-M MCU does not report Data Access Violation
MemManage fault with a valid MMFAR value, but only a
Stacking MemManage fault). We update the README file
accordingly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
It is possible that MMFAR address is not written by the
Cortex-M core; this occurs when the stacking error is
not accompanied by a data access violation error (i.e.
when stack overflows due to the exception entry frame
stacking): z_check_thread_stack_fail() shall be able to
handle the case of 'mmfar' holding the -EINVAL value.
Add this node in mem_manage_fault() function to clarify
that it is valid for z_check_thread_stack_fail() to be
called with invalid mmfar address value.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Make sure to include "DT_DRV_COMPAT" in the docstring for every macro
that requires it.
Some other cleanups and additional examples to try to make it easier
to decide which API to use. Make the style more regular.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add some introductory text to these driver helpers which makes it more
clear how they are defined in terms of the generic APIs, which allows
removing some boilerplate from doxygen. This also gives us a chance to
call out the exceptional cases and add some more documentation to those.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Update the diagrams. Doing this in a separate commit so the SVG diff
doesn't clutter up other patches.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This reimplements z_timer_cycle_get_32() so it works
when IRQs are locked and solves the hung
k_busy_wait() problem.
Fixes#23622.
Signed-off-by: Jakub Cebulski <jcebulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Co-authored-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This adds a helper function for reading LiteX 64-bit CSRs
to be used by LiteX drivers.
Signed-off-by: Jakub Cebulski <jcebulski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
A quick test on a dummy device that:
- opens a socket (success)
- sends data (success)
- suspends (success)
- suspends (failure)
- sends data (failure)
- resumes (success)
- resumes (failure)
- sends data (success)
This permits to show that PM states are properly handled in network
stack.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will be useful to test network stack's power management support.
There is no other way to do it, so far, but to hardcode such config
option test there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Updating the eswifi driver to provide port information (along with
IP / net context) whenever an async message is received. This is
needed to fully populate the "remote" info in "net_context"
required whenever net_context_send is called.
Also adding code to populate "remote" info in "net_context"..
Tested with STM32 disco IOT kit. Fixes#25621
Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
Some updates to the reference page for the "core" APIs, and associated
follow-ups in the guides:
- centralize documentation of chosen zephyr nodes in a non-legacy
file, provide a reference to them from the intro page in the guide
- review doxygen docstrings and correct errors for generic APIs
- add introductory text to each section in the API reference
- add missing hardware-specific pages
Documentation for layers built on top of these is mostly left to future
commits, but I do have a smattering of fixes in the guides that I
noticed while I was doing this.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Because the sleep instruction issue for nsim_hs_smp, idle
loop is used to simulate behavior of sleep, so arch_cpu_idle will
forever loop. This causes cpu idle test loop, then the whole
context test timeouts.
as a fix, skip the cpu_idle test for nsim_hs_smp now.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Because the issue of nsim, the sleep instruction doest not work
correctly when SMP is enabled. A workaround is introduced in commit
d56a12d955, this workaround should be enabled only for SMP case in
nsim.
For other cases, no need of this workaround.
This commit fixes#24276
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Implementation requires that streamer buffer size must be
multiple of the flash device wbs.
This patch reflects this in API documentation
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added test for check proper service of flush-write when buffer
contains unaligned amount of data.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
On buffer flush request it is very probably that write buffer
contains amount of data which is non write-block-size aligned.
Flash memory need to be write at minimal by write-block-size chunks.
This patch addresses mechanism which ensure such behavior by adding
missing bytes.
fixes#25471
streamer buffer size should be multiple write-block-size of
the flash device in order to avoid unaligned flash write
request.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The interrupts generated by the generic timer behave in
a level-sensitive manner. Change the DT to reflect the same.
Fixes: #25585
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
After removal of legacy controller ll_adv_aux.h does not exist anymore.
This is fixed in this PR by including ull_adv_aux.h instead.
The error only shows up when Advertisement Extensions are enabled
in the LL (CONFIG_BT_CTLR_ADV_EXT=y)
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Fix variable-size string copy patch that introduced a runtime bug that
causes a bus fault.
Fixes#24853.
Signed-off-by: Tahir Akram <mtahirbutt@hotmail.com>
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
If KPTI is not enabled, the current value of CR3 is the correct
page tables when the exception happened in all cases.
If KPTI is enabled, and the excepting thread was in user mode,
then a page table switch happened and the current value of CR3
is not the page tables when the fault happened. Get it out of the
thread object instead.
Fixes two problems:
- Divergent exception loop if we crash when _current is a dummy
thread or its page table pointer stored in the thread object is
NULL or uninitialized
- Printing the wrong CR3 value on exceptions from user mode in
the register dump
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
CC: mesh/access.c
mesh/access.c: In function 'model_has_dst':
mesh/access.c:483:10:
warning: returning 'u16_t *' {aka 'short unsigned int *'} from
a function with return type '_Bool8' {aka 'unsigned char'} makes
integer from pointer without a cast [-Wint-conversion]
483 | return bt_mesh_model_find_group(&mod, dst);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
The existing feature exchange procedure does not give the proper
response as specified in the BT core spec 5.0.
The old behaviour is that the feature-response returns the logical and
of the features for both peers.
The behaviour implemented here is that the feature-response returns the
featureset of the peer, except for octet 0 which is the logical and of
the supported features.
Tested by using the bt shell, and having different featuresets
on the 2 peers.
This fixes#25483
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Add a new test with clean output and warn the user that the version
without clean output will output garbled text.
Fixes#23799
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
OpenThread moved from 4 to 5 debug levels and it was not possible
to configure all of them with Kconfig.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
When the loop that tries to obtain the lock in poll_out() finishes
because of hitting the max number of trials (what normally should
never happen), force the lock to be taken instead of just giving up
with sending the data. The latter approach that was in use so far
could not deal with a situation when some thread was aborted while
keeping the lock. Other threads would then have no chance to send
anything with poll_out() until it was called from an ISR.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>