This commit removes the depreciated "default n" entries from
boolean K-config options in arch/arm.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
These work like def_bool, setting the type and adding a default at the
same time. This extension fixes some Kconfig inconsistency.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
A design flaw of 'gsource' is that there's no way to require at least
one file to match the glob pattern. This could lead to silent errors.
Switch to a new design, where a plain 'source' is globbing and requires
at least one file to match. A separate 'osource' (optional source)
statement is available for cases where it's okay for a pattern (or plain
filename) to not match any files.
'orsource' combines 'osource' and 'rsource' (relative source).
This commit search-replaces 'gsource' with 'source', but backwards
compatibility with 'gsource' is still maintained by making it an alias
for 'osource' (and by making 'grsource' an alias for 'orsource').
The three Kconfig files arch/{nios2,posix,xtensa}/Kconfig source
arch/{nios2,posix,xtensa}/soc/*/Kconfig, which doesn't match any files.
Use 'osource' for those. The soc/*/Kconfig files seem to be for
additional SoC-specific symbols, only none exist yet on those ARCHes.
Also use 'osource' for the source of $ENV_VAR_BOARD_DIR/Kconfig in
boards/Kconfig, which doesn't exist for all boards.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Document that the boilerplate code included in all applications must
now also include
cmake_minimum_required(VERSION 3.8.2)
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.
Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.
To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.
This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.
The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There was one extra byte sent in last chunk which caused
this error to be printed by curl
* Illegal or missing hexadecimal sequence in chunked-encoding
* stopped the pause stream!
* Closing connection 0
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added transition time support. Now if NODE received optional
parameters then they would get entertained by it.
Added two new models that is Generic Default Transition Time
Server & Client resp. to complete overall architecture to
support newly introduced architecture.
With this it was possible to implement
gen_move_set/gen_move_set_unack message handlers.
Removed redundancy from App & revised overall implementation.
Fixed Bugs. Upgraded coding style. Added & replaced comments to
improve code readability. Improved printk messages.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added time stamp based message filtering as per Bluetooth Mesh
Developer study guide for each Server. Now even if message
source address & TID is same even after 6 seconds then
that will get proceed otherwise will get ignored.
Coding style improvements.
If particular Server model receive Prohibited values as per
Mesh Model Specification then that message will not get entertained.
Now proper status code will get send if user upgrade
light_lightness_range_state & light_ctl_temperature_range_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Upgraded state binding algorithm & created separated
file for it. Moved light_default_status_init() from
device_composition.c to main.c. Shorten variables names
defined in struct light_lightness_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The 'Network type' choice always defaulted to NET_RPL_L2_ANY, because
choices prefer the first default with a satisfied condition (this was
true even when Zephyr still had the prefer-later-defaults patch).
Swap the defaults so that NET_RPL_L2_IEEE802154 becomes the default if
NET_L2_IEEE802154 is enabled, as intended.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This subsys is in the process of collecting requirements/usecases,
the API is subject to change. (Should have been marked experimental
from the beginning.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit replaces exact time compassion by a range check, allowing
the tests to pass on platforms which needs rounding in __ticks_to_ms()
and _ms_to_ticks().
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The value of sys_clock_ticks_per_sec is obtained using
simple integer division with rounding toward zero. As result
using this variable in _ms_to_ticks() introduces some error.
This commit eliminates sys_clock_ticks_per_sec from equation
used in _ms_to_ticks() removing introduced error.
Also, this commit fixes#8895.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The time slicing settings was kept in milliseconds while all related
operations was based on ticks. Continuous back and forth conversion
between ticks and milliseconds introduced an accumulating error due
to rounding in _ms_to_ticks() and __ticks_to_ms(). As result
configured time slice duration was not achieved.
This commit removes excessive ticks <-> ms conversion by using ticks
as time unit for all operations related to time slicing.
Also, it fixes#8896 as well as #8897.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The _update_time_slice_before_swap() function directly compared
_time_slice_duration (expressed in ms) with value returned by
_get_remaining_program_time() which used ticks as a time unit.
Moreover, the _time_slice_duration was also used as an argument
for _set_time(), which expects time expressed in ticks.
This commit ensures that the same unit (ticks) is used in
comparsion and timer adjustments.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Make several enums, that are used inside structs, to be packed so
that they use only needed amount of memory.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This feature was failing on a default ARM core MPU. The linker
script that was getting created was not able to align the required
partitions at prebuilt time.
The old implementation relied on the prebuilt to finish then
extract the size information which was then used to align the regions.
This fails because the size of the alignment and the fill in the
linker needs to be available at prebuilt time else it cant manage
the final elf file generation. We cant have 2 different sizes of
prebuilt and final elf file.
This implementation will get the alignment requirements met at
prebuilt time.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Instead of waiting forever for a network buffer, have a timeout
when allocating net_buf. This way we cannot left hanging for a
long time waiting for a buffer and possibly deadlock the system.
This commit adds checks to L2 and network support libraries.
Fixes#7571
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of waiting forever for a network buffer, have a timeout
when allocating net_buf. This way we cannot left hanging for a
long time waiting for a buffer and possibly deadlock the system.
This commit only adds checks to core IP stack in subsys/net/ip
Fixes#7571
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There have a funtion mqtt_rx_unsuback defined but not used.
So add it into mqtt_parser and fix the missing case.
Fixes#8431
Signed-off-by: Xuan Ze <119524428@qq.com>
Fixing the min max range validation where condtions on
upper and lower bound are logically 'ANDed'. Fixing it
by logical ORing the result.
CID: 18325, 18326
Fixes Issue #9289
Fixes Issue #9290
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Use the new KCONFIG_STRICT Kconfiglib functionality, which makes the
library itself warn for references to undefined Kconfig symbols.
Also get rid of the chdir() hack. Kconfiglib now only looks up Kconfig
files relative to $srctree when it's set, so the hack is no longer
needed.
Remove list_undef_kconfig_refs.py. It's no longer needed.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the new Kconfiglib expression printing customization functionality
to get rid of the hacky expr_str() overriding.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Update Kconfiglib and menuconfig to upstream revision 6aea8d06b637e.
Kconfiglib changes:
- Kconfig files are now looked up just relative to $srctree (if set).
Previously, each source'd Kconfig file was also looked up in the
current directory, and Kconfig files there could override Kconfig
files in $srctree. This is what the C tools do.
I'm pretty sure that behavior was a bug in the C tools all along, and
only meant for .config files. It caused problems (and an ugly
workaround) for the undefined Kconfig symbol CI check in an external
project.
The new behavior also saves a bunch of open()'s, though it's probably
not noticeable.
- Setting the KCONFIG_STRICT environment variable to 'y' now makes
Kconfiglib itself warn for references to undefined symbols. This
isn't safe in general, as some projects use multiple Kconfig trees
with shared Kconfig files (e.g. the Linux kernel).
This will be used to simplify the undefined Kconfig symbol CI check.
- It's now possible to customize how symbols and choices are printed
within expressions.
This will be used to make the RST link generation in genrest.py less
hacky.
- Instead of having 'gsource', a plain 'source' is now globbing, and
requires at least one match. There's also 'osource', for when it's
okay for a glob pattern to match no files.
'gsource' had the design flaw that there was no way to require at
least one file to match. I plan on replacing all 'gsource' statements
with plain 'source's later, but 'gsource' is still supported for
backwards compatibility.
- def_int, def_hex, and def_string are now available as a Kconfig
extensions, analogous to def_bool (set type and add default).
- Misc. internal cleanup.
menuconfig changes:
- Boolean value hints are no longer shown to the right of defaults in
the symbol information for int/hex symbols. Stuff like
'- 74 (value: "n")' wasn't helpful, and looked confusing.
- Symbol information has been made more compact in general, e.g. by
skipping value hints where they aren't helpful
('FOO(=y)' instead of 'FOO(=y) (=y)'), and by shortening stuff like
'(value: "y")' to just '(=y)'.
- Misc. internal cleanup.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The L433 chip is a superset of the L432, just grabbing a few additional
interfaces (LCD, I2C2, USART3, SPI2, SDMMC). All the support/HAL files
are already there, so enabling these is just a matter of build system
setup.
Tested on an application specific board (builds correctly and I2C2
works.) I unfortunately don't have a nucleo/discovery board to create a
reference board for.
Signed-off-by: David Lamparter <equinox@diac24.net>
When building a Secure firmware image, instruct the linker to
generate a symbol table with the entry veneers, to allow a Non
Secure firmware image to access Secure Entry functions via the
entry veneers.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit adds K-config options that allow the user to
signify an ARM Secure Firmware that contains Secure Entry
functions and to define the starting address of the linker
section that will contain the Secure Entry functions. It
also instructs the linker to append the NSC section if
instructed so by the user.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit contribute an internal ARM API that enables the
user to confgure an ARM Security Attribution Unit region. It
also defines ARM_SAU as a K-config option to indicate that
an MCU implements the ARM SAU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit contributes a simple API to allow the TrustZone
user to block or permit Non-Secure System Reset requests.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit introduces an internal ARM macro API to allow the
TrustZone user to define Non-Secure entry functions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines and implements and internal ARM macro API
that allows the TrustZone user to declare, define, and evaluate
pointers of non-secure function type.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Make GCC compile with the -mcmse compile option, if we are
building a Secure firmware. The option will make Security
Extensions for secure executables available, and will set
the corresponding compile-time indicator flag, accordingly:
(i.e. __ARM_FEATURE_CMSE=3).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Define and implement a function to read the number of
SAU regions configued for the MCU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines and implements an internal ARMv8-M TrustZone
API to allow the user to select whether Secure exceptions will
have priority boosting over Non-Secure exceptions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines and implements an internal ARMv8-M TrustZone
API to allow the user to configure the target state of fault
exceptions that are not banked between security states.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit adds a macro definition for the Vector Key value of
AIRCR register that permits the accompanying writes. The macro
is then used instead of the hard-coded numerical value.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit adds and implements an ARM internal API function
to configure the Non-Secure instance of MSPLIM or PSPLIM.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit defines and implements the internal ARM TrustZone
API to enable or disable the Security Attribution Unit.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Define and implement an API to configure the Non-Secure instances
of core registers in ARM Cortex-M23 and Cortex-M33.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
A new CAN API has been delivered on recent L4 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.
Fixes#8931
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A new CAN API has been delivered on recent F7 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A new CAN API has been delivered on recent F4 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In most Nordic SoCs the SPI and TWI peripherals with the same instance
number share certain resources and cannot be used at the same time.
In nRF52810 there are only single instances of these peripherals and
they are arranged in a different way so this limitation does not apply.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>