The compiler can remove the NULL check since the dereference happens
before it (and assume that the pointer is always valid).
Coverity-Id: 185281
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
A recent LF change to the Zephyr mailing list hosting software changed
the mailing list names and links to the message archives.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The search result from Sphinx displays raw ReST file snippets showing
the context of the search hit. While we could generate text versions of
the ReST files just for the search results, it would potentially double
the time to generate docs (run once to generate txt files, run again to
generate HTML).
Instead, this patch does a poor man's cleanup of the ReST markup on the
fly when the search summary snippets are written out. Not perfect, but
looks much better.
It does expose a problem that some of our ReST content is not actually
written out into a .rst file. Content that's dynamically generated by
extensions, such as the sample code from zephyr-app-commands, can
yield a search result hit, but there's no hits in the .rst file content
itself.
Line 552-558 are the modified lines from the Sphinx-provided
searchtools.js that does the pattern match/replace.
Addresses: #7032
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This updates mbedTLS to 2.8.0, which fixes CVEs 2018-0488 and
2048-0487, that affects 2.7.0.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
It has been observed that users might "default" to Python2 and pip
will therefore install packages for the wrong Python. pip3 appears to
always be installed when Python3 is installed, so we invoke pip3
instead of pip2 to be safe.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This is a simple cosmetic change. Each field in the BOS (Binary
Object Store) descriptor has a comment, to understand it better.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
Implement Bluetooth over USB functionality through Bluetooth raw
access to the Bluetooth controller. Most devices with Bluetooth and
USB controllers supported by Zephyr can export themselves as USB
Bluetooth dongles.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Because of incorrectly set MPS we always got 0 returned for WRITE
transfers and ZLP were always generated for every packet.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds led and button dts nodes to all kinetis boards and removes the
now unused preprocessor macros from board.h.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds gpio labels to all kinetis socs in preparation for refactoring the
mcux gpio driver to dts. The kl25z was missing gpio nodes altogether, so
they are added.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
In Zephyr this has no effect because getaddrinfo() returns a pointer
to a static array, but Coverity scan checks for this pattern.
Coverity-CID: 185273
Coverity-CID: 185279
Fixes#7085Fixes#7091
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
Previously, some fields like sin6_scope_id weren't explicitly
initialized. Such aren't really used, but to keep Coverity
happy, let's zero out the entire address structure.
Coverity-Id: 182763
Fixes: #6108
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Improve the error feedback when the toolchain is not found.
Currently, for some setups, presumably primarily SDK-less setups,
users can get an error message like this for certain types of
misconfigurations:
CMake Error at zephyr/cmake/extensions.cmake:984 (message):
No such file or directory: CMAKE_READELF: 'CMAKE_READELF-NOTFOUND'
Call Stack (most recent call first):
zephyr/cmake/compiler/gcc.cmake:14 (assert_exists)
zephyr/cmake/toolchain.cmake:38 (include)
zephyr/cmake/app/boilerplate.cmake:243 (include)
CMakeLists.txt:1 (include)
This commit will improve the error feedback to give a explanation for
what kind of failure has occured and will also dump relevant variables
to ease debugging.
This fixes#7075
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Rework samples using LED and GPIO to enforce use of "CONTROLLER"
as LED and PGIO postifx.
Change impact all samples that could be run by boards yet moved to
GPIO node generations, which is only STM32 for now
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When a node is referencing to a parent node and this node is
reported as controller, generate a #define to declare this controller.
Value is controller property 'label'
For instance, if following gpio controller is referenced in board dts:
green_led_1: led@1 {
gpios = <&gpioa 5 GPIO_INT_ACTIVE_HIGH>;
label = "User LD1";
};
Following will be generated:
\#define GPIO_LEDS_1_GPIO_CONTROLLER "GPIOA"
Besides, if defined, alias label will be generated as well for this
controller:
aliases {
led0 = &green_led_1;
};
will trigger generation of:
\#define LED0_GPIO_CONTROLLER GPIO_LEDS_1_GPIO_CONTROLLER
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Modify get_compat function to look for 'compatible' property
in parent nodes if not available at node level.
Since this operation is quite common, this allows some code
factorization. As a consequence, get_compat takes 'node_address'
as argument instead of 'node'.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
* _StackCheckHandler is FUNC_NORETURN
* if _ARCH_EXCPET is redefined for specific arch and
has function return in some cases, e.g., interrupt or
exception, a compiler warning will come out
* So add CODE_UNREACHABLE to guarantee it will not return
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
* call the _check_stack_sentinel in unnested isr
return.
* for firq, _check_stack_sentinel is called in kernel
isr stack because the limitation of banked register
* for normal irq, _check_stak_sentinel is called in
the interruptted thread stack
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
* For STACK_CANERY, the processor should not hang
* as _SysFatalErrorHandler is always executed in
isr context, so remove k_is_in_isr
* the function should return after k_thread_abort
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
The original exception handling has space to optimize and
and some bugs need to be fixed.
* define NANO_ESF
* add the definition of NANO_ESF which is an irq_stack_frame
* add the corresponding codes in exception entry and handler
* remove _default_esf
* implement the _ARCH_EXCEPT
* use trap exception to raise exception by kernel
* add corresponding trap exception entry
* add _do_kernel_oops to handle the exception raised by
_ARCH_EXCEPT.
* add the thread context switch in exception return
* case: kernel oops may raise thread context switch
* case: some tests will re-implement SysFatalHandler to raise
thread context switch.
* as the exception and isr are handled in kernel isr stack, so
the thread context switch must be in the return of exception/isr
, and the exception handler must return, should not be decorated
with FUNC_NORETURN
* for arc, _is_in_isr should consider the case of exception
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
The logic for walking reverse dependencies (from 'select's and 'imply's)
is a bit tricky to read (and write), and was essentially duplicated in a
few different spots (including in the upcoming menuconfig
implementation).
Use a new split_expr() helper function that's been added to Kconfiglib
to reduce code duplication and make the code more readable.
This also has another nice side effect: The list of symbols that select
a particular symbol now has the symbols in the order that they appear in
the Kconfig files.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Update Kconfiglib to upstream revision 105c835e70a5b (+ local Zephyr
modifications) to get commit 105c835e70a5b ("Add helper for splitting
expressions") in. It will simplify the 'select' logic in genrest.py and
the upcoming menuconfig implementation, and also simplifies some
Kconfiglib internals.
split_expr() will also be helpful if genrest.py ever needs to split
other expressions, e.g. over multiple lines.
Origin: https://github.com/zephyrproject-rtos/Kconfiglib/tree/zephyr
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
This patch changes the ARM system calls to use registers for passing
or arguments. This removes the possibility of stack issues when
callers do not adhere to the AAPCS.
Fixes#6802
Signed-off-by: Andy Gross <andy.gross@linaro.org>
In sample application of COAP there is no need of payload
for GET method & it is only applicable to put
and post methods are modified in coap-client.c
Signed-off-by: Tarun Kumar Agarwal <tarun.kumar.agarwal@intel.com>
The implementation for the tell() primitive was attempting to unlock
the NFFS mutex after returning an error code.
Coverity-Id: 185283
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
During the transition of privilege levels while performing syscalls,
the ARM documentation recommends flushing the pipeline to avoid
pre-fetched instructions from being executed with the previous
privilege level.
The manual says:
4.16 CONTROL register
(...) after programming the CONTROL register, an ISB instruction
should be used.
(...) This is not implemented in the Cortex M0 processor.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The location of the uncrustify.cfg file was changed in commit
fdadb501f7 , but the documentation
referring to that file was left pointing at the old path.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
Min RAM requirement for tests/net/utils was 16K,
hence run on nucleo_l073rz.
Though, build size is a little more than 20K which
overflows board RAM.
Increase min RAM requirement for this test to 24K
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>