Fix the following issues regarding the JUNIT results file
format (xml):
The logger produces illegal xml characters in the text output
=> Ensure that any non-valid xml character is replaced with
the valid xml scapes
When GNU parallel is installed and a testcase fails, the
xml output was malformed => Fixed it
Also store in the Junit output the processes stderr
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
In commit d8e3ea6bc2
the LF clock interrupt was enabled, which causes its interrupt
handler to be used. This interrupt handler interacts with the
NRF_POWER registers.
Therefore require using the newer HW models which include a stub
of this registers.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
API documentation (generated from doxygen comments) visibility
improvement by using a light-blue background on fields (vs. grey),
matching the Kconfig option documentation.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
In the wake of dfa7a354ff2a31fea8614b3876b051aadc30b242, where
the inclusions for MPU APIs were clean-up, we need to directly
include arm_core_mpu_dev.h in the userspace test suite, which
invokes arm_core_mpu_enable/disable(), directly. The same is
already done for ARC MPU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
arm_core_mpu.h and arm_core_mpu.c defined and implement kernel
APIs for memory protection, respectively. Therefore, they do not
need to directly include ARM CMSIS headers, or arm_mpu.h (or
nxp_mpu.h) which are supposed to define MPU-related kernel types
and convenience macros for the specific MPU architecture. These
headers are indirectly included by including kernel.h.
Similarly, arm_mpu.h shall not need to include internal/external
headers of memory protection APIs.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit does the following:
- it introduces additional convenience macros for representing
MPU attributions for no-cacheability, in both ARMv7-M and
ARMv8-M MPU architectures,
- it adds documentation in K_MEM_PARTITION_IS_WRITABLE/CACHEABLE
macros in all macro definitions in the different MPU variants
- it moves the type definition of k_mem_partition_attr_t inside
the architecture-specific MPU headers, so it can be defined
per-architecture. It generalizes app_mem_domain.h, to be able
to work with _any_ (struct) type of k_mem_partition_attr_t.
- it refactors the type of k_mem_partition_attr_t for ARMv8-M
to comply with the MPU register API.
- for NXP MPU, the commit moves the macros for region access
permissions' attributes inside nxp_mpu.h, to align with what
we do for ARM MPU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit exposes k_mem_partition_attr_t outside User Mode, so
we can use struct k_mem_partition for defining memory partitions
outside the scope of user space (for example, to describe thread
stack guards or no-cacheable MPU regions). A requirement is that
the Zephyr build supports Memory protection. To signify this, a
new hidden, all-architecture Kconfig symbol is defined (MPU). In
the wake of exposing k_mem_partition_attr_t, the commit exposes
the MPU architecture-specific access permission attribute macros
outside the User space context (for all ARCHs), so they can be
used in a more generic way.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When a memory partition is removed, it is not required
to clear the start and attr fields, since a free partition
is only indicated by a zero size field. This commit removes
the un-necessary clearing of start and attr fields.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
MEM_PARTITION_ENTRY is problematic, as it assumes that
struct k_mem_partition contains a k_mem_partition_attr_t
field, which is only true if Memory Protection is supported.
Additionally, it works with k_mem_partition_attr_t being a
single element object (scalar or single element structure).
This commit removes the macro function and updates macro
K_MEM_PARTITION_DEFINE() (MEM_PARTITION_ENTRY has only been
used in that macro function definition).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The newly proposed script must have report mode implemented
in them since they are less verbose warnings and helpful
in automated CI when throwing warnings to users.
Also, fixup mailing list links to follow .rst rules for
documentation using bullets while rectifying unwanted bold text.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
The current implementation of continuous run operation using
command `./scripts/coccicheck` i.e., without specifying any options,
`coccicheck` default runs in `report` mode with all available
coccinelle scripts present at `scripts/coccinelle/`.
Not all scripts have report mode implemented in them, which
leads to failure of coccicheck.
With this new implementation we choose whatever available mode
is present in coccinelle script and pass it to MODE variable
without stopping continuous coverage.
And perhaps if there are plans to add `coccicheck` as a sanity
checker in future to the Zephyr automated CI, then certainly we
want the warnings/errors produced by scripts to be less verbose
to the users.
Therefore, in this new implementation we prioritise the modes as:
1. report
2. context
3. patch
and lastly falling to
4. org
Lastly, in order to differentiate between outputs of various
coccinelle scripts being run, `x------x` separator has been used
to make reports mode readable.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Changes to uart.h in PR #10820 caused a new warning from Sphinx/Breathe
that we can classify as a "known issue" and should ignore.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
FIX issue #10571 and #10593
atomic_xxx() functions expect the bit argument to be the
position index inside the target integer and not its
numerical representation (e. g. 5 means the 5th bit and not 32).
The original code could potentially override an adiacent variable.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Corrected state binding. With this commit Light Lightness
actual state would not cross its upper & lower limit.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Function names should have a verb as the last component.
As per this standard, rename some fuunctions names.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Due to recent changes some bugs had introduced in Gen. Level Move
GET & Publish functionalities. Now separatly introduced
gen_level_move_get() and gen_level_move_publisher() to resolved it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This patch adds a dependency from the 'flash' target to
the 'mergehex' target IF files to be merged are configured.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Add a dts binding file for the cc1200 and move the Kconfig options for
SPI and GPIOs to DTS for the CC1200 driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_TEXT_SECTION_OFFSET allows the entire image to be moved
in memory to allow space for some type of header. The mcubootloader
can boot only such images which reserve some space for the header.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Updated documentation according to recent changes:
1. Removed options from the shell.
2. Simplified help usage.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
1. Created new shell module: shell_help.
2. Simplified command handlers with new shell print macros.
3. Removed help functions from command handlers.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removing help "options" from shell API.
Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.
Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.
And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This patch adds support for blocking tcp receive (with timeout).
This patch removes dedicated socket polling thread to use common
eswifi workqueue instead.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Current implementation unconditionnaly performs blocking connect
and send. Add support for non-blocking version using eswifi workqueue.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
As it stands now, the console effectively works in raw mode, so all
messages should end with "\r\n". This was missed previously, because
the sample was run in QEMU, on top of POSIX cooked console. Running
on real hardware showed this issue.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The USB_UART_CONSOLE option itself is not enough to enable console on
the USB UART port. Most of the code is actually shared with
UART_CONSOLE, so this symbol has to be selected.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
USB CDC ACM is a serial driver like another. Therefore select both
SERIAL_HAS_DRIVER and SERIAL_SUPPORT_INTERRUPT. This allows one to
enable the console driver without having to enable another serial
driver.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The CDC ACM driver has to emulate the TX and RX interrupts from the USB
ones. However it does not correctly emulate them as "TX buffer empty"
and "RX buffer not empty" interrupts.
For "TX buffer empty" interrupt:
- Reading the interrupt status should not clear the interrupt
- Enabling the interrupt should fire an interrupt if the TX buffer is
empty
- An interrupt should be triggered when the USB device get configured
For "RX buffer not empty" interrupt:
- Reading the interrupt status should not clear the interrupt
- Enabling the interrupt should fire an interrupt if the RX buffer is
not empty
This make the a console on the USB CDC ACM port usable for the shell
and the logs.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix issue caused by 3fc497ac9a
This change removes `rtt` and `systemview` from header includes
as these are already placed in the path.
Also `SEGGER_SYSVIEW_ConfDefaults.h` header included from
`SEGGER_SYSVIEW_Int.h` is placed higher to make sure `INLINE`
definition is properly visible.
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
Shell log backends were initialized from shell context. After
lowering logger thread priority order has been flipped. That
revealed a bug where shell logger backend was enabled before
backend ID's has been assigned during logger initialization.
ID assignment is moved to log backend enabling function making
it independent of order of initialization.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This patch fixes a bug where a incorrect lower case
variable 'MERGED_HEX_NAME' resulted in the 'flash'
target not getting the correct path to the hex file to flash.
This since cmake/flash/CMakeLists.txt uses the variable
${MERGED_HEX_NAME}.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
L2 is the one who requests the packet to be sent, and not via net_if API
anymore. Stellaris driver was merged right after this behaviour change
and was thus lacking the proper modification.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Nordic devices detect edge interrupts through the PORT event which is
generated on a rising edge of DETECT, which itself is asserted when any
GPIO is configured for sense level detection and the GPIO's input signal
matches the configuration.
The previous code in Zephyr attempts to detect when at least one GPIO
SENSE signal is still asserted, and intentionally leaves the PORT event
uncleared to ensure the interrupt is re-entered.
This approach fails when no pin satisfies its SENSE condition during the
check but at least one input changes level between the completion of the
check and the clear of the PORT event. Such a failure can be observed
on the pca20020 hardware when multiple sensors configured for level
triggers are active. In this situation the corresponding sensor trigger
signals remain asserted but the PORT event required to drive their
processing has already been cleared.
The fix is to ensure that the SENSE configuration for all GPIOs across
all port instances is disabled prior to unconditionally clearing the
PORT event, then re-enabling the SENSE configuration for all GPIOs once
callbacks associated with detected SENSE triggers have been performed.
The act of re-enabling will ensure any relevant SENSE condition causes a
new rising edge on DETECT and so a new PORT event.
Closes issue #11806
See: https://devzone.nordicsemi.com/f/nordic-q-a/7246/missing-interrupts-on-gpioe-port-events
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Previously, this macro after the main line would print a tab without
newline, leading to messy output. Also, as printk() was made to
return void, remove explicit casts to (void) in its calls.
Before:
tx_fifo: 0x20007298 42
ASSERTION FAIL [(len & 3) == 0 && len >= 4] @ eth_smsc911x.c:83:
eth_smsc9220_isr: 8 8
in RX FIFO: pkts: 1, bytes: 48
After:
tx_fifo: 0x20007298 42
ASSERTION FAIL [(len & 3) == 0 && len >= 4] @ eth_smsc911x.c:83
eth_smsc9220_isr: 8 8
in RX FIFO: pkts: 1, bytes: 48
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
It is necessary to delay setting lock_count = 0 because an unlocking thread
maybe swapped out when it calls adjust_owner_prio(). If the thread that starts
running sees lock_count = 0 it will successfully acquire the mutex even though
it is not fully unlocked yet.
Fixes#11798.
Signed-off-by: Nicolás Bértolo <nicolasbertolo@gmail.com>
No need to store/reset/recompute the chksums, only compute it again and
if it's not 0: drop the packet.
RFC 1071:
"To check a checksum, the 1's complement sum is computed over the
same set of octets, including the checksum field. If the result
is all 1 bits (-0 in 1's complement arithmetic), the check succeeds."
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
IPv4, ICMPv4/6, UDP, TCP: all checksums are meant to be one's complement
on a calculated sum. Thus return one's complement already from the right
place instead of applying it in each and every place where
net_calc_chksum is called.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Removed kconfig option for setting shell thread priority and fix
it to K_LOWEST_APPLICATION_THREAD_PRIO.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
With python3.7 we get the following warning:
extract_dts_includes.py:496: DeprecationWarning: Using or
importing the ABCs from 'collections' instead of from
'collections.abc' is deprecated, and in 3.8 it will stop
working.
Fix this by using 'from collections.abc import Mapping' instead of
'import collections'.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>