Always use runtime packaging in immediate mode. Removing attempt to
package on stack if possible. It would be done only to speed up
logging but that is not a requirement in immediate mode where
packaging time is fractional compared to backend processing. Using
runtime packaging also reduces stack usage in the context which calls
log message.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
NET_SOCKET_GET_NAME macro adds some extra parenthesis that, on XCC (based
on GCC 4.2) ends up in the generated assembly, thus causing `as` to error
with:
Error: junk at end of line, first unrecognized character is `('
It appears that the parenthesis are actually concatenated to the
generated name for identifier. This patch just removes them.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
The x86 and xtensa implementations of irq_offload() invoke synchronous
interrupts on the local CPU, and are therefore safe to use from within
an interrupt context. This is a cheap and portable way to exercise
nested interrupts, which are otherwise highly platform-dependent to
test. Add a kconfig to signal the capability.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
As use for simple message with no-segment send or receive.
This will be useful for ram-resource-constrained device.
such as bbc-microbit-v1.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Added support for Portfolio object support because LwM2M v1.1 conformance
test requirement that. This object is only for conformance test purposing.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Before this change, enabling CONFIG_BT_SETTINGS and calling
settings_load(), but delaying / not calling bt_enable would trigger an
assertion error due to a timeout. The fault is that the settings load
handler for the Bluetooth host assumes bt_enable has already been called
and sends HCI commands to the controller. This times out if HCI is not
running.
The fix is to skip loading Bluetooth settings before bt_enable. The doc
is updated to guide the user on how to enable Bluetooth after settings
have been loaded before.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This structure is no longer used by drivers. Instead, each driver is
responsible to define the required fields and the types that are needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Introduce a new "zephyr,memory-region" compatible to be used when a new
memory region must be created in the linker script from the devicetree
nodes using the compatible.
Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new
LINKER_DT_REGIONS macro to cycle through all the compatible regions.
In the same PR modify the DTS files and the linker scripts.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This enables the below configuration so the AP and EC are able to
communicate over eSPI:
CONFIG_ESPI_PERIPHERAL_EC_HOST_CMD
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION
CONFIG_ESPI_PERIPHERAL_CUSTOM_OPCODE
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
This align the RISC-V linker script with ARM linker script.
(The snippets-ram-sections.ld is included first inside the
RAMABLE_REGION)
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Clarify that the reader MUST track the last sequence number read and
that the 'start' offset is not involved in that.
Some pre-conceptions + the sentence "the current state of the stream"
threw me off for a while. Thanks Andy for explaining this to me.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Makes the IRQ_CONNECT macro statically declarable for Xtensa (nothing
prevented it except its structuring). Allows for IRQ_CONNECT usage
on a xtensa only platform to be declared statically avoiding the
fluff of setting up and enabling irqs for cavs gpdma.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add the extern declarations for the data and bss sub-section start and
end markers for memory of type OCM, so that the bss section within the
OCM memory can be properly zeroed at boot time.
Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
Avoids copying the address and assigning the SID if the
PA list is used, as the values are ignored by the
controller, and thus there is no reason to copy
or assign the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Logging v2 is utilizing complex preprocessing operations to
prepare message at compile time. Multiple operations are peformed
on log message arguments. However, it is expected that argument
will be evaluated only once (e.g. it can be a call to a function
with side effects). Adding additional layer which creates copies
of user arguments on stack and passes them to further processing.
Updated test for log_msg2 which is using internal macro which
got renamed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Logging v2 did not support getting memory usage data. Adding this
support by creating common api for getting current and maximum
usage. Tracking of maximum usage is optional and can be enabled
using CONFIG_LOG_MEM_UTILIZATION.
Updated shell command to use common API.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add API to fetch current buffer usage. Add option to track
maximum buffer usage and API to fetch that value.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Tests that when a collision happens, the connection attempt is retried
and that it succeeds.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
The BT_BUF_ISO_SIZE macro was using BT_HCI_ISO_DATA_HDR_SIZE
which does not account for the optional timestamp value in
the header. Changed to use BT_HCI_ISO_TS_DATA_HDR_SIZE.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Ensure that ISO-TP Consecutive Frames (CF) are sent in
FIFO/chronological order.
In order to ensure this, we can only have one CF queued in the CAN
controller TX mailboxes at a time, since transmit order for mailboxes
with the same CAN-ID (priority) is hardware specific.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Document the expected CAN controller driver behavior when multiple CAN
frames are queued for transmission.
Fixes: #26541
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Clang introduced _Generic support in 3.0 but it was buggy until
3.8. Updated guard to not use _Generic in clang < 3.8.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Placing a struct with a flexible array member inside another struct not
as the last member is a GCC only extension. The offending macro is only
used to allocate enough space sufficient for a `struct net_buf`.
Therefore the dummy type declaration can simply use a byte array of the
same size as a `struct net_buf`, instead of the `struct net_buf` itself.
Fixes#42586.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This reverts commit 3f56567b08 which
caused build failures with the XCC toolchain on all samples and tests,
as well as a runtime failure with the nrf52_bsim board on
tests/bluetooth/bsim_bt/bsim_test_mesh.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Correct DT property to set correct STM32_PLL_XTPRE value.
The driver bindings defined `xtpre` instead of used `xtre`
in the `DT_PROP` macro.
That allows to use F1 PLL clock with division by 2.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
These functions help the code to be more self-documenting. Use them to
make the code's intent clearer.
Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
Logging v2 is utilizing complex preprocessing operations to
prepare message at compile time. Multiple operations are peformed
on log message arguments. However, it is expected that argument
will be evaluated only once (e.g. it can be a call to a function
with side effects). Adding additional layer which creates copies
of user arguments on stack and passes them to further processing.
Updated test for log_msg2 which is using internal macro which
got renamed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
many functions in the lwm2m librarys api take a pathstr argument
that is never written to, so make it const
Signed-off-by: Henning Fleddermann <henning.fleddermann@grandcentrix.net>
XCC (which is based on GCC 4.2) needs the initializer of one of the
union elements to be enclosed in brackets.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
As described in #42403, there was an issue with the existing crc16_ansi()
implementation, since it was not calculating the CRC-16-ANSI (aka
CRC-16-MODBUS). This is because the existing crc16() function only
supported non-reflected input and output (and the CRC-16-ANSI requires
reflection on both) and also it did not seem to support correctly inial
seeds different from 0x0000 (and, again, the CRC-16-ANSI requires 0xffff
as an initial seed).
This commit replaces the existing crc16() with a functional pair,
crc16() and crc16_reflect(), that also work with any poly, any initial seed
and allow to select whether reflection is performed.
It also adapts crc16_ansi() so that it actually returns the correct CRC.
Fixes#42403.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The crc16_ccitt and crc16_itu_t functions' documentation could lead to
slight misunderstandings because of the fact that, although they bear
those names, those functions are actually able to compute CRCs that bear
other names, depending on the inital seed provided and an optional XOR
on the result.
In order to avoid confusion, document thoroughly with links to the
standard reveng page that lists all existing CRCs.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This adds to the cbprintf_packaged library to allow external
formatters to be used by the way of callback. This will allow
logging backends to use their own formatter for output if
needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>