In order to be able to invoke Python from Kconfig files,
set the path to the Python executable (which can be python,
python3, py -3, etc) as an environment variable so that
Kconfig shell invocations can use it like:
config MY_OPTION
string "My option string"
default "$(shell,$(PYTHON_EXECUTABLE) \
$(ZEPHYR_BASE)\scripts\script.py)"
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We have cases with UART drivers where TX interrupt handling is not
bootstrapped properly on enabling them. To make such cases more
obvious, start this sample with console_write(), the output of which
wouldn't appear if that's the case. (Of course, the sample starts
with printk() exlaining what may happpen.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
1. There's an expectations that TX ready (i.e. TX buffer space
available) interrupt is a level interrupt, i.e. always active
while there's TX buffer space available. In particular, there's
an expectation that after uart_irq_tx_enable(), the TX interrupt
will immediately fire (assuming free TX buffer space is available).
But CMSDK UART interrupt appears to be edge interrupt, firing only
on buffer state change. So, after irq_tx_enable(), we need to
"bootstrap" interrupt processing by calling user-defined ISR
manually (the ISR will see that TX ready to accept a new char,
will write it there, then we'll get interrupt once TX buffer is
ready again).
2. Interrupts should be acknowledges only after user ISR is called,
because the ISR will check the status of interrupts.
3. Update stale comments.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The majority of bits where already in place, but some minor support
get the driver name from DTS was needed. Now we select HAS_DTS_WDT
for the driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The type of Z_EXC_HANDLE was incorrectly declared, this was causing
the compiler to make incorrect inferences about what could be in
exc_handle and caused a bug in fault.c.
To get more specific ...
An exception handler consists of three void pointers, or function
pointers. The function pointers point to functions. An example of one
such function is 'z_arch_user_string_nlen_fault_start' From
userspace.S.
The correct way of initalizing a function pointer from a function
declared in another source file looks like this:
void external_defined_function(void);
{
void * internal_initialized_function_ptr = external_defined_function;
}
But EXC_HANDLER is not doing this. Instead it does this:
extern void (*external_defined_function)(void);
{
void * internal_initialized_function_ptr = &external_defined_function;
}
The declaration here is wrong. It declares that externally, there is
stored a function pointer somewhere. Which is not true. There does not
exist a function pointer anywhere. But this doesn't matter, because we
don't actually de-reference the function pointer to find the address
of the function, but instead we take the address of the function
pointer.
Taking the address of the function pointer to find the address of a
function is wrong, one should de-reference function pointers to find
function addresses. Luckily, these two bugs have been cancelling each
other out, until recently.
This patch corrects the type used.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
In order to avoid changing the signature of spi_context_cs_control
function, which is used in every driver, let's just make it an alias to
a new version.
Fixes#10344
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use cmake to get generated path of lib instead of predefined absolute
path. This is needed to eventually be able to have an
architecture-out-of-tree build. The path "OFFSETS_O_PATH" is not
generated for sources out-of-tree and therefore must be replaced by the
cmake generator $<TARGET_OBJECTS:offsets>.
The following lines are needed while we are using a Cmake version <
3.12.3:
target_include_directories(.....
target_compile_options(...
target_compile_definitions(....
This is due to the cmake feature "Linking Object Libraries" not
supported until 3.12:
https://cmake.org/cmake/help/v3.12/command/target_link_libraries.html#linking-object-libraries
Signed-off-by: Klaus Petersen <kape@oticon.com>
Scenario where RX ring buffer is full and cannot accept
more data was not handled. In that case byte should be
dropped. Such situation may occur when long command is
pasted (exceeding ring buffer size).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Experiments have shown that the probability of missing advertising
packets is significantly lower with 30ms scan window compared to 10ms
scan window. This is especially the case with advertisers using a 20ms
advertising interval, which in turn is perhaps the most common one
since it's the smallest allowed by the Bluetooth 5.0 specification.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
With FD table introduction, net_context can no longer be reached by
typecasting socket descriptor. Instead, file descriptor API have to be
used.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
ztls_setsockopt and ztls_getsockopt returned error codes instead of
setting errno in particular cases. This commit fixes it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This adds a primitive board configuration for the UP Squared board to
work properly with SBL(Slim Bootloader).
- https://github.com/slimbootloader/slimbootloader
- https://slimbootloader.github.io/
BOARD shall be 'up_squared_sbl'
cmake -GNinja -DBOARD=up_squared_sbl ..
ninja
Signed-off-by: Aiden Park <aiden.park@intel.com>
Avoid nested C++ comments inside the C comment block due to MISRA-C
rule 3.1. Keep the variables documenting possible caller saved
registers.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Avoid nested C++ comments inside the C comment block due to MISRA-C
rule 3.1. Add ellipsis around the explanatory text instead.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The identifier looks like a mixed C/C++ comment, which is against
MISRA-C rule 3.1. As the identifier is not used, remove it altogether.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Remove the ifdef related to CONFIG_FS_FLASH_STORAGE_PARTITION. There
shouldn't be any harm in always having the partition around as we'll
just generate the defines related to and most applications will ignore
them.
Helps get one step closer to have DTS not depend on Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the
nrf52840_pca10056 board and should be maintained and configured
outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the nrf52840_mdk
board and should be maintained and configured outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Refactoring of LOG_MODULE_REGISTER (commit 88648699) introduced
regression: fixed ordering of LOG_LEVEL definition and log.h
include.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Now that k_mem_slabs are tracked as kernel objects,
even though they have no user facing API, we can now
accept a pointer to one in the configure API.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The API wants a pointer to the memory block pointer for
some reason (even though it's unnecessary to the
implementation).
Compiler won't warn if a void * is passed instead of a
void **.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If we just had the kernel's implementation, we could
just move this to lib/, but possible arch-specific
implementations dictate that we just make this a
syscall.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We aren't going to allow any user mode access to the
k_mem_slab APIs, but in some cases (specifically in the
case of the I2S subsystem) we need to allow user mode
to assign a memory slab to a particular driver.
This will let us verfiy (in supervisor mode) that a provided
k_mem_slab pointer is really a k_mem_slab, and know its
initialization state, and have permissions assigned to it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
echo_server can use up to 6 sockets therefore it needs more file
descriptors than the maximum default value specified.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
These changes modify the function of reading port/pin,
function return logical sum of input pin value and
output pin values for a given port. It is now possible
to read the status of pins set as output.
Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
There are a small handful of samples that still utilize <board.h>
include, to minimize the use of <board.h> to these specific cases and
allow us to remove adding the board dir to the top level include search
path, we explicitly in each sample add the specific board dir it needs.
For the microbit cases these could be replaced by DTS support in the
future when the pwm_nrf5_sw supports DTS.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Allow to set debug also for RAW_CHANNEL and set general debug template
instead of networking one.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Set COVERAGE option using an overlay instead of piping it through CMAKE
which breaks dependecies, i.e. if someone wants to disable that option
on the application level.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move to using Kconfig (like other Atmel SAM drivers do) to specify the
pinmux setting for SAMe70 SoCs. Updated the sam_e70_xplained board to
set the default in Kconfig.defconfig instead of via board.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add yaml file for initial support of USB PHYs.
It adds also yaml files for STM32 USBPHYC and
USB controllers with embedded PHY.
PHY refers to the physical layer which is used
to connect a device to the physical medium e.g.
USB controller.
Origin: original
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
This commit optimizes the process of checking that the
added partitions in a mem_domain are sane. It places the
sane_partition checking inside the loop of adding the
partitions in the mem_domain, so that the checkings are
not performed twice, and no partition is checked against
itself.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit fixes the calculations of the partition ending
addresses in two places in the code, according to:
<last> = <start> + <size> - 1. We also rename 'end' to 'last'
to stress that we calculate the last address in the partition.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
USB is desired to be configured by default and hence the Kconfigs
are addressed in _defconfig for intel_s1000_crb. Cleaned it up
from the app level prj.conf which was anyway redundant.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>