We are getting warnings when building with native port:
used with length equal to number of elements without multiplication by
element size
This fixes the call of memset.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The following 3 testcases are blacklisted for the POSIX
arch / simple_process BOARD:
* tests/drivers/ipm : won't compile due to missing
__stdout_hook_install() [part of minimal libc]
(POSIX arch uses the native libc)
* tests/kernel/mem_protect/stackprot : will crash
"natively" when trying to corrupt the stack and therefore
will fail the testcase. The current understanding is that
the POSIX arch should let the native OS handle faults,
so they can be debugged with the native tools.
* samples/cpp_synchronization : it is not possible
to build cpp code yet on top of the posix arch
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Added small delay in each iteration of the critical_loop
loop for the posix arch:
For this arch this loop and critical_rtn would otherwise
run in 0 time and therefore the test would never finish.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
test/timer/timer_api use k_busy_wait to implement the
tests' busy_wait_ms, for archs which require a different
type of busy waiting
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
terminate process as soon as the testcase is done
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For the POSIX arch we rely on the native OS to handle
segfaults, and stack overflows.
So that we can debug them with normal native tools.
Therefore these 2 are ifdef'ed for this arch in this test
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
With the native port we are able to generate coverage reports, add the
needed options to the compliler and add a kconfig option to enable this
on the supported architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
benchmark/app_kernel test was giving a float exception
if the operations were performed faster than the
system timer resolution.
Added a safety macro in all divisions to avoid the fault
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Native port now adds .exe to the generated ELF
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To indicate the generated binary is executable on the host, add .exe
extension to the generated ELF file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
All runner logic was implemented in qemu.cmake, remove the generic stuff
and make qemu.cmake qemu specific.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This adds support of 'make run' to the native port allowing us to run
applications natively on the host instead of qemu.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Right now we are hardcoded to only qemu, with the native port, we make
this more generic and support this in a plugin mode where a running has
its own cmake definitons implementing the various targets.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
A new arch (posix) which relies on pthreads to emulate the context
switching
A new soc for it (inf_clock) which emulates a CPU running at an
infinely high clock (so when the CPU is awaken it runs till completion
in 0 time)
A new board, which provides a trivial system tick timer and
irq generation.
Origin: Original
Fixes#1891
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Having posix headers in the default include path causes issues with the
posix port. Move to a sub-directory to avoid any conflicts.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Was ARM specific and could not be used by other architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When building a native application, we use the host provided libc, so do
not build minimal libc or newlib.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Environment variables should be checked with if(DEFINED
ENV{ESP_IDF_PATH}).
if($ENV{ESP_IDF_PATH}) was not evaluating to true as it should have
when env[ESP_IDF_PATH] was set.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
To avoid warnings from cmake such as:
'path' is reserved or not valid for certain CMake features, such as
generator expressions, and may result in undefined behavior.
This can be seen in Jenkins for example where @ is used when multiple
jobs are run on the same machine.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Was enabled by default in gitlint, nothing really bad about tabs,
especially when copy-pasting into commit messages.
Fixes#5453
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Checking for TERM being undefined before doing tput with colors is not
enough; if TERM is defined as 'dumb', this thing also behaves dumbly.
In fact, the whole trying to do colors thing is dumb and causes all
kinds of headache in corner cases, so just wrap anything smelling like
color in a check for TERM being undefined or 'dumb' and be done with
it.
It shall take care of different automation mechanisms that don't
invoke 'make htmldocs' from a user console.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The PIO cores on Altera Nios-II processors can be used
for GPIOs and each PIO core can be configured as Input only,
Output only or as Bidirectional port from the Qsys tool.
The present Nios-II softcpu image on the Zephyr only has the
support for Output only port and the PIOs[0:3] are wired to
LED[0:3] on the Altera MAX10 board.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
when a current thread is added to a memory domain the pages/sections
must be configured immediately.
A problem occurs when we add a thread to current and then drop
down to usermode. In such a case memory domain will become active
the next time a swap occurs.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Add an architecure specfic code for the memory domain
configuration. This is needed to support a memory domain API
k_mem_domain_add_thread.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
-Wl,--print-memory-usage is a relatively new LD feature (2015) and is
not supported by the espressif toolchain. Unfortunately the toolchain
compatibility test was broken as it was not using the flag when
linking.
The root cause lies in how we test LD compatibility and this same fix
must be applied again in e.g. target_ld_options().
This patch fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5458
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Currently all posix APIs are put into single files (pthread.c).
This patch creates separate files for different API areas.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Fixes many instances of errors similar to below:
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5927:22:
error: declaration of ‘s_link’ shadows a previous
local [-Werror=shadow]
static memq_link_t s_link;
^~~~~~
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5905:21:
note: shadowed declaration is here
static memq_link_t s_link;
^~~~~~
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The properties definitions were not doing much because they were
defined after they were used. They were actually overriding the true
properties with "".
Moving them earlier ensures that the properties behave as expected, as
documented global mutable variables.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Use the existing J-Link functionality to support debugging nRF5x targets
with GDB over a Segger J-Link USB connection.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>