PTS requires the composition data of size that cannot be sent in
single PDU. This patch adds Configuration and Health Client models
to the root_models to increase the Elements size in Composition Data
Page 0.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Specifying a C standard triggered a compiler warning on Ubuntu (gcc
5.4.0) and a compiler error on Mac OS 10.12.6. Omit specifying the
standard and let the host toolchain use it's default instead. Tested
on Mac OS and Ubuntu 16.04.3.
This fixes#5640
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We don't need to store the full k_mem_block, rather just the
k_mem_block_id. In effect, this saves 4 bytes of memory per allocated
memory chunk. Also take advantage of the newly introduced
k_mem_pool_free_id API here.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The k_mem_pool_free API has no use for the full k_mem_block struct. In
particular, it only needs the k_mem_block_id. Introduce a new API
which takes only this essential struct. This paves the way to
simplify & improve the k_malloc/k_free implementation a bit.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When Kconfiglib was introduced it caused a significant performance
issue. This patch uses pruning to mitigate the performance issue.
The pruning exploits the fact that before the Kconfig database is
parsed we already know what ARCH and BOARD has been selected. So in
theory we could prune away all Kconfig sources that are not related to
the current ARCH or BOARD. In practice, it is only the Kconfig sources
in zephyr/arch/$ARCH and zephyr/board/$ARCH/ that are easy to prune.
Still, that is quite a few Kconfig sources. For qemu_x86 this patch
reduced the number of parsed Kconfig source files from 632 to
272. This pruning resulted in a incremental reconfiguration (time
cmake ..) speedup of 21% (0.56s to 0.46) and a clean build speedup of
4% (Using board qemu_x86 and sample hello_world).
Furthermore, it should be easier to maintain ARCH's and BOARD's
out-of-tree since the user now has a mechanism to redirect where
Kconfig sources are found. But this has not been explored.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Kconfiglib does not support merging fragments without parsing the
entire Kconfig "database". For Zephyr this means we no longer get a
performance gain from splitting up the fragment-merging and the
.config generation.
This patch removes the seperated merge step and it's associated
caching mechanism. Now we do a full Kconfig execution on every
reconfiguration.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We have been using a fork of the Linux kernel's Kconfig system to
configure the Zephyr tree. The issue is that this is a native tool
written in C that is not easy to compile for Windows. This patch
replaces the use of the conf executable with kconfig.py, a script that
uses Kconfiglib to generate the .config and autoconf.h files required to
compile Zephyr.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some projects use wildcards when sourcing a Kconfig file. Add
support for globbing the files that match the wildcards and process
them one by one.
Origin: https://github.com/carlescufi/Kconfiglib/tree/zephyr
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Import Kconfiglib, the Python Kconfig parsing library.
Origin: https://github.com/ulfalizer/Kconfiglib
Revision: 8d30e5bb1ad5cab16d1226cc5cd3a03d64664f5d
Note that this will in time replace doc/scripts/genrest/kconfiglib.py,
which is an earlier version and should not live in that folder.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Updated previously broken links to emulation setup install, instructions
and Getting Started Guide.
Also added a few clarifications for the prerequisites setup.
Fixes#5601
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The SAM0 has a 64 byte page (the programing unit) with 4 pages to a
row (the erase unit). This driver implements a read/modify/write to
emulate the byte level writes used by NFFS.
Signed-off-by: Michael Hope <mlhx@google.com>
* Added a figure explaining how layering of the posix arch
compares to the embedded builds
* One minor grammar change in last paragraph
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
In STM32 family, RNG IP is available only on F4 and L4 series.
Besides STM32F401 does not support is neither.
Get entropy driver available on STM32 devices supporting it and
generate a compilation issue on STM32 devices that do not own
the RNG IP.
Solves #5448
Signed-Off-By: Erwan Gouriou <erwan.gouriou@linaro.org>
On STM32L4 SoCs RNG is clocked by 48MHz domain.
Hence, besides clock activation, it requires 48M
domain to be enabled.
Tested on:
*nucleo_l476rg
*stm32l476g_disco
*disco_l475_iot1
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
SPI_MODE_GET() returns a bitfield. It is thus wrong to test if a bit is
set using the equality operator. The bit-wise AND operator must be used
instead.
This can be tested by setting the SPI in mode 3 (CPOL + CPHA). Currently
both tests will fail and the result is a SPI configured in mode 0. This
was confirmed using an oscilloscope. Applying the patch fixes the
polarity.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
We can have a spurious error while performing a transfer using IRQ. This
happens when the last message of the transfer is a read with a STOP
condition. We must disable the RX interrupt while waiting for the STOP
interrupt, otherwise we will get a spurious RX interrupt which will lead
to an error.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
STM32 UART driver uses a macro for clock initialization, that
is difficult to read and incompatible with needed changes to
fix STM32F0 series UART problems.
This change switches to using the full clock bus names in UART
init functions removing the macro-magic and increasing
readability.
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
The combination of
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL and
CONFIG_CLOCK_STM32_PLL_SRC_HSI
on SOCs with PREDIV1 support made use of the LL define
LL_RCC_PLLSOURCE_HSI_DIV_2, which is not defined for SOCs with
PREDIV1 support.
This exchanges LL_RCC_PLLSOURCE_HSI_DIV_2 with LL_RCC_PLLSOURCE_HSI
which is the appropiate source according to stm32f0xx_ll_rcc.h
line 473 and stm32f3xx_ll_rcc.h line 795.
Tested by compiling hello world for nucleo_f091rc board with HSI as
PLLSOURCE.
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
Current implementation of LL_SPI_TransmitData16 on F0 family
generates following warning:
"warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]"
Besides being forbidden by rule, this cast is not needed, as register is
16 bits wide. Modification has been tested on F0 SoC.
stm32yyxx_ll_spi.h being included in soc.h file, warning is generated
at each compiled object, this commit allows a clean build.
This issue is referenced in ST and tracked under
reference 13359. Code will be updated on upcoming stm32cube updates.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
The native_posix board will accept command line arguments
which the application / test may pick by calling
native_get_cmd_line_args()
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When asserts are enabled we run into an issue with newlib and types of
printf style formatters not matching. The easy fix to this is to cast
the uint32_t to u32_t to make things consistent with or without newlib
enabled.
This fixes#5645
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Re-order the execution of the arch/ and subsys/ CMakeLists.txt code to
work around a manifestation of issue #6505. When OpenThread created an
External project in subsys, it did not have access to important
toolchain flags added in arch/.
Intuitively, subsystems might depends on how the ARCH is configured,
but the ARCH shouldn't depend on any subsystem.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Instead of hard-coding the path use find_program(), since that allows
CMake to sort out platform-specific details such as .exe extensions on
Windows.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The function returns an enum, not a u8_t, so we should cast
appropriately to avoid an implicit conversion.
This construct was triggering this compilation error when compiling
with CXX:
/home/sebo/zephyr/include/bluetooth/buf.h:85:9: error: invalid
conversion from ‘u8_t {aka unsigned char}’ to ‘bt_buf_type’
[-fpermissive] return *(u8_t *)net_buf_user_data(buf);
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Compiling this declaration with a CXX compiler triggers the compiler
error:
/home/sebo/zephyr/include/bluetooth/gatt.h:898:10: error: ‘struct
bt_gatt_read_params::<anonymous union>::__single’ invalid; an
anonymous union can only have non-static data members [-fpermissive]
Reading up on the standard, I was unable to find any mention of this
being valid C or CXX code (But reading the standard is not
straightforward). And I was unable to find any mechanism to make the
CXX compiler accept it (e.g. Changing the -std, or adding this as a
language extension e.g. -fms-extensions).
So we rewrite it to not declare the struct with the tag
"__single". There does not seem to be any reason for it to be declared
like this.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.
Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>