This commit adds new functions, which can be used for Xen event channel
management (allocation, interdomain binding etc.). Such functionality
is needed for Xen PV driver development in Zephyr.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.
If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.
Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.
Fixes: #45807Fixes: #43910Fixes: #34226Fixes: #46743
[1] https://lists.zephyrproject.org/g/devel/message/8466
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Herman (hermabe) has been involved in the Bluetooth host, mostly for
EATT. So we would like to add him as a reviewer to select PRs.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit adds a user button to the board DTS.
The button is not connected to nRESET as suggested
by the board schematics, but rather connected to
P0.21. The source code found in the Arduino IDE
connects an interrupt to this GPIO and calls
NVIC_System_Reset from there to cause the reset.
The button was therefore added as a regular button
to cover the most general case.
This has been verified on an Arduino Nicla Sense ME.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The amount of stack used has changed for some reason (toolchain updates?),
use the amounts reported by the test when it failed.
Signed-off-by: Keith Packard <keithp@keithp.com>
The hifive_unleashed board is configured with 0xf0000000 bytes of memory,
so an allocation of 0x7fffffff should succeed. Instead, use a much larger
value to ensure that the allocation fails.
Signed-off-by: Keith Packard <keithp@keithp.com>
One test reads too few bytes from the source to ensure nul-termination of
the result which generates a compiler warning.
Signed-off-by: Keith Packard <keithp@keithp.com>
The random/rand tests assume the PRNG operates in a specific fashion,
which is not true when running Picolibc.
v2:
Call ztest_test_skip for picolibc
Signed-off-by: Keith Packard <keithp@keithp.com>
Picolibc excludes %n support on purpose as it can introduce security issues
when the format string is vulnerable to manipulation.
Signed-off-by: Keith Packard <keithp@keithp.com>
Passing NULL as the stream to stdio functions is "UB" (undefined behavior)
in the C standard. Picolibc crashes in this case, which is valid, but not
helpful. Skip these tests in this case.
Signed-off-by: Keith Packard <keithp@keithp.com>
Placing these in the __ram_code section generates a relocation error when
building with toolchain version 0.14.1, moving them back to .text fixes
that (presumably with a performance penalty).
Signed-off-by: Keith Packard <keithp@keithp.com>
Picolibc is a fork of newlib designed and tested on embedded systems. It
offers a smaller memory footprint (both ROM and RAM), and native TLS
support, which uses the Zephyr TLS support.
By default, the full printf version is included in the executable, which
includes exact floating point and long long input and output. A
configuration option has been added to switch to the integer-only
version (which also omits long long support).
Here are some size comparisons using qemu-cortex-m3 and this application
(parameters passed to printf to avoid GCC optimizing it into puts):
void main(void)
{
printf("Hello World! %s %d\n", CONFIG_BOARD, 12);
}
FLASH SRAM
minimal 8696 3952
picolibc int 7600 3960
picolibc float 12304 3960
newlib-nano int 11696 4128
newlib-nano float 30516 4496
newlib 34800 6112
---
v2:
Include picolibc-tls.ld
v3:
Document usage in guides/c_library.rst and
getting_started/toolchain_other_x_compilers.rst
v4:
Lost the lib/libc/picolibc directory somehow!
v5:
Add PICOLIBC_ALIGNED_HEAP_SIZE configuration option.
Delete PICOLIBC_SEMIHOST option support code
v6:
Don't allocate static RAM for TLS values; TLS
values only need to be allocated for each thread.
v7:
Use arm coprocessor for TLS pointer storage where supported for
compatibility with the -mtp=cp15 compiler option (or when the
target cpu type selects this option)
Add a bunch of tests
Round TLS segment up to stack alignment so that overall stack
remains correctly aligned
Add aarch64 support
Rebase to upstream head
v8:
Share NEWLIB, NEWLIB_NANO and PICOLIBC library configuration
variables in a single LIBC_PARTITIONS variable instead of
having separate PICOLIBC_PART and NEWLIB_PART variables.
v9:
Update docs to reference pending sdk-ng support for picolibc
v10:
Support memory protection by creating a partition for
picolibc shared data and any pre-defined picolibc heap.
v11:
Fix formatting in arch/arm/core/aarch64/switch.S
v12:
Remove TLS support from this patch now that TLS is upstream
Require THREAD_LOCAL_STORAGE when using PICOLIBC for architectures
that support it.
v13:
Merge errno changes as they're only needed for picolibc.
Adapt cmake changes suggested by Torsten Tejlmand Rasmussen
v14:
Update to picolibc 1.7 and newer (new stdin/stdout/stderr ABI)
v15:
Respond to comments from dcpleung:
* switch kernel/errno to use CONFIG_LIBC_ERRNO instead of
CONFIG_PICOLIBC
* Add comment to test/lib/sprintf as to why the %n test
was disabled for picolibc.
v16:
Switch picolibc to a module built with Zephyr. This eliminates
toolchain dependencies and allows compiler settings for Zephyr
to also be applied to picolibc.
v17:
Provide Zephyr-specific 'abort' implementation.
Support systems with MMU
v18:
Allow use of toolchain picolibc version.
v19:
Use zephyr/ for zephyr headers
v20:
Add locking
Use explicit commit for picolibc module
v21:
Create PICOLIBC_SUPPORTED config param. Set on arc, arm, arm64,
mips and riscv architectures.
Signed-off-by: Keith Packard <keithp@keithp.com>
When the client receives att error rsp, but the error code
is an illegal value, such as 0, an exception will be triggered.
gatt_read_type --> gatt_read_type_rsp --> parse_characteristic
`switch (rsp->len) {` null address access.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
In #46480 the st,stm32-fdcan driver was updated to use clock_control to
configure peripheral bus clocks. However, the default clocks property
added to the can1 node of stm32u5.dtsi was not correct.
This correction has been tested on known good hardware which uses the
STM32U5 and FDCAN peripheral.
Signed-off-by: Peter Maxwell Warasila <madmaxwell@soundcomesout.com>
The value of CONFIG_SYS_CLOCK_TICKS_PER_SEC has side-effects that
are not expected with tickless kernel mode. In bug #46378, application
code is shown to run slower with higher sys clock tick value. In SOF
bug #5921, audio quality issues were root-caused to k_timer inaccuracy
with 50000 sys clock tick.
Set the the value to 15000 for all SOF applications. All existing
test cases pass with this value.
BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/46378
BugLink: https://github.com/thesofproject/sof/issues/5921
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The `iso_qos` was only used for connected ISO, but
was placed outside of the CONFIG_BT_ISO_UNICAST
guard, such that for broadcast ISO-only it was unused.
Move the declaration and renamed to cis_iso_qos.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove explicit BT_HCI_VS enable, this will be enabled when
the used Controller selects BT_HAS_HCI_VS.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Disable BT_ECC support in network core to reduce RAM usage.
ECC implementation can instead be supported in the Host
running in the application core.
This is also to keep hci_uart (nRF52 Series) and hci_rpmsg
(nRF53 Series) have the same support features. ECC is not
enabled in hci_uart sample.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
ESP32 linker loader needs all sections to be align correctly.
When MCUBoot is enabled, device handles provide by device-handles.ld
does not make the ALIGN(4) at the end, which breaks the loader
initialization. This PR make sure that this particular section
is placed in DRAM instead.
For now this is a workaround until this can be handled in loader script.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Referenced spi_flash_rom_patch.c object was wrongly
linked, which can cause crash due to flash cache disabled
operation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Current write block size does not guarantee proper
write operation, what might cause corrupted data.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
There are few cases where removing this enforcement is desirable:
- linking against binary C++ libs with incompatible type mangling
- linking against system provided headers i.e. native_posix
- compiling with legacy code that assumes a different convention
So let's create a Kconfig symbol for it. This is IMHO a good compromize
compared to using the %"PRId32" abomination everywhere otherwise.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
As the stack can safely keep allocating data during retransmission mode
there is no need to take the tx_sem during retransmission any more.
Data stored in the send_data buffer will be transmitted upon the ack of
the data for which an ack is pending. This the application being fully
stalled when the TCP connection enters retransmission mode.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
After the window_full function has been fixed by looking at the
send_data_total instead of the unacked_len. There is no risk
in sending data in transmission mode.
This reverts commit 0088aaefa0.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Choose can2 as the zephyr,canbus instance and add necessary settings
for testing of the STM32 dual CAN driver implementation.
Signed-off-by: Martin Jäger <martin@libre.solar>
CAN1 and CAN2 share the memory for the filter banks.
This commit adds an offset for filters installed for CAN2, allowing to
use both CAN instances simultaneously.
The hardware allows to freely split the avalable 28 filters between
CAN1 and CAN2. In order to simplify the driver implementation, it only
supports an equal split of 14 filters per instance. This is the same
amount of filters as available in MCUs with only a single CAN.
Signed-off-by: Martin Jäger <martin@libre.solar>
Remove two functions which were only called from one place and did
not improve readibility of the code.
Signed-off-by: Martin Jäger <martin@libre.solar>
This commit unifies the driver initialization for can1 and can2
instances so that a single macro can be used.
Enabling the master clock for can2 as introduced in 8ab81b02 had to
be moved to devicetree in order to have the same CAN_STM32_CONFIG_INST
macro for all instances.
Signed-off-by: Martin Jäger <martin@libre.solar>
Fix advertising failing to resume with BT_ADV_PERSIST set in
bt_hci_le_adv_set_terminated due to BT_ADV_ENABLED not getting
cleared before bt_le_adv_resume gets called
Signed-off-by: Troels Nilsson <trnn@demant.com>
Sometimes we want to entirely decouple the system PM from the device PM,
leaving the devices to manage its own power states using the runtime PM.
This is currently not possible because the suspend / resume code path is
triggering the device PM hooks even when the runtime PM is enabled.
Introduce a new PM_DEVICE_RUNTIME_EXCLUSIVE symbol to allow the platform
to skip the device PM triggers on suspend / resume.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>