Update the external Segger RTT and SystemView libraries to version
2.52h.
This fixes#14082.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
For native_posix, set NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME
by default when a host BT adapter is selected even if TEST
was also set. As using host peripherals one normally needs
also to run with the host time.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Hardware PWM make sense for servo control even in a sample, add HW PWM
choice for NRF52 family, which support it.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
Fedora 30 uses GCC 9.1 which fails to build when loggin is enabled:
zephyr/subsys/logging/log_core.c: In function ‘log_is_strdup’:
zephyr/subsys/logging/log_core.c:665:22:
warning: array subscript -1 is outside array bounds of
‘u8_t[]’ [-Warray-bounds]
665 | ((char *)buf <= pool_last->buf);
| ^~
zephyr/subsys/logging/log_core.c:52:3:
note: while referencing ‘log_strdup_pool_buf’
52 | log_strdup_pool_buf[LOG_STRDUP_POOL_BUFFER_SIZE];
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix handlers call for secondary descriptor.
USB class like DFU has two sets of descriptors. In the handler
look up function, wind the pointer forward to the range
of the current descriptor.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Refactor wpanusb sample using new descriptor API, use endpoint index
instead of hardcoded endpoint address.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactor device api test using standard placement for descriptor table
and configuration data.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove duplicated execution path for composite configuration, USB
device stack initialization is done inside stack for both cases.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Now that Standard, Class and Vendor request handlers are using the same
buffer, we do not need to keep and array installed request data pointer.
This simplifies the code.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Now that we have merged the class and vendor request buffers into the
USB device code, we can also merge the standard request buffer. We just
need to ensure it is at least 8 bytes, by using the range option in
Kconfig. The 64KiB limit is arbitrary.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use the generic pinmux APIs provided by zephyr to select
alternate functions.
This also contains a fix for a formatting issue in the
documentation for this board. Additionally, the serial
console is now on UART2.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Define pinmux base addresses from gpio bases. Pinmux
and gpio functionality are located in the same PCR register
for each pin.
Introduce pinmux Kconfig switches for the SOC.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
This driver introduces pinmux configuration capabilities
using zephyr apis for XEC SOCs.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Clarify that the async receive event length is relative to the
offset, rather than representing an absolute length of data
received.
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
Add an explict test for the length of the receive event when
doing incremental receives. This was not tested anywhere in the
normal code path (only implicitly in the abort, which wasn't
exercised on the only current implementation, nrfx). So add an
explicit check for it during the chained reads, so that the
test can catch the case where multiple receive events do not set
the length correctly on events past the first.
Tested on nrf52840_pca10056.
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
This reverts commit d09b91f5. I was incorrect in my interpretation
of the async API: the number of bytes received is relative
to the previous event, so it does "reset" between calls.
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
USB_DC_STM32 comes from Kconfig. We have to add the CONFIG_ prefix
to use USB_DC_STM32 in C code.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Non-XIP system with FLASH_SIZE = 0 is no-flash system. And no-flash
system makes text, rodata, and data all in SRAM, so define the marco
ROM_ADDR to RAM_ADDR.
Fixes: #16027.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit enforces platform-specific initialization
for nRF SoC family. The specific platform initialization
hook is invoked directly after reset and calls the nRFx
SystemInit() function.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Rename function _PlatformInit() to z_platform_init() to
comply with naming conventions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Allow further extention of counter API by replacing count_up bool in
the structure with u8_t flags where one bit is used for count up
feature.
Change is not breaking API as count up property is read using
counter_is_counting_up() that didn't change.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
OpenISA Vega board has Arduino headers which can be configured for
use with Arduino-compatible shields. To enable this in Zephyr,
let's define the gpio-map for Vega and set the appropriate
arduino_serial linkage.
Signed-off-by: Michael Scott <mike@foundries.io>
Having a checksum of zeros in UDP means "missing checksum" and is a
valid case as per RFC 768:
"An all zero transmitted checksum value means that the transmitter
generated no checksum (for debugging or for higher level protocols
that don't care)."
Such support is made possible by adding a new Kconfig option named
CONFIG_NET_UDP_MISSING_CHECKSUM.
However, that is valid only for IPv4. For IPv6, see the RFC 2460
section 8.1:
"Unlike IPv4, when UDP packets are originated by an IPv6 node, the UDP
checksum is not optional."
So the UDP checksum will always be verified in IPv6.
Fixes#16375
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
From RFC 768, in "Fields":
"If the computed checksum is zero, it is transmitted as all ones"
Fixes#16379
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If CONFIG_POSIX_API is defined, automatically use time() function.
The alternative to that is to explicitly configure mbedTLS' timing
source via API, as required for "raw code", but if user enables
POSIX API, we as well might use existing mbedTLS integration.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added support for the LE SC pairing with the OOB data. The peripheral
side is only supported for now.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This change extends the Bluetooth API to support pairing with the OOB
data that are used in the Authentication Stage of the pairing procedure.
The LE Secure Connections specific API for OOB pairing is also added.
The general OOB API should be able to accomodate the LE legacy pairing
later on.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
The the footer structure and extra bytes (rssi, resolving index etc.)
were overlapping in memory, rx_ftr was moved into the header, but the
extra and footer are still being read from the same place, extra was
written to the end. So this avoided memory corruption, but reading extra
reads wrong information.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added a test case with corner case scenario, in which sector closing
operation is interrupted (e. g. due to power-down).
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Added a new runtime parameter to the Flash Simulator. It can be used to
ignore part of the data that is written to the simulated flash memory.
This parameter works together with max write calls parameter.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Added a new runtime parameter to the Flash Simulator. It can be used to
ignore erases to the simulated flash memory after a certain number
of flash erase calls has been executed.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>