Refactor internal ARM v7m and v8m MPU region re-programming
functions to take as argument a pointer to k_mem_partition
objects, instead of the object itself.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Refactor internal NXP MPU region re-programming functions
to take as argument a pointer to k_mem_partition objects,
instead of the object itself.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit refactors the MPU region re-programming functions,
to take as argument an array of pointers to memory partition
structures, instead of the whole array of the partitions. In
this way the stack usage can be minimized, if the actual
partition information is kept in statically allocated memory.
instead of the map itself.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Minnowboard should not run the XIP test as it doesn't execute-in-place.
Updated the test specification to exclude Minnowboard.
Fixes#14099.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The VLAN documentation had double wording and proper links to files
in github was missing, which did not look good in the rendered HTML
page.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The nRF52840-based Particle.io boards have an external flash
module that is connected via SPI interface. Originally,
the goal was to place the flash part into deep power down
mode and save 9 uA in sleep mode, but this was never
implemented in a board initialization file.
Let's remove the default y behavior for SPI as each sample
will turn it on if needed, and it can cause certain out of
tree samples to behave badly (where CONFIG_MULTITHREADING=n).
Long term: we need a better solution for handling samples
that don't fit the requirements for certain drivers, but
for now this will clean up some board usability issues.
Signed-off-by: Michael Scott <mike@foundries.io>
Fix link to DNS Kconfig option. Add proper links to DNS files
in github. Fixed link to DNS sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Most of these are from source'ing a file within an 'if GPIO', and then
adding another 'depends on GPIO' within it.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. There are no "conditional includes" in Kconfig, so
'if FOO' has no special meaning around a 'source'. Conditional includes
wouldn't be possible, because an 'if' condition could include (directly
or indirectly) forward references to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fix calculation of frame length in eth_enc28j60_rx().
The calculation was incorrect because the CRC size was
subtracted only from the lower byte.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Clarify how the bt_conn_create_slave_le() API can be used to get each
of the two possible advertising packet types.
Fixes#14160
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
CONFIG_IEEE802154_CC2520_AUTO_ACK seems to creep back in, but has long
since be removed. We remove old references a few times.
Commit 2facf33f28 - "net: ieee802154: Remove old cc2520 AUTO_ACK
assignments".
Remove them again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch adds more error checking and handling for socket APIs.
Fixes: #13885
Coverity-CID: 190928
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
CONFIG_NET_DHCPV6 doesn't exist so remove references to it in the
sample, leave comments about TODO if/when this might exist.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_DCD_DSR does not exist so the code block associated with it would
never be built, so remove it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In case of relative alarm, nrf counter driver for TIMER peripheral
was not handling correctly case when new value exceeded top value.
Additionally, RTC implementation has been refactored to use similar
code for calculating alarm ticks.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Inside adc_context_request_next_sampling(), it tries to signal an I/O
error if there is a new request while a sampling is in progress.
However, it is not exactly an I/O error. The system is simply busy.
So signal EBUSY instead.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Most of these are from source'ing a file within an 'if PINMUX', and then
adding another 'depends on PINMUX' within it.
'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. There are no "conditional includes" in Kconfig, so
'if FOO' has no special meaning around a 'source'. Conditional includes
wouldn't be possible, because an 'if' condition could include (directly
or indirectly) forward references to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Also remove some duplicated dependencies for the related symbol
ENTROPY_NRF5_RNG.
The redundant ENTROPY_GENERATOR deps. are in files sourced within a
if ENTROPY_GENERATOR
...
endif
block in drivers/entropy/Kconfig.
The redundant ENTROPY_NRF5_RNG deps. are due to redundant 'depends on'
within an 'if' in the same file.
Tip: Jump to symbols with '/' in the menuconfig and press '?' to check
their dependencies. If there are duplicated dependencies, the
'included via ...' path can be handy to discover where they are added.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The function usart_sam_irq_is_pending (uart_sam_irq_is_pending) return
only the masked value of US_CSR register but it doesn't respect if the
IRQ is enabled or not. For proper function it must check if the IRQ is
enabled for the event.
Signed-off-by: Jiri Kubias <jiri.kubias@leapslabs.com>
Disable low power/deep sleep modes when they are not enabled in Kconfig.
Otherwise if only low power modes are enabled (but no deep sleep),
Zephyr will try to swich to the lowest power mode (deep sleep) anyway,
only to discover that it's not availiable, resulting in no low power
mode at all being used.
By disabling the modes here if they are not enabled in Kconfig,
policy_residency will switch to the lowest low power mode instead.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
In case it was detected that RTT host was not present
backend was still performing single sleep or busy wait
round before dropping data. That was degrading log
processing performance.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Coverity doesn't like that we're storing the return value of
net_buf_findcrlf() near the end of the handler block as "len".
Only to overwrite "len" again once we exit and look for the next
match.
Let's ignore the return value there and also remove the redundant
check for !frag. Either way, we've found a handler, and need to
break the search loop.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/12315
Signed-off-by: Michael Scott <mike@foundries.io>
We can't let i == value_size during the loop which gathers characters
for the length. If we do, the next check of "value[i] != ','" would
access memory beyond the value boundary.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/12290
Signed-off-by: Michael Scott <mike@foundries.io>
The heap, plus a few globals relevant to mbedtls get put in
their own memory partition.
With systems that have power-of-two region size/alignment
constraints, this results in a 64K partition being created,
even though we are using just a whisker above 32K.
Lower the heap size a little so everything fits in 32K.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The "ARM Cortex-M options" menu is already within a 'if CPU_CORTEX_M',
so no need to put 'depends on CPU_CORTEX_M' on it.
Tip: Jump to symbols with '/' in the menuconfig and press '?' to check
their dependencies. If there are duplicated dependencies, the
'included via ...' path can be handy to discover where they are added.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Users often get confused when they change Kconfig sources and then
rebuild only to discover that nothing happens. To fix this we add a
dependency between re-running cmake, and all Kconfig sources, similair
to how touching CMakeLists.txt files cause CMake to re-run.
This fixes#5634
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Adds a new config HAS_MCUX_FTFX to conditionalize the mcux flash driver
on socs that support it. Selects HAS_MCUX_FTFX on all kinetis socs
except kw40z, because even though this soc has the relevant hardware,
its CMSIS header file is not compatible with the mcux flash driver in
ext/.
This change also prevents enabling the mcux flash driver on lpc and imx
rt boards.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Dictionaries are iterated in a random order by Python 3.5 and before.
This could have caused "Unstable" CI in PR #13921 and maybe others.
Anyway we want builds to be determimistic by default. Explicit
randomness can be added for better coverage but not by default.
1. When running "make kobj_types_h_target" repeatedly one can observe
that the following .h files keep changing in
build/zephyr/include/generated/:
- kobj-types-enum.h
- otype-to-str.h
- otype-to-size.h
Switching kobjects to OrderedDict makes these 3 .h files deterministic.
2. When running this test repeatedly with CONFIG_USERSPACE=y:
rm build/zephyr/*.gperf && make -C build obj_list
... the dict used for --gperf-output seems to be deterministic, probably
because its keys are all integers (memory addresses). However we can't
take that for granted with Python < 3.6 so out of caution also switch
the output of find_objects() in elf_helper.py to a sorted OrderedDict.
PS: I would normally prefer official Python documentation to
StackOverflow however this one is a good summary and has all the
multiple pointers to the... official Python documentation.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
To reproduce the issue this addresses, run "cmake -B96b_nitrogen"
twice with Python 3.5. Observe the order of the flash partition table
changing in:
"build{1,2}/zephyr/include/generated/generated_dts_board.conf" and
"generated_dts_board_unfixed.h"
Dictionaries are iterated in a random order by Python 3.5 and before.
This could have caused "Unstable" CI in PR #13921 and maybe others.
Anyway we want builds to be determimistic by default. Explicit
randomness can be added for better coverage but not by default.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fix multiple definitions of `ram_console'. The ram_console
array is already defined in drivers/console/ram_console.c.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Commit 766101c was a wrong fix as NETUSB_MTU is the actual network MTU.
Instead of using this value in EEM/ECM drivers, a relevant value should
be set for each there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Remove case ranges from printk in order to clean up GNUisms
and make the code standards compliant.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Remove case ranges from the LP3943 LED driver in order to clean
up GNUisms and make the code standards compliant.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This reverts commit 8cb5d083cb53627964ed72fb9fa3fb7a5219739f.
This was breaking tests on master due to missing dependency that is
still being reviewed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If peer socket closed, the other side should get 0 from recv(), and
should get in stable manner (no matter how much time went from the
closure and/or how many times recv() is called).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>