for SDK 0.10.0, it consumes more stack size when coverage enabled
on qemu_x86 and mps2_an385 platform, adjust stack size for most of
the test cases, otherwise there will be stack overflow.
Fixes: #14500.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
on platform nrf52810_pca10040, the remaining sram space is not enough
to build test cases kernel.sched.preempt and kernel.poll, temporary
exclude nrf52810_pca10040 on that two cases, will open them when issue
is fixed.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
PR #14776 / commit 915a353255 changed function
zephyr_library_compile_options() to use MD5 instead of RANDOM for build
reproduction reasons. As later predicted by Sebastian Bøe in the PR
(thx), the names generated for these pseudo-libraries won't be unique
anymore if the exact same flag gets added more than once.
To reproduce the issue, simply add the following two lines in some
CMakeLists.txt file like samples/hello_world/CMakeLists.txt:
zephyr_library_compile_options("-Dfubar=barfu")
zephyr_library_compile_options("-Dfubar=barfu")
cmake will then fail like this:
CMake Error at zephyr/cmake/extensions.cmake:403 (add_library):
add_library cannot create target
"options_interface_lib_e689fdb7eb15d801c2f95dd61301fc5e" because
another target with the same name already exists. The existing
target is an interface library created in source directory
"zephyr/samples/hello_world". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
CMakeLists.txt:9 (zephyr_library_compile_options)
As requested by Sebastian, silently discard duplicate options just like
CMake does.
Fixes#15093
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The current idea is that we document zsock_* prefixed symbols, refer
to Open Group POSIX website
(http://pubs.opengroup.org/onlinepubs/9699919799/) for normative
descriptions, and explicitly mention bare POSIX name of a function
too (so e.g. users could find it via search).
Fixes: #13397
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
For some reason we dropped the simulation keyword and this platform is
not running any tests, we are just building the tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename reserved function names in the subsys/ subdirectory except
for static _mod_pub_set and _mod_unbind functions in bluetooth mesh
cfg_srv.c which clash with the similarly named global functions.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Rename reserved function names in arch/ subdirectory. The Python
script gen_priv_stacks.py was updated to follow the 'z_' prefix
naming.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Rename reserved function names in drivers/ subdirectory. Update
function macros concatenatenating function names with '##'. As
there is a conflict between the existing gpio_sch_manage_callback()
and _gpio_sch_manage_callback() names, leave the latter unmodified.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The stack information stored in the thread->stack_info
fields need to represent the actual writable area for
its associated thread. Perform various tests to ensure
that the various reported and specified values are in
agreement.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Unlike the others, this macro was not taking into
account minimum MPU region sizes by filtering through
STACK_SIZE_ALIGN().
Fixes: #15130
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Similar issue to what was fixed earlier in the MPUv3
code. start + size should be <= r_addr_end. Fixes
a problem where the last byte of an MPU region is
incorrectly reported as out-of-bounds.
Fixes: #15131
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Permission management no longer necessary, the former
parameter for the mutex is now simply ignored.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Various globals for the test cases have been moved to
the ztest memory domain data section via ZTEST_DMEM tags
so that user mode can access them.
Some anonymous arrays whose address was being placed in
the msg_subackX structs have been split out so they
are in ztest memory domain.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
For systems without userspace enabled, these work the same
as a k_mutex.
For systems with userspace, the sys_mutex may exist in user
memory. It is still tracked as a kernel object, but has an
underlying k_mutex that is looked up in the kernel object
table.
Future enhancements will optimize sys_mutex to not require
syscalls for uncontended sys_mutexes, using atomic ops
instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The data value in a kernel object structure is specific
to that type of object. Allow this to be a reference to
another C symbol or other compiled code by populating as
a string.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some forthcoming kernel object types like futexes need to
be tracked, but do not contain data that is private to
the kernel.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The legacy struct s_coopFloatReg was never being used, though it was
an empty struct (not wasting space), some symbols were being generate
for it.
Nevertheless, neither C99 nor C11 allow empty structs, so this
was also a violation to the C standards.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
DNS is not part of L3, but as dhcpv4 or the net shell, it is a services
on top of the network stack. So let's gather all in a dedicated
function.
This also rework the order when starting the DNS service. There was an
issue for offload device: these would be fully initialized in
init_rx_queues() which was called after l3_init. l3_init had already
started dns: which would not be able to bind correctly, proving to be
fully dead afterwards. Instead, starting the dns at the very end
ensures that all is initialized properly from devices to stack.
Fixes#15124
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Ports B and C share a common interrupt vector on kw40 and kw41z socs,
but we don't currently have a way to express this in device tree. A
check was added in commit 77cb942a97 that
correctly causes build errors on kw40/41 boards when both ports are
enabled.
Disable the port b interrupt for now until we have a better way to
handle this.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
unify the API of CCM alogrithm's implemation for TinyCrypt,
mbedTLS and cc2520 crypto device to make users easy to use.
Fixes#8339.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This test is only trying to prove that k_thread_foreach() works,
it has nothing to do with stacks. Remove the stack checks
completely.
Fixes: #15044
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
It's really not possible to design a test where we can
enforce expectations on real vs. expected stack size:
- Some platforms may increase stack size over what is expected
due to rounding up the stack buffer area to the next power
of two.
- Some configuration options like CONFIG_STACK_RANDOM
carve out space in the stack buffer, resulting in a stack
size less than what is expected.
Best we can do is just assert that the amount of space
available should be less than the total size reported.
Fixes: #14640
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* the nsim host timer does not work as expected,
disable it, use cycle count to simulate timer tick
* optmize the freq definition of nsim_em
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
We define a system heap and assign our resource pool
from it as k_poll() requires an implicit allocation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We should not be storing the sequence pointer, as
adc_read_async() returns immediately. The memory could
be heap allocated, or on a call stack. Make a copy of
it instead.
Fixes: #15039
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
With or without options headers it has to work. Currently it was
setting always hop-by-hop next header which is obviously wrong but
worked on ipv6_fragment test since that one has only packets with
optional headers (hop-by-hop in that case has to be the first optional
header).
Fixes#14622
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The spec allows to set to no specific value with use of 0xffff.
As this still enables entering values in the invalid range, 3200-65535
for min/max interval, this adds the necessary build checks to prevent
values within this range to be used and at same time check if min
interval is not bigger that max interval.
Fixes#15017
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit initializes the thread.mode variable, right before
dropping thread privilege level to user mode. This is required,
as we need to know the privilege level of the thread, in case
we need to context-switch it -out and -in again (e.g. in case
an interrupt triggers a context-switch).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
k_disable_float is only available in X86 when LAZY_FP_SHARING is
set. Adding this condition before using this function.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixes bug introduced in #14875.
USBDETECTED event is be generated on cable attachment and
when cable is already attached during reset, but not when
the peripheral is re-initialized. When USB-enabled bootloader
is used, target application will not receive this event
and it needs to be generated again. This commit implements
a check against driver being enabled multiple times in case
of application without bootlader starting with cable attached
(both "fake" and "real" events are generated). Such dirty
trick allows bootloader to leave the peripheral in any state
before jumping to target application.
Fixes#15073
Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
Add a note to mention how to get openocd working on windows.
This is taken from stlink-v21.rst file before its reformatting.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The arch.mode status flag is always inline with the actual
thread execution privilege leve. Therefore, we do not need
to be saving-off the thread's mode every time we intend to
context switch-out the thread.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit updates the thread.mode variable, in system
calls, whenever we modify the execution privilege level.
We need to do this, in order to be able to properly handle
context-switching triggered by ISRs, while doing the system
calls. The commit ensures that a context-switch, triggered
by an ISR during or after,a system call will preserve the
right privilege level.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Previous commit c31e659165 changed
the ALWAYS_INLINE macros to avoid functions being inlined for
the purpose of code coverage. This has a side effect of causing
the text sections of kobject_hash.c and priv_stacks_hash.c
to ballon more than 10 times in size. This is caused by
attaching the unused attribute, which results in all those
functions being in the text sections though they are never
used. So just keep the "inline" there.
This also removes -fno-inline from NO_COVERAGE_FLAGS so these
two files are not compiled with flags related to code coverage.
Fixes#15009
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When building with -fno-inline, the compiler complains about
undefined reference to this function. This happens when
building for code coverage. Since this function is only called
within the file, mark it static also.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>