In windows systems the rename() function fails if the new name
of the original file corresponds to a file that already exists.
The fix removes the new file before renaming the original one.
Jira: ZEP-980
Change-Id: Ib3a43db86c0dd3fabb592f53ea7619eb5738bb65
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
Coverity reported 150819 issue, which steams off Flex generated code
from zconf.l in which sprintf() was use. Because of that, the
conf_read_simple() @name parameter could be used to overrun
zconf_open() @fullname by crafting SRCTREE and KCONFIG_ALLCONFIG
environment variables.
Change-Id: I2cff817dccafe0e06b35636bbb7be95e062410af
Coverity-ID: 150819
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Update file to catch any regressions and major changes during
stabilisation period.
Change-Id: Id30dd1827034b96c5478c78f9c388384f51bcbec
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There was a lot of duplication between architectures for the definition
of threads and the "nanokernel" guts. These have been consolidated.
Now, a common file kernel/unified/include/kernel_structs.h holds the
common definitions. Architectures provide two files to complement it:
kernel_arch_data.h and kernel_arch_func.h. The first one contains at
least the struct _thread_arch and struct _kernel_arch data structures,
as well as the struct _callee_saved and struct _caller_saved register
layouts. The second file contains anything that needs what is provided
by the common stuff in kernel_structs.h. Those two files are only meant
to be included in kernel_structs.h in very specific locations.
The thread data structure has been separated into three major parts:
common struct _thread_base and struct k_thread, and arch-specific struct
_thread_arch. The first and third ones are included in the second.
The struct s_NANO data structure has been split into two: common struct
_kernel and arch-specific struct _kernel_arch. The latter is included in
the former.
Offsets files have also changed: nano_offsets.h has been renamed
kernel_offsets.h and is still included by the arch-specific offsets.c.
Also, since the thread and kernel data structures are now made of
sub-structures, offsets have to be added to make up the full offset.
Some of these additions have been consolidated in shorter symbols,
available from kernel/unified/include/offsets_short.h, which includes an
arch-specific offsets_arch_short.h. Most of the code include
offsets_short.h now instead of offsets.h.
Change-Id: I084645cb7e6db8db69aeaaf162963fe157045d5a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Right now the build system builds the host tools over and over again, in some
environments especially when running in an IDE on windows for example,
this is not desired and a set of pre-built host tools should be used.
Provide an option to use pre-built tools instead of building them
from source.
To use, set PREBUILT_HOST_TOOLS to the path where all pre-built host tools
are hosted. To get a prebuilt version of the host tools, build without the
variable set and copy the generated host binaries from outdir. The following
tools are supported:
* conf
* fixdep
* gen_idt
* gen_offset_header
Jira: ZEP-237
Change-Id: Iea505bfd0b50f851ee2781b5117bb6085ab20157
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add board support for ARM V2M Beetle platform.
ARM V2M Beetle board is build around the ARM Beetle Cortex-M3
based processor.
The support has been tested in nanokernel mode with the bringup
application that will be pushed with a future patch.
Jira: ZEP-1245
Change-Id: Ib05a40c072f10149e692283177387cf2cfe32f66
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update with commit 577f12c07e4edd54730dc559a9c7bc44d22bf7dc from
the Linux kernel.
Change-Id: Ie2cabbfea415d26ffacef340d9497342b496dc29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit 0c9152d42d.
This was not ready for merge yet.
Change-Id: I08f69e27929867606bc58cdeffed6540725069a1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update with commit 577f12c07e4edd54730dc559a9c7bc44d22bf7dc from the Linux
kernel.
Change-Id: I6314dd41eb200c87cdcc6f212f13d3351128de0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Quark SE C1000 BLE Core is a nRF51822-QFAA, with 16kB of RAM and
256kB of flash. The configuration is otherwise similar to the Arduino
101 BLE, except that the UART RTS pin is the same as that used by
nrf51_pca10028.
Change-Id: I88cb18876bdde65abcf9a499894f70802046c824
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Similar to C subdir-ccflags, enable similar C++ variable subdir-cxxflags
Change-Id: I4355817bc2d6a80a3eebba9b87fbf54725dda5e7
Signed-off-by: Sakari Poussa <sakari.poussa@intel.com>
sysgen will also now re-run if the build system detects that
the script itself has changed.
Change-Id: I2bf5c4893da088fa27729bc6337bc66cc4cee341
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Added Kconfig and makefiles to be able to build a Zephyr application
on Linux/gcc, and load via OpenOCD.
Validated by running the hello world, and philosophers microkernel
samples, and stepping through the code in gdb.
Jira: ZEP-1109
Change-Id: If5d3e7b1a8ecf5ecf6a00f147742b3bc5716190f
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Sysgen was still generating the TICK_EVENT event needed for the
microkernel system clock timer driver in the unified kernel. That ended
up dragging in alerts all the time, which in turns drag in the system
work queue, which drags in the work queue, which drags in FIFOs.
This shaves 1052 bytes of RAM and 860 bytes of ROM in systems that don't
need these components (on x86 with IAMCU).
Change-Id: Ica56857da2b6444181f10e83f6c986d092aa967b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Now that these platforms pass sanitycheck add them into the list of
platforms we support
Change-Id: If559c80e107505e6b98f81c0e94b9862618b1735
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Enhance the linker script so that all statically-defined kernel
objects of a given type are co-located.
Note 1: This capability is needed so that static kernel objects
can be added to the associated object tracing list. (Some kernel
object types are already co-located to permit the kernel to do
other initialzation on statically-defined objects.)
Note 2: A follow-up commit is needed to ensure statically-
defined kernel objects are placed in the sections referenced
in the linker script.
Note 3: The legacy script info remains for now to allow
applications using the microkernel or nanokernel to continue
to build.
Change-Id: I40d831f9e183fb121c950e30fa8298b6d529375b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Ability to use Zephyr shell by multiple modules simultaneously, each
module for its own usage.
Old shell implementation enabled the user to call only one module
commands, not all of the modules simultaneously.
Change-Id: I0ef8fa2fd190b7490c44fe91d1016363258302c9
Signed-off-by: Yael Avramovich <yael.avramovich@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The commit:
commit f25ac092b9
"Makefile: Restructure for multilibs"
breaks external HAL library linking, by overriding, in the
the second Makefile pass, the LIB_INCLUDE_DIR variable
set in the first Makefile pass from ext/hal Makefiles.
This breaks use of the CONFIG_CC3200SDK_LIBRARY=y option in
the cc3200 SDK, and also likely the QMSI ext/hal/qmsi/Makefile,
when CONFIG_QMSI_LIBRARY=y is set.
This commit just changes the '=' to "+=".
Jira: ZEP-1163
Change-Id: I1aaaaee57378dcd01ab6f2ed4799281b2337eea2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Allows event objects to pend signals in a cumulative way using
the semaphore in a non-binary way.
Jira: ZEP-928
Change-Id: I3ce8a075ef89309118596ec5781c15d4f3289d34
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Before, the kernel would run the main() function twice; first
as an entry in k_task_list, and then again from _main(). The
_main() invocation would be using a potentially insufficient stack
size.
Now if an MDEF file declares a main() thread, invoke it from
_main(), but honor the desired priority and stack size.
Issue: ZEP-1145
Change-Id: I1abf38fc038e270059589b11d96fae1b3f265208
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add support for the STM32F401 chip on the board
Change-Id: I96c0799f3658ecea096fa5971bce9faf21919ee1
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Event is such an overloaded and generic term (event logger, *kernel*
event logger, "protocol" events in other subsystems, etc.), that it is
confusing for the name an object. Events are kinda like signals, but not
exactly, so we chose not to name them 'signals' to prevent further
confusion. "Alerts" felt like a good fit, since they are used to "alert"
an application that something of significance should be addressed and
because an "alert handler" can be proactively registered with an alert.
Change-Id: Ibfeb5eaf0e6e62702ac3fec281d17f8a63145fa1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This better aligns with the actual functionality of the object.
Change-Id: I70abf54f994e92abd7367251089ea4f735d273fe
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add a ccache option to allows enabling the use of ccache for builds
generated by sanitycheck.
Change-Id: Ia997ed29f38a3d2d71ba143456e6fcbc5946d56e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
commit 018b831a36 keeps another elf file in the
outdir which confused the sanitycheck script.
Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
build footprint test as part of the main sanitycheck job, we do not run
the script comparing footprint anymore, it will move to somewhere else.
Change-Id: I36d475bfc3d985bf06a872649eae8c19e1a43aa4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This directive is the default, no need to have an ever-expanding
enumeration of these.
Change-Id: Ic5147fe04de033cb7e97fc5cbe45edd1779d1120
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The BLE core on the Arduino 101 is an nRF51822 QFAA (256kB flash, 16kB
RAM).
Change-Id: Ia802b3eb634c0cd6775c4059c9569bccd915a578
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This script is part of the CI job and currently is run on all defined boards.
We are limited on resources in the CI infra and this part is taking way too
much time. We now select a group of boards to look at instead of just building
everything.
Change-Id: Ifd634e74426c9cc801032b26ad9a9a94a0e55960
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With this patch we introduce unified kernel support for NIOS II.
Not all test cases have been ported, but the following command
currently succeeds with 43/43 passing test cases:
$ sanitycheck --arch=nios2 -xKERNEL_TYPE=unified \
--tag=unified_capable
Issue: ZEP-934
Change-Id: Id8effa0369a6a22c4d0a789fa2a8e108af0e0786
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This fix sanitycheck for apps that specify unified kernel.
Change-Id: I3f1c4d5a566f6833e56bbda097cb497ccdbfbec9
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Python module argparse has a feature to load arguments from a file.
This commit enables such feature on sanitycheck script so files
prefixed by + (plus sign) are loaded during argument parsing stage
and included as arguments to such script.
Jira: ZEP-122
Change-Id: Ibb0a6e8464218a4f58ce4044a5a0860dc5b32480
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Fleshes out the prototype heap memory pool support
to make it fully operational. Noteworthy changes are
listed below:
Tweaks arguments to k_malloc() and k_free() to be more like
malloc() and free(). Similarly, modifies k_free() to take
no action when passed a NULL pointer.
Now stores the complete block descriptor at the start
of any block allocated from the heap memory pool. This
increases memory overhead by 4 bytes per block, but
streamlines the allocation and freeing algorithms. It also
ensures that the routines will work if the block descriptor
internals are changed in the future.
Now allows the heap memory pool to be defined using the
HEAP_MEM_POOL_SIZE configuration option. This will be the
official configuration approach in the unified kernel.
Also allows the heap memory pool to be defined using the
(undocumented) HEAP_SIZE entry in the MDEF. This is provided
for legacy reasons only.
Co-locates memory pool initialization code to keep the line
that causes memory pool initialization to be done during booting
right next to the routine that does the initialization.
Change-Id: Ifea9d88142fb434d4bea38bb1fcc4856a3853d8d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Drop the _m3 from the test name since this can run on M0, M3, M4, etc.
Change-Id: Ia12ece62fc7b42e28f37e191c90c0dead48d40d0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This will make it possible for us to optimize the list of tests we run, for
example, we could exclude footprint tests from the main run because those are
run as part of the footprint checks later in the CI job.
Use like this: sanitycheck -e footprint
Change-Id: I4e7a3aa6fac2ba1c9c99b356f08459da97fda777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Introduce an architecture sorting of boards. This is to allow for
easier maintenance going forward as the number of boards grows. It
will be easier for any scripts to know the board/arch mapping without
having to maintain an explicit list of what boards are associated with
which arch. We can also do things like have architecture maintainers
cover reviews and branches for arch/${ARCH} and boards/${ARCH} going
forward.
Change-Id: I02e0a30292b31fad58fb5dfab2682ad1c5a7d5a7
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
- Reorders parameters where necessary
- Adds alignment parameter to K_MSGQ_DEFINE() for buffer alignment
- Renames parameters where necessary so they are more intuitive
Change-Id: I0b53105c04109127897bf4790e6908082f82da4e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
- Renames to K_MEM_POOL_DEFINE() for consistency
- Adds alignment parameter to align the pool buffer.
Jira: ZEP-926
Change-Id: I6cf0a1ce45c3a0fc5f0675047d8928659df1e75e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>