Update Kconfiglib (and menuconfig, just to sync) to upstream revision
8087311cd91be to get the following fix in, for an issue reported by
pfalcon:
Give clearer errors for bad endchoice/endif/endmenu nesting
An endchoice/endif/endmenu with no corresponding choice/if/menu
generated a cryptic 'unrecognized construct' parse error. Improve
the error message so that the problem is pointed out explicitly:
kconfiglib.KconfigError: Kconfig:37: couldn't parse 'endmenu': no
corresponding 'menu'
Reported in https://github.com/ulfalizer/Kconfiglib/issues/56.
This update also adds support for user-defined preprocessor functions in
Python, which could potentially be handy for DTS/Kconfig integration.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
1. Remove old shell documentation.
2. Create documentation for new shell module.
3. Fix shell.h comments to be able to generate
API documentation.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The board porting guide assumed that people were already familiar with
the Kconfig 'bool "foo"' shorthand for giving a symbol's type and prompt
at the same time. I got an email pointing out that it isn't obvious.
Explain the shorthand, and also mention that it's the preferred style in
Zephyr.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Calling pthread_join() with current thread would lead
to deadlock. Adding check for it and to return
appropriate error code.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Now that we've cleaned up all the STM32 related .dtsi files we don't
use dts/arm/st/mem.h so we can remove it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include. We also seperate
out the F7 dtsi files into their own dir.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include. We also seperate
out the F4 dtsi files into their own dir.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include. We also seperate
out the F3 dtsi files into their own dir.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include. We also seperate
out the F2 dtsi files into their own dir.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Selects HAS_DTS_GPIO in various gpio drivers that already support dts,
similar to how we select HAS_DTS_SPI in spi drivers and HAS_DTS_I2C in
i2c drivers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Increase the resolution of advertising random delay from
1 ms unit to 1 us units. The controller scheduling will
floor it to nearest 32KHz clock unit on nRF5 series.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Updates nrfx to the recently released version that corrects a few
imperfections in NFCT and USBD drivers.
Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.3.1
commit: d4ebe15f58de1442e3eed93b40d13930e7785903
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Auto connect code reuses bt_conn object and connection code was assuming
object was cleared which resulted in invalid code being provided to
application. Fix that by explicitly setting error code to 0 on
successful connection.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Depending on perhiperal advertising interval 3 seconds might not be
enough and would result in cancelling pending connection. Make this
Kconfig configurable and let application to decide.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Starting with glibc 2.20, there is warning when _BSD_SOURCE is defined
but not _DEFAULT_SOURCE (in /usr/include/features.h around line 184).
Sanitycheck turns this warning into error. So define _DEFAULT_SOURCE
at build time for native.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
In coap_option_value_to_int function, when coap option length is 4,
option->value[3] should be shifted by 0 rather than option->value[2].
This doesn't affect the behavior of function but needs to be fixed.
In coap_append_option_int function, when the value is between 0xffff
and 0xffffff(when option length is 3), bit shift operation is wrong.
For example, if the value is 0xABCDEF, by sys_put_be16(val, data)
data[0]=0xCD, data[1]=0xEF, by val >> 16, data[2]=0xAB. So the result
becomes 0xCDEFAB not 0xABCDEF. So, to sys_put_be16 function hand
&data[1] over instead of handing data over and val >> 16 needs to be
set to data[0], not data[2].
Signed-off-by: Taehwa Kang <hegrecomm@gmail.com>
Any calculation based on linker variables shouldn't be inside
sections.
Also added the linker macro needed for the shared memory.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Removing an unnecessary check in k_mem_pool_alloc. The condition is
already being checked in the if.
MISRA-C rule 14.3
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
MISRA-C requires that all declarations of a specific function, or
object, use the same names and type qualifiers.
MISRA-C rule 8.3
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
According with ISO/IEC 9899:1999 §6.7 Declarations, typedefs name must
be uniques.
C99 clause 6.7
MISRA-C rule 1.1
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
_INIT_LEVEL_P* variables are not used anywhere. These values are
duplicated in defines like _SYS_INIT_LEVEL_P*, just removing it.
MISRA-C rule 2.2
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
A final else statement must be provided when an if statement is
followed by one or more else if.
MISRA-C rule 15.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When delta_ticks_from_prev is not 0, the variable ticks will necessarily
be lesser or equal 0, so the if checking that is no necessary.
MISRA-C rule 15.7
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
According C99 the first 31 characters of an identifier must be unique.
Shortening the namespace of the generated objects to achieve it.
C99 - 5.2.4.1
MISRA-C rule 5.1
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Macro _OBJECT_TRACING_NEXT_PTR expands to a member or to nothing.
Macro _OBJECT_TRACING_NEXT_PTR is used in a number of places, like:
struct k_stack {
.. omitted ..
_OBJECT_TRACING_NEXT_PTR(k_stack);
u8_t flags;
};
When the macro expands to nothing, a lonesome semi would remain. This is
illegal in C99, but permitted in GCC with GNU extensions.
Rather than expand to empty, we now expand to a zero-length array.
This means we can retain the trailing semis across structs wherein the
macro is used.
Note that zero-length array (foo[0]) != flexible array member (foo[]):
* zero-length array: Is GNU+Clang extension. Anywhere in struct.
* flexible array member: Is C99. Only in end of struct.
Thus we have really only traded-off one portability issue for
another, more acceptable, one at least.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
This commit touches the C codebase and the python syscall generator.
The Z_GENLIST-macros expand to whole functions. Once expanded by the
preprocessor we notice a semicolon is put after the function body. But
ISO C99 does not allow extra ‘;’ outside of a function. Though this is
accepted by GCC with GNU extensions, it is not by Clang.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Under GNU C, sizeof(void) = 1. This commit merely makes it explicit u8.
Pointer arithmetics over void types is:
* A GNU C extension
* Not supported by Clang
* Illegal across all ISO C standards
See also: https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Under GNU C, sizeof(void) = 1. This commit simply uses uint8_t.
Pointer arithmetics over void types is:
* A GNU C extension
* Not supported by Clang
* Illegal across all ISO C standards
See also: https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Pull in a more recent version of libmetal, motivated by the void
pointer fixes in efc33fe.
libmetal's b4b5bea to a4f7630 spans:
a4f7630 linux: device: fix max chars to copy for the dev name
10a0d5b lib: system: freertos: mutex: change to use atomic_int ...
4e670c5 ci: Zephyr env var for toolchain
3bef6f0 cmake: Fix Zephyr library integration
13158c3 compiler: add IAR compiler file
0820a2e microblaze: suppress io 64-bit R/W access if 64 bit atomic ...
e2e5608 io: suppress io 64 bit R/W access if 64 bit atomic not ...
efc33fe io: fix compilation error for void pointers.
32ad1d2 cache: fix compilation issue
c1ade0d travis CI: update Zephyr SDK version to 0.9.3
c49d7cd travis CI: updated arm compiler ubuntu package
d279a6a travis ci: Update FreeRTOS download path
5c70105 irq: update sys_irq_restore_enable and sys_irq_save_disable
05f0cd4 cmake: Only look for doxygen package if docs enabled
b4b5bea zephyr: Introduce WITH_ZEPHYR_LIB option
At current time of writing, libmetal's HEAD is 5bc2106641.
However this failed to build in their Travis CI.
The latest passing commit is a4f7630.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
ENOTSUP is not being used correctly in
pthread_attr_setschedparam(), hence
replaced its check for EINVAL instead.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Added EAGAIN error code in pthread_create()
with fixing the EINVAL return as it is
limited to attribute checking.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Added return of ESRCH error code in
pthread_getschedparam() when the
specified thread could not be found.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Change APIs that essentially return a boolean expression - 0 for
false and 1 for true - to return a bool.
MISRA-C rule 14.4
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Several functions in dlist were returning a boolean expression,
just changing these functions to return a boolean.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Now that we get the spi base address and irq numbers from dts, we can
remove the preprocessor macros from soc.h
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The spi drivers now consistently select HAS_DTS_SPI, so we no longer
need to select it at the board level.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>