Colorama needs to be initialized, and for colors to display correctly on
Windows one needs to use the `USES_TERMINAL` option in CMake.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Certain symbols do not contain a valid path, instead showing
`<built-in>` in the filename attribute. This leads to the resolve() call
failing on Windows, since the `<>` characters are not allowed in
filenames there. Fix this by catching the exception and skipping the
call in that case.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When this code was moved from a standalone sample to an optional shell
feature the documentation on how this works and caveats was lost. Put
it back so it can be referenced in issue explanations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When lazy loading of CCCs are enabled there is no settings set handler
register for the 'bt/ccc' key, this means that the settings set handler
for 'bt' key is called instead. This handler does not know what to do
for the 'ccc' subkey, and returns -ENOENT for the entry.
This results in an error message logged by the settings subsystem.
"E: set-value failure. key: bt/ccc/f8c39e2f98210 error(-2)"
Fix this by providing an empty handler for the 'bt/ccc' key when
Lazy Loading feature is enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Receiver part reworked to not block in interrupt and rely on assumption
that uart_fifo_read is capable of reading incoming data from the HW.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix periodic advertising delete implementation, to not
NULL the callback pointer when deleting the instance so
that the application's terminate callback can be called
thereafter.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This new option allows to include `sockets_tls.c` into the build when
socket offloading is enabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Given that the offloaded poll handling differs from the poll handling of
native sockets (entire poll function call is offloaded), some
adjustements were needed to make TLS socket work with offloaded poll
calls.
To achieve this, in case socket offloading is used, instead of jumping
directly to the offloaded poll call, a TLS wrapper for the offloaded
poll will be called. This wrapper will do additional checks at the
mbedtls level, to verify that the event is only notified to the caller
when the application data is available (i. e. not to report events
during handshake or when partial data is received, not ready to
decrypt).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Given that TLS/DTLS socket now creates an underlying TCP/UDP socket, the
FD consumption is increased in echo_client and echo_server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Separate TLS sockets implementation from net_context layer. Instead of
calling net_context functions directly, create an underlying TCP/UDP
socket, and call socket functions on it instead. This results in a
simpler design, where we don't need to duplicate specific parts of code
from the native socket implementation. Additionally, this allows to use
a different TCP/UDP stack underneath (i. e. when sockets offloading is
used).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit adds helper function to verify protocol, which was done in
two different places in the code. The function returns the underlying
protocol information on success.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If the recvfrom() in the test returns EAGAIN, try again in order
to make sure that we have really received the data.
Fixes#27963
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In order to be possible to debug usermode threads need to be able
issue breakpoint and debug exceptions. To do this it is necessary to
set DPL bits to, at least, the same CPL level.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
GDB on host may ask the guest to read the a pointer contents even if
it is pointing to NULL. Send an error code when this occurs.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Sample example built with gdbstub enabled. Two serials are used, one for
normal output and another one that is used talk with gdb in the host
machine.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
It implements gdb remote protocol to talk with a host gdb during the
debug session. The implementation is divided in three layers:
1 - The top layer that is responsible for the gdb remote protocol.
2 - An architecture specific layer responsible to write/read registers,
set breakpoints, handle exceptions, ...
3 - A transport layer to be used to communicate with the host
The communication with GDB in the host is synchronous and the systems
stops execution waiting for instructions and return its execution after
a "continue" or "step" command. The protocol has an exception that is
when the host sends a packet to cause an interruption, usually triggered
by a Ctrl-C. This implementation ignores this instruction though.
This initial work supports only X86 using uart as backend.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The same code was being copypasted in k_thread_abort()
implementations, just move into z_thread_single_abort().
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This isn't needed; match the vanilla implementation
in kernel/thread_abort.c and do this unlocked. This
should improve system latency.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A check was being done that was a more obscure way of
calling arch_is_in_isr(). Add a comment explaining
why we need to trigger PendSV.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The conversion last year mixed up uart-pipe with uart-mcumgr. Revert
to the pre-conversion relationship.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The default priority for I2C controller initialization is POST_KERNEL
60 (SPI 70), while the default priority for device configuration is
POST_KERNEL 50. Thus the EEPROM is being initialized before its
controller. While for this driver that wouldn't be an issue recent
changes mean the device lookup returns NULL before the device is
initialized.
Change the AT2X priority to 75 so it falls between the I2C and SPI
drivers and the default ethernet priority (80), since some ethernet
controllers may store the MAC address in EEPROM.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This reverts commit b51eeb03f4.
The linker script is now putting read-only material in writable
segments, which causes glib with -D_FORTIFY_SOURCE=2 to abort.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
@ulfalizer hasn't been active for several months, remove him and add
@mbolivar-nordic. We can add @ulfalizer back if he comes back to the
project.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
SERIAL_HAS_DRIVER and UART_INTERRUPT_DRIVEN should be selected by the
driver. If something needs is should dependson these options.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
TEST_RANDOM_GENERATOR should not be used in subsystems because it does
not generate truly random numbers. This is indented to be used only
for tests purpose.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Do not quit if there is no image generation tool, just report the issue
and continue. Happens on MacOS where there is no tool for generation the
SPI image.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When connection is closed and we send ACK flag, use proper seq
values so that any data that is still in flight will get acked too.
Currently this assumes that window is still open.
Fixes#27876
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove special handling of the ARM Cortex-M1 DesignStart FPGA reference
design running on the Digilent Arty after CONFIG_NUM_IRQS was reduced
from 8 to 7.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The ARM Cortex-M1/M3 DesignStart FPGA reference designs both use IRQ 7
(the last IRQ line) as a level-detect non-interrupt signal to determine
whether the V2C-DAPLINK shield is installed. Thus IRQ 7 cannot be used
as a regular IRQ line.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Extend check to determine a usable ARM NVIC IRQ line to verify that the
IRQ line is not always pending.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for running the JEDEC SPI NOR flash sample on the ARM
Cortex-M3 DesignStart FPGA reference implementation.
Special care is needed to avoid overwriting part of the FPGA
configuration bitstream, which is stored in the onboard QSPI flash.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add board definition for the ARM Cortex-M3 DesignStart FPGA reference
design running on the Digilent Arty development board.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Refactor the ARM Cortex-M1 DesignStart FPGA/Digilent Arty A7 board
definition to prepare for Cortex-M3 support.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
We add a simple test-case for verifying the behavior of the
Cortex-M IRQ target state management. We add an additional
test only for TrustZone-enabled Cortex-M targets running
in Secure mode. We explicitly exclude ARMv8-M platforms that
enable Non-Secure FW build by default from running the test.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We implement an ARM-only API for ARM Secure Firmware,
to set all NVIC IRQ lines to target the Non-Secure state.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>