The mailbox code was written to use the _remove_thread_from_ready_q()
API directly, which would be good to get out of the scheduler internal
API. What it really wanted to do is to mark a thread "PENDING"
without actually adding it to a wait queue, which is sane enough (the
message stores the "thread to wake up on receipt" handle).
So allow that naturally in the _pend_thread() API by passing a NULL
wait_q. Really a wait_q needn't be the only way a thread can block.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The documentation doesn't give the format for listing multiple files in
CONF_FILE (space-separated list).
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
The current application configuration documentation makes it a bit
unclear that configuration files are merged. Rewrite the documentation
to explicitly talk about merging, which I think is less confusing.
Remove the following section from the introduction as well, as I think
it might make people wonder how they can have an existing kernel
configuration when they haven't created one. The updated configuration
section (which the introduction now has a forward reference to)
clarifies the zephyr/.config bit anyway.
If omitted, the application's existing kernel configuration option
values are used; if no existing values are provided, the kernel's
default configuration values are used.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Pressing Y/N to configure boolean configuration symbols probably won't
be supported in the upcoming Python menuconfig implementation, and Space
is much smoother anyway. '?' is smoother than tabbing to '< Help >' too.
Also remove this part, which I couldn't make sense of:
When a non-default entry is selected for options that are
non-numerical, an asterisk :kbd:`*` appears between the square
brackets in the display. There is nothing added added the display
when you select the option's default.
[*] just means the current symbol value is 'y'.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
This macro has been deprecated in favor of K_DECLARE_STACK; should have
been removed by 1.11.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Fixes#7137
Enables the i2c drivers for these boards.
Required to enable i2c with these boards.
Tested samples/bluetooth/beacon for nrf52_pca10040
with i2c enabled.
Parameters used for enabling i2c:
CONFIG_I2C=y
CONFIG_I2C_0=y
CONFIG_I2C_NRF5=y
CONFIG_I2C_NRF5_0_GPIO_SCL_PIN=6
CONFIG_I2C_NRF5_0_GPIO_SDA_PIN=7
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.com>
Contrary to ARMv7-M, in ARMv8-M MCUs with the Main Extension,
BusFault Status Register bits are sticky and must be cleared.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add zassert's to check results of intermediate operations like
socket/bind/connect. Also, use symbolic expressions instead of
constants like 4 (for data length).
Coverity-Id: 182765, 182767
Fixes: #6104, #6106
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
A priority value cannot be simultaneously higher than the maximum
possible value and smaller than the minimum value. Rewrite the
_VALID_PRIO() macro as a function so that this if either of these
invariants are invalid, the priority is considered invalid.
Coverity-CID: 182584
Coverity-CID: 182585
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
include/uart.h says that an interrupt may be an edge or a level.
Re-work the uart_pipe interrupt handler to support both. This makes
uart_pipe work with the USB CDC ACM driver.
Signed-off-by: Michael Hope <mlhx@google.com>
Expand information about the ModemManager issues (spurious AT commands)
and instructions on adding Segger USB devices to the ModemManager
blacklist.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some buggy system may be pass a larger wLength when it try read
HID report descriptor, although we had already tell it the right
descriptor size.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Following tests were failing on a microcontroller with 32KB flash:
test-mbedtls
kernel.common
The min_flash option has been added in the test case yaml files.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
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>