create_ipv6_answer() function is behind #define's but get used behind
IS_ENABLED(CONFIG_NET_IPV6), which is not allowed.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds zero configuration based on LLMNR. This should be working in
Windows out of the box, zephyr can be accessed with http://zephyr/.
Can be combined with netusb configuration (RNDIS is supported in
Windows).
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
With multiple debug probes attached, attempting to launch multiple debug
servers resulted in "OSError: [Errno 98] Address already in use" despite
explicitly setting --gdb-port to unique values.
The issue was caused by the default telnet port: 4444. Adding
--telnet-port parameter allows to explicitly define the address to a
unique value and avoid the socket exception.
Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>
Node._prop_val() returned too early for non-existent booleans, letting
missing 'required: true' booleans slip through without an error.
Fix it by rearranging the code to always do the 'required' check before
returning.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Requested by Marc Herbert. Makes the output deterministic as long as all
binding directories are within $ZEPHYR_BASE (and a bit less spammy too).
Example output for header:
Before:
/* Directories with bindings: /home/ulf/z/z/dts/bindings */
...
/* Binding (...): /home/ulf/.../arm,v7m-nvic.yaml */
After:
/* Directories with bindings: $ZEPHYR_BASE/dts/bindings */
...
/* Binding (...): $ZEPHYR_BASE/dts/.../arm,v7m-nvic.yaml */
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the int_literal_to_timeout Coccinelle script to convert literal
integer arguments for kernel API timeout parameters to the standard
timeout value representations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Some legacy code still passes integer literals in milliseconds as the
value to functions that take a timeout. This usage interferes with
plans to replace the millisecond representation with a more generic
k_timeout_t value. Add a Coccinelle script to convert call sites to
use the proper constants and macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Give an example for an interrupt controller, where 'interrupt-cells'
should be used instead.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
verify_eq() can be used instead of verify_streq(), since
warnings.getvalue() already returns a string.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Looking at the code, this flag was probably made 'required: true' by
mistake. Combining 'type: boolean' with 'required: true' for 'ppi-wrap'
means that all nodes that use this binding are required to have a
'ppi-wrap;' property.
The mistake was hidden by a bug in edtlib (failing to flag missing
'required: true' booleans).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This test requires more than 32 static priorities by default, and
doesn't run with the multiq scheduler without a special configuration.
That used to be specified per-platform, but got moved to a separate
test case a while back.
This broke non-default platforms like qemu_cortex_m3 which use
SCHED_MULTIQ as their default backend. Put a filter in place instead
of going back to per-platform changes.
Fixes#19437
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
PR #19493 cleaned up the turbo-mode process for doc generation but
introduced an error in the generated index.rst that causes use of the
"make htmldocs-fast" (so-called turbo mode) to fail with an error -
the generated list-table directive has no content (other than
the header row). This PR adds one dummy row.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
With ST boards it is possible to specify the board ID when flashing using
openocd. This is very useful when having multiple devices connected.
This change allows us to address a device directly:
west flash -- --cmd-pre-init "hla_serial 066BFF535254887767174558"
This needs to be called before init, hence the new option.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove duplicate "tdata.timestamp" update in duration_expire; this
value is already updated by k_uptime_delta.
Besides simply removing duplicate value update, this commit also
addresses the intermittent assertion failure that is caused by
updating "tdata.timestamp" at a later time than the actual execution
of the k_uptime_delta function.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
We filter out the following kernel tests
- tickless_concept
- timer_api
from the set of tests running on QEMU Cortex-M0 platform,
as the tests consistently fail on QEMU. In addition, we
add a workaround for kernel/interrupt test, so it can
successfully execute on QEMU Cortex-M0.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
For the qemu_cortex_m0 we implement a custom system clock
driver based on the nRF51 TIMER peripheral. The system
clock is configured to run at 1 MHz frequency.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix an inline comment in nrf_rtc_timer.c correcting the
path to the mentioned test.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit configures the qemu_cortex_m0 board to
build with it's custom timer driver, instead of the
default nrf_rtc_timer driver for nRF51x SoCs. It,
additionally, configures a default system clock
frequency to 1MHz, as well as 10 Hz tick frequency.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit adds some documentation for the
newly introduced qemu_cortex_m0 platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines qemu_cortex_m0 board, adding
support for Cortex-M0 in QEMU. The added platform
is based on the (nRF51) bbc_microbit board.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add a 'warn_file' parameter to EDT.__init__() that gives a 'file' object
to write warnings to. Use it to capture and verify warnings generated
for deprecated features in testedtlib.py. This indirectly gets rid of
possibly broken-looking output when running it.
Because any function that writes warnings now needs to use EDT._warn()
(as self._warn()), some functions were moved into the EDT class.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Implement a nice generalization suggested by Bobby Noelte.
Instead of having a generic #cells key in bindings, have source-specific
*-cells keys. Some examples:
interrupt-cells:
- irq
- priority
- flags
gpio-cells:
- pin
- flags
pwm-cells:
- channel
- period
This makes bindings a bit easier to read, and allows a node to be a
controller for many different 'phandle-array' properties.
The prefix before *-cells is derived from the property name, meaning
there's no fixed set of *-cells keys. This is possible because of the
earlier 'phandle-array' generalization.
The older #cells key is supported for backwards compatibility, but
generates a deprecation warning.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Periodically wake up log process thread consume more power if system
already in sleep or deep sleep state. With the help of added logging
timer and semaphore, log process thread is woken up only when there
is logging message.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
The base_address in the device configuration is used as a handle
to access an entity in memory. In C, we call that a 'pointer'.
Also in C, (versus, say, PL/M) we name these pointer things after
what they point not ('regs') not what they are ('base address').
Thus, we change the member to a pointer type and change its name.
This makes it compile cleanly regardless of machine pointer size,
while also cutting down on a bunch of casting noise.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Use entropy driver directly in bt_rand instead of stitching together
calls to sys_rand32_get to improve efficiency. The use of
sys_rand32_get could also leak timestamps into keys.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Added support for vendor specific meta data in LLL node_rx_hdr. This
enables vendors to add "footer" data to the RX PDU, for supporting
specialized BLE features.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Replaced net_bytes_from_str in hostname_get test by a new function that
converts the unique part of the hostname in a byte array.
net_bytes_from_str can not be used as it assumes that the string input
is of the format "xx:xx:xx:xx:xx:xx" where as the unique part of the
hostname is a MAC address string without colons. If net_bytes_from_str
is used this could result in buffer overrun on the input string.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Application board.overlay files tend to be paired with
boards/board.conf files that extend the functionality of a board.
Move the overlay files to the same location as the config files that
they work with.
A few overlay files that are paired with a prj_board.conf file in the
application root directory are left in place.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Putting overlay files in the test/sample root clutters the file
system. Allow them to be in the boards subdirectory alongside
board.conf files.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Even though interrupts are locked before processing in synchronous
call, it is still possible that they will be interrupted by NMI.
In that case log_output module may assert because of buffer
overwritting.
Added flushing of log_output buffer before starting the process to
ensure that output buffer is always in reset state at the beginning.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The zephyr/subsys/net/l2 include directory has been added through the
'zephyr_library_' API to modify the 'zephyr' library, when the
'zephyr_' API should have been used.
This patch fixes this problem. Using 'zephyr_library_' in this context
works by accident when 'zephyr' is the current library but has no
guarantees of working in the future.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Increased TX/RX buffer size by one in pipe test to prevent buffer
overrun.
Some test will transfer one byte more then the number of bytes
supported by the pipe, in case the buffer size is the same as the
size of the pipe this will result in a buffer overrun.
Tools such as address sanitizer would detect this overrun and fail the
test.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Several C++ std library headers use __str as internal
variable names. If those headers are included after
tc_util.h is included those headers fail to compile
because tc_util.h defined __str to be a macro.
Fixed by renaming the __str macro to TC_STR.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Move tinycrypt related header into test and make those tests only build
on native_posix. The tests are unit tests, ie. testing tinycrypt
functionality only without any dependency on the underlying system.
Long term we should move those to be true unit tests and create
functional and integration tests that use tinycrypt in the context of
Zephyr and for real use-cases.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix a bug where DTS_BINDINGS_DIRS could only have one entry. When
there were more than one entry the command for invoking menuconfig
became corrupted.
This changes the separator of DTS_BINDINGS_DIR from a space to ? so
that the shell does not interpret the space as an argument separator.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Similarly to commit 223a2b950f ("mempool: move BUILD_ASSERT to the
end of K_MEM_POOL_DEFINE"), move BUILD_ASSERT() at the end for
consistency.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
There are two problems with how zephyr/subsys/usb is being added to
the include path. Firstly it is using the zephyr_library_ API to
modify the zephyr library, when the zephyr_ API should have been used.
Secondly the code is located in the class directory even though it
affects the more general usb directory.
This patch fixes these issues. Using zephyr_library_ in this instance
works by accident when 'zephyr' is the current library but has not
guarantees of working in the future.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>