The j iterator is used for priorities, and the i iterator is used for
choosing the actual screening register. Therefore the screening register
availability needs to be checked with i.
This commit also improves the readability by doing two things:
* by moving the screening register index check to a place where the
index is going to be actually used
* by using the ARRAY_SIZE macro instead of a hard-coded number as the
upper limit
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This patch unifies the way NRFX_RTC* Kconfig options are handled in
nrfx_config*.h files for particular Nordic SoCs, so that these files
are easier in maintenance. For nRF52810 and nRF9160, this means adding
of support for these options, since it was missing.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The NRFX_UARTE* Kconfig options were handled only in the nrfx_config
for nRF9160. This commit updates remaining nrfx_configs, so that these
options are handled uniformly for all Nordic SoCs.
The NRFX_UART option, although defined in ext/hal/nordic/Kconfig,
were not supported in any of nrfx_config files, effectively making
it impossible to use nrfx_uart.c driver. This commit corrects this.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow up to commit f0cf126015a073a5417e6fcfd06b2d41f0f18d87.
Entries in nrfx_config_nrf52810.h are synchronized with the template
from nrfx v1.6.2. In particular, the entries for SPI0, TWI0, and UART0
peripherals are added, so that these peripherals can be actually used
by nrfx drivers in Zephyr.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
JLink V6.44 (2019-03-01) added support for the imx rt1064 soc, including
programming the internal flash on flexspi2. Updates the mimxrt1064_evk
board to use the internal flash and external sdram memories by default,
now that the debug tools support them.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
There are some implicit rules in STM32 family Kconfig.defconfig
fragments organizations.
Add comments to explicit these rules.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
GPIO port H is available on all SoCs of L4 series.
Move Kconfig GPIO_STM32_PORTH symbol deifnition to series Kconfig
fragment Kconfig.defconfig.series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
If system clock runs fast k_cycle_get_32(), which is the timestamp
source, wraps often (few minutes). This patch changes default
timestamp function to use k_uptime_get_32() if system clock
frequency is higher than 1 MHz and k_cycle_get_32() otherwise.
If system clock runs at 1 MHz, counter will wrap every 71.5 minutes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Do not enable by default both I2C and SPI nodes for the peripherals
with the same instance number, since they use the same MMIO base
address and DTC will issue a warning in such situation.
This patch corrects dts files for the following boards:
- nrf51_pca10028
- nrf52_pca10040
- nrf52840_blip
- nrf52840_pca10056
- nrf52840_pca10059
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
SPI_0 cannot be used simultaneously with I2C_0, since in nRF52832 SoC
these instances share certain hardware resources.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
To build apps for mcuboot, a zephyr,code-partition needs to be
identified in the DTS chosen block. Without this entry, the
following configs will always be 0:
CONFIG_FLASH_LOAD_OFFSET
CONFIG_FLASH_LOAD_SIZE
Signed-off-by: Michael Scott <mike@foundries.io>
Sigvart pointed out that the error message for missing Kconfig files
(which rambles on a lot about $srctree) can easily kick people off in
the wrong direction.
Update Kconfiglib to upstream revision 9f26eb3ae3 to add the following
commit, which makes the error message point to stuff that's more likely
to be the problem:
Give more helpful error messages when files are missing
The current error message talks a lot about $srctree, but $srctree
is seldom the culprit in practice. More common is 'source
"$(SOME_ENV_VAR)/foo"`, where SOME_ENV_VAR hasn't been set.
Include the complete 'source ...' line for missing Kconfig files,
and mention unset environment variables as a hint. Only mention
$srctree briefly.
Also shorten the message when a .config can't be a found a bit. This
message would usually only be seen when working directly with the
library.
Example error:
Kconfig:7: '/Kconfig' not found (in 'source
"$(SOME_ENV_VAR)/Kconfig"'). Check that environment variables are
set correctly (e.g. $srctree, which is unset or blank). Also note
that unset environment variables expand to the empty string.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
According with MISRA-C every switch-clause must terminate with an
unconditional break.
MISRA-C rules 16.1 and 16.3
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
According with MISRA-C every switch-clause must terminate with an
unconditional break.
MISRA-C rules 16.1 and 16.3
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Rephrase prompts for a few options in drivers/spi/Kconfig.nrfx
so that their purpose is presented a bit better.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In Nordic SoCs, SPI and TWI peripherals with the same instance number
share certain resources and therefore cannot be used at the same time
(in nRF91 Series this limitation concerns UART peripherals as well).
This patch adds Kconfig checks ensuring that only one of such mutually
exclusive peripherals can be enabled.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Definitions of these two options were missing, altought the symbols
that would be created for them were already referenced from
`ext/hal/nordic/nrfx_config_nrf9160.h`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
These entries should have been added in the initial version of
this file (in commit 99bab3f478)
but their absence was overlooked.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This patch adds missing SPI_3_NRF_SPIS Kconfig option (referenced by
`ext/hal/nordic/nrfx_config_nrf9160.h`, although not defined anywhere)
and adds support for SPIS3 instance in the nrfx_spis driver shim.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix issue reported by coverity regarding using volatile
variables in zassert_equal macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix issue reported by coverity regarding using volatile variable
in zassert_equal macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
App shared memory defines a bunch of symbols in the
linker script. Namespace them properly as private
zephyr variables.
The variables which indicate the bounds of the entire
partition now end with "_part_start", "_part_size",
and "_part_end" to make them easy for scripts to
distinguish them from other generated symbols for
data/bss sizes.
Finally, the bss size is not rounded up, this was
causing unnecessary memory to be zeroed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit removes build warnings in the SimpleLink SDK's driver.c file
by updating CMakeLists.txt
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
When using the wifi driver, we should automatically select
CONFIG_POSIX_API and CONFIG_PTHREAD_IPC. This is necessary given the
code in the new SimpleLink host driver from the SimpleLink SDK uses
pthread and sem.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
We should use the headers from Zephyr, not the ones provided by TI for
their posix implementations.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
We are using the external spawn option, hence must make a change
to point to our os_Spawn implementation.
We are also supplying errno values that are missing from Zephyr errno.h
and the external errno setter function, to allow the SimpleLink
driver.c to compile.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Add/Update files taken from TI CC32XX SDK, including
- peripheral drivers
- driverlib (HAL)
- WiFi host driver and porting layer interface headers
Origin: Texas Instruments cc32xx SimpleLink SDK
URL: http://www.ti.com/tool/download/simplelink-cc32xx-sdk
Purpose: Provide driver libraries and HAL for TI CC32XX SoC
Maintained-by: External
Fixes#11126
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This is done to conform with how the rest of the socket APIs are
implemented during socket offload. Otherwise link error would
result due to the symbol being redefined in lib/os/fdtable.c.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
We need to set CONFIG_HW_STACK_PROTECTION=y, instead of the
internal symbol CONFIG_MPU_STACK_GUARD, in order for fatal.c
to be able to parse the error code. MPU_STACK_GUARD is,
anyway selected if HW_STACK_PROTECTION is set.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The L2 documentation was describing functionality that has changed
recently. Now it should match the current reality.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
net_pkt_alloc_with_buffer() takes IP header and protocol header
length while calculating total length internally. Need not
specify explicitly. Also mutex was not properly initialized.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
As per RFC2131 4.1.1 requires we wait a random period
between 1 and 10 seconds before sending the initial
discover. But tests can not wait that longer. So this
option helps test to configure the value to minimum.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add useful information to the error message printed when the installed
SDK does not fulfill version requirements.
Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
The mbedtls library has some globals which results in faults
when user mode tries to access them.
Instantiate a memory partition for mbedtls's globals.
The linker will place all globals found by building this
library into this partition.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some init tasks may use some bss app memory areas and
expect them to be zeroed out. Do this much earlier
in the boot process, before any of the init tasks
run.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Based on the definition of _ARCH_THREAD_STACK_DEFINE() macro
for ARM, the MPU Stack Guard region is placed inside the
allocated stack object, only if
CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT and CONFIG_USERSPACE
are both set. For ARM stack objects, allocated using the
_ARCH_THREAD_STACK_DEFINE() macro, such as the threads' stacks
and the interrupt stack, the above must be reflected on how we
set the initial start of the stacks.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>