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>
Apply extract_cells function also when property name
contains "gpio" (could be cs-gpio, rst-gpio, gpio-irq, ..)
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Create a dt-bindings/gpio.h file.
Bindings definitions are extracted from existing gpio.h.
gpio dt-bindings file is required because existing gpio.h file could
not be parsed by dts parser.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This will prevent building these tests for boards not supposed to run
a TCP/IP stack, particularly 96b_carbon_nrf51 where test-with-dns
would not fit into 32 kB of RAM.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Update names of the configuration entries so that the new nRF SPIS
driver can be used on this board.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This adds a translation layer to make the nrfx driver for the nRF SPIS
(SPI Slave with EasyDMA) peripheral accessible via the Zephyr's API.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Synchronous call return them on success, asynchronous one - with proper
signal - require to get this info through the status.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- removing a left over from previous SPI slave attempt
- unlock async calls on error
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The test "net/utils" fails to build on nucleo_f103rb
due to "region `SRAM' overflowed by 8 bytes.
Disabling PWM at the board level to build the test.
Moreover, according to issue #6858, we will only configure
board valuable HW and connectors on board level and the
user should enable what is needed on application level.
Reported-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In IPv4 we need to select the network interface, where the packet
is to be sent, using the IPv4 address instead of default network
interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we have multiple network interface (like in VLAN), then we need
to select the proper local interface based on destination address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of always using default interface, use the IPv4 target
address to select the correct network interface when sending
IPv4 ping request.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we have multiple network interfaces and we want to send
a IPv4 network packet to certain destination, then this new
helper can be used to figure out what network interface to use.
Note that this commit only adds support to select the correct network
interface according to destination IPv4 address. This does not enable
any automatic routing to happen.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>