The blackmagicprobe runner's Python process fails to ignore SIGINT
when it runs GDB from the debug and flash callbacks, which is wrong.
The other runners tend to use run_server_and_client() to properly
handle this, since they start a GDB server and connect to it with a
client. The BMP USB device presents itself as a serial device which
speaks the GDB serial protocol instead, so there's no server/client,
and thus no call to run_server_and_client().
The problem is that blackmagicprobe essentially uses
subprocess.check_call() to start GDB directly, without ignoring SIGINT
in the python process. Easy fix.
Fixes: #21139
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The network sample automatic testing feature in PR #19677 is moved
to 2.2 so removing it from 2.1 release note.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Since bt_conn_send_cb can fail to send buffer causing it to unref this
may cause buffer leaks as the caller is not aware of the error assuming
the buffer could be sent.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Seems to be fine to temporarly cast to int there as frequencies are in
Mhz and not Ghz.
Fixes#20497
Coverity CID: 205638
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The k_mutex is a priority-inheriting mutex, so on unlock it's possible
that a thread's priority will be lowered. Make this a reschedule
point so that reasoning about thread priorities is easier (possibly at
the cost of performance): most users are going to expect that the
priority elevation stops at exactly the moment of unlock.
Note that this also reorders the code to fix what appear to be obvious
race conditions. After the call to z_ready_thread(), that thread may
be run (e.g. by an interrupt preemption or on another SMP core), yet
the return value and mutex weren't correctly set yet. The spinlock
was also prematurely released.
Fixes#20802
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Fill the `rx_delay` field in the SPIM configuration structure only when
the RXDELAY feature is present in a given SPIM instance, to prevent
compilation errors when some other SPIM instance is enabled together
with SPIM3.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Instead of showing the prompt for symbols on the index page, show their
help texts. This makes searching easier.
Fall back on the prompt if no help text is available.
Also change the code to only show one of the prompts if several are
available (happens if a symbol is defined in multiple locations and adds
a prompt in more than one of them). It's probably overkill to show them
all, and it doesn't come up that often.
Suggested by David B. Kinder.
Co-authored-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use --modules to split the Kconfig reference up by where symbols are
defined. See the argparse docstring for --modules in
doc/scripts/genrest.py.
Not sure what the best way to split things up is, so feedback would be
appreciated. I just pulled out some top-level directories. It could
always be tweaked later.
If a symbol is defined in more than one module (by being defined in
multiple locations), it appears on multiple index pages.
To build the documentation, do
$ mkdir doc/b && cd doc/b
$ cmake -GNinja ..
$ ninja htmldocs
(output in html/reference/kconfig/index.html)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Instead of having index.rst just link to other index pages in --modules
mode, list all symbols on it, and have links to the module index pages
at the top.
Get rid of index-all.rst and index-main.rst (and all related options).
index-all.rst is no longer needed, and index-main.rst (symbols outside
--modules) might not be that useful to people reading the documentation
(and could be added back if needed).
Also refactor and streamline the code a bunch. For the main index page,
the only difference between modules and non-modules mode is now whether
there's links to other index pages at the top.
Suggested by David B. Kinder.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add support for Zero Latency IRQs, which avoids any Zephyr
OS or application influenced ISR latencies on the
controller's ISRs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Documents major driver changes (additions, removals, fixes, etc.) across
all driver families since the 2.0.0 release.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Additions:
- Provide clear description of a typical board port on zephyr
- Add a clear statement that peripherals should be disabled by
default (unless clearly specified)
- Add clear mentions on peripheral that should actually be enabled
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The time difference calculation did not check if the result
value would be < 0 which means really large value when converted
to unsigned.
Fixes#20100
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The Newlib in the XCC toolchain for intel_s1000_crb has a few
missing functions which are reentrant versions of the one
defined in lib/libc/newlib/libc-hooks.c. So make these call
the correct functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Both HAS_I2C_DW and HAS_SPI_DW are not valid unless I2C and
SPI are both selected. So make them dependent on the parent
subsystem config.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Commit 571741a0c5 introduced a block to determine __BYTE_ORDER__
within toolchain/gcc.h. However, toolchain/xcc.h defined
__BYTE_ORDER__ there but the early inclusion of gcc.h causes
errors since __BYTE_ORDER__ cannot be determined within gcc.h.
So wrap around the gcc.h include with a fake __BYTE_ORDER__ to
bypass the check in gcc.h.
Also set the __BYTE_ORDER__ to the correct __ORDER_*_ENDIAN__
macro.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Both k_thread_stack_t and (*k_thread_entry_t) are defined in
include/kernel.h and include/sys/arch_interface.h. The latter is
indirectly included by kernel.h which causes issues with some
toolchains. So remove the definitions in kernel.h.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When setting a timeout measure the number of accumulated unannounced
ticks. If this value exceeds half the 24-bit cycle counter range
force an announcement so the unannounced cycles are incorporated into
the system tick counter.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a test that repeatedly reschedules a timer before it expires, and
has no other timers active. If the timer internal state overflows due
to counter wrap either the uptime or the tick counter may appear to go
backwards. The test runs until it fails, or until a specified amount
of measured time has passed.
This test is build-only for automated test programs as the default
limit to pass is one hour, and some platforms may require an even
longer period.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
It is possible that the network interface is not set when we
check the interface in net_pkt.c:pkt_buffer_length(). For example
in icmpv6 unit test the interface is left as NULL as the test does
not care about what network interface is used. For real hw like
mimxrt1050_evk, which supports Ethernet, we need to add additional
checks for the interface being non-null.
Fixes#20088
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Processing of data received on dynamic channels is still done via syswq
so the buffer shall not be unrefed when they are queued.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When both buffer and max data to read are zero return
the available data in buffer.
Fixes#20838
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Just use printk directly instead of going over defines.
For some reason, this change lets us pass on master when running
tests/kernel/timer/timer_monotonic test. This test started failing after
rc2 was tagged, just because the changing git version string passing to
BUILD_VERSION. This is still under investigation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When using the RC clock source a periodic calibration is invoked that
involves reading from the die temperature sensor. The code did not
protect against execution order that caused the periodic calibration
to be invoked before the temperature sensor was initialized.
Update the temperature sensor to detect that it has not been
initialized and so should reject attempts to fetch a reading.
Update the calibration code to do nothing when temperature reading
fails.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
z_vrfy_flash_get_page_count defined as a function prototype in place of
a real function due to a stray semicolon.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Now that the TX callbacks happen from the system workqueue but fixed
channels get processed from the RX thread there's a risk that the
ordering of these gets messed up. This is particularly bad for ATT
when it's trying to enforce flow control.
To fix the issue store the completed TX packet information in a
per-connection list and process this list before processing any new
packets for the same connection. We still also schedule a workqueue
callback, which will simply do nothing for this list if bt_recv()
already took care of it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Coverity discovered that a logical AND was used in place of
a bit-wise AND. So fix it.
Fixes#20489
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This define has no more internal users and has no particular use
because of the system-wide user data size that gets set through
Kconfig. Therefore, deprecate it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For 32-bit architecture Bluetooth only requires 4 bytes for the user
data. There are places that store a pointer in it, so we need to make
an exception for 64-bit architecture. The code contains relevant build
asserts, so it's sufficient to set a conditional default in Kconfig
but let the range definition be simpler (unconditional).
Also simplify & fix the conditional defaults & ranges. E.g. separately
mentioning X86_64 is redundant since that option explicitly selects
the 64BIT option.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This define is not of use anymore since there's a global net_buf user
data Kconfig variable and its definition already guarantees a
sufficient minimum for Bluetooth.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The "sent" tracking doesn't have to be a signed integer. Use a fixed
size so that the consumed size doesn't change between different
architectures. Use a u16_t since bigger sizes are needed and because
this is mapped to an int function return higher up in the stack.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Fixed handling of HCI events in the HCI driver over RPMsg. Now,
the driver makes use of discardable buffer pool when allocating
memory for certain HCI event types (e.g. Advertising Report Event).
Applications that are flooded with Advertising Reports will run
much better after this change (e.g. Mesh applications).
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add a note about supporting new SoC Series in v2.1.0 release.
Style rework in the section for SoC support.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>