The net_dhcpv4_stop() function stops the event listener for any IF_UP
events previously. In case multiple interfaces are used and optionally
being switched over, it could result in disabling dhcp unintentionally.
The callback is initialized at the init function and added/removed in
the start/stop function based on the interface list being empty
or not. (first added, last removed)
The event handler checks if the interface is in the list before acting
on it.
Signed-off-by: Vincent van der Locht <vincent@vlotech.nl>
In case "net_dhcpv4_stop(..) is called when the interface is
in NET_DHCPV4_RENEWING state, the address is not removed.
When deleting the address in the NET_DHCPV4_RENEWING state
means the status is always equal to the moment before _start
is called.
Signed-off-by: Vincent van der Locht <vincent@vlotech.nl>
The unit test gives net_context_get() an invalid protocol family
value which triggers an assert in net_context.c:160
This assert fails the test when it should not as we properly
check the return value. Fix this by disabling asserts for this
test.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The network interface mac address was not initialized properly
which caused assert in net_if.c:2881 to fail.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Avoid dependency to logging subsystem in NET_ASSERT*(), so
use standard Zephyr asserts instead.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use generic logging macros LOG_*() instead of NET_*() as the
latter are mostly meant for internal networking stack use.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove network specific default and max log level setting
and start to use the zephyr logging values for those.
Remove LOG_MODULE_REGISTER() from net_core.h and place the
calls into .c files. This is done in order to avoid weird
compiler errors in some cases and to make the code look similar
as other subsystems.
Fixes#11343Fixes#11659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Solves an issue where any output from the user's shell's cd command
would be prepended to ZEPHYR_BASE when sourcing zephyr_env.sh.
Fixes#11894.
Signed-off-by: Linden Krouse <ztaticnull@gmail.com>
Previously, this was only built if CONFIG_EXCEPTION_DEBUG
was enabled, but CONFIG_USERSPACE needs it too for validating
strings sent in from user mode.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Adding ninja targets based on the files that are to be copied into the
build folder doesn't seem to speed up the build, so simplify the CMake
script by relying on extract_content.py to do the copy.
Numbers on my machine:
* master
clean: 6m45.541s, 6m8.113s
incremental: 1m24.233s, 1m32.720s
* revert
clean: 6m25.221s, 6m19.751s
incremental:1m20.893s, 1m20.337s
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add Bluetooth, 802.15.4 and OpenThread overlay configurations to socket
echo_client and echo_server samples.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sample application to demonstrate usage of cmsis_rtos_v1 APIs
with dining philosopher's problem implementation.
This covers semaphores, mutex and thread APIs of CMSIS RTOS V1.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
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>