Zero functional change, this is pure refactoring and preparation for
using the mtime= parameter which the gzip.compress() shortcut does not
make available.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
- add glossary terms for important concepts we have to explain often,
like "west installation"
- add autodoc directives for pulling in west API docs
- add missing documentation for built-in features like west's
configuration, extension commands, etc.
- add missing documentation for "west sign" extension
- describe the manifest in a self-contained way rather than linking to
the relevant pykwalify schema, also adding a missing reference to
"west manifest" in the miscellaneous multi-repo commands list
- move various details regarding history and motivation to why.rst
among other changes to repo-tool.rst, leaving it closer to a "tell
me what I really need to know" style overview
- update planned features
Fixes: #14992
Signed-off-by: Marti Bolivar <marti@foundries.io>
Several of our extensions don't declare they are parallel read or
write safe. Upon inspection, they are.
Not declaring parallel read safety defeats a lot of the speed ups that
are possible when using SPHINXOPTS="-j=auto", so mark the extensions
safe and get the performance back.
Signed-off-by: Marti Bolivar <marti@foundries.io>
This fixes some high priority issues, including syntax errors in
docstrings which prevent us from including API docs in our Sphinx
tree.
Signed-off-by: Marti Bolivar <marti@foundries.io>
net_pkt_sendto uses size_t as parameter for len so the value would be
treat as unsigned which may cause and invalid memory to be read.
Fixes#14950#14955
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add a note in the tagging section of the release process that explains
why using GitHub release process for tags should NOT be done.
Fixes#14985
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the script to detect and update more instances of unsigned
variable assignments when using all four simple rules of arithmetics.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The original code cannot go to the next step on those boards enabled
TEST_WDT_CALLBACK_2 macro, because of the flow control issue. So the
test function cannot finish, and the board keeps restart. As a result,
failure on the test.
Fixes#13468
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
The GPIO driver is required by this board's initialization code, hence
it is forced to be enabled always, not only enabled by default like on
other boards equipped with an nRF SoC.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This patch enables the GPIO driver by default on all boards equipped
with an nRF SoC (all boards having `CONFIG_SOC_FAMILY_NRF=y` in their
`_defconfig` file).
In vast majority of cases the driver is needed, so it is more
convenient to enable it at board level than in particular
applications.
And if the driver is undesired for some reason, it can be still
disabled in the application config.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This reverts commit d4b4b99272 as it
introduced unwanted side effect: It moved the k_busy_wait() to other
clock that the one driving system timer and k_cycle_get_32(). As result,
delays created using these interfaces not matched each other.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Fixes pylint warnings like this one:
doc/conf.py:325:0: W1401: Anomalous backslash in string: '\s'.
String constant might be missing an r prefix.
(anomalous-backslash-in-string)
The reason for this warning is that backslash escapes are interpreted in
non-raw (non-r-prefixed) strings. For example, '\a' and r'\a' are not
the same string (first one has a single ASCII bell character, second one
has two characters).
It just happens that there's no \s (or \., or \/) escape for example,
and '\s' turns into two characters (as needed for a regex). It's risky
to rely on stuff like that regexes though. Best to make them raw strings
unless they're super trivial.
Also note that '\s' and '\\s' turn into the same string.
Another tip: A literal ' can be put into a string with "blah'blah"
instead of 'blah\'blah'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
There are two sensor samples be modified for a more explicit log when
no sensor connected or not connected correctly. Rather than a horrible
hardware fault, which may misleading beginner.
1. bme280
2. sx9500
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
1. To support being called multiple times, the function
zephyr_library_compile_options() uses unique
options_interface_lib_${random} names. These only need to be unique, not
random. So replace them with a simple MD5 hash of the ${item} argument.
To reproduce quickly run:
sanitycheck -b -p qemu_xtensa --tag shell
... a few times and compare the output directories.
This bug sits for now at the top of the list of build reproducibility
issues the most bizarre and difficult to root cause. When running
sanitycheck over a large sample of configurations it was affecting
only qemu_xtensa/**/zephyr/arch/arch/xtensa/core/startup/Makefile
files (and their corresponding CMakeFiles/TargetDirectories.txt),
randomly ordering the following three Make targets and only these
three: rebuild_cache, edit_cache, arch__xtensa__core__startup.
The key to root causing was cmake --trace-expand which prints the random
string.
2. generate_unique_target_name_from_filename() also generated a random
string for the same uniqueness reason. This one was easier to root cause
and reproduce with: sanitycheck --tag gen_inc_file
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Set FLASH_LOAD_OFFSET correctly (accounting for Nordic MBR) when
BOARD_HAS_NRF5_BOOTLOADER is defined and we're not compiling MCUboot.
MCUboot will select USE_CODE_PARTITION, which will make it link
correctly regardless of which board DTS is used (stock/debugger).
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
The /memreserve/ code would crash if it ever ran, because 'name' isn't
defined (seems to be some copy-paste here). There are no /memreserve/s
in Zephyr though, so it works out.
'name' seems to be the node name. Not sure what to put for a
/memreserve/, but make it '<memreserve>' to make it stand out.
Fixes a pylint warning.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
self.num_members doesn't exist. This commit just removes the reference,
because I didn't want to guess a proper fix.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Using a member variable in the dict comprehension was probably a typo
(can't see 'sym' referenced elsewhere). Use a local variable instead.
Made pylint spit out these warnings (which might be spurious though):
scripts/elf_helper.py:535:24: E0203: Access to member 'sym' before
its definition line 536 (access-member-before-definition)
scripts/elf_helper.py:535:39: E0203: Access to member 'sym' before
its definition line 536 (access-member-before-definition)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Discovered with pylint3.
Use the placeholder name '_' for unproblematic unused variables. It's
what I'm used to, and pylint knows not to flag it.
Python tip:
for i in range(n):
some_list.append(0)
can be replaced with
some_list += n*[0]
Similarly, 3*'\t' gives '\t\t\t'.
(Relevant here because pylint flagged the loop index as unused.)
To do integer division in Python 3, use // instead of /.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Discovered with pylint3.
Use the placeholder name '_' for unproblematic unused variables. It's
what I'm used to, and pylint knows not to flag it.
Also improve the naming a bit in devicetree.py. If a key/value is known
to be a specific thing (like a node), then it's helpful to call it that
instead of something generic like "value".
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The last commit changes FXOS8700 to use new DT defines in its
dts_fixup.h, and the build was also succeeded after it. But
DT_NXP_FXOS8700_0_INT2_GPIOS_CONTROLLER and
DT_NXP_FXOS8700_0_INT2_GPIOS_PIN were missed so the build_all project
is still failing.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
There's no need to track this info in prov.c since hci_core.c is
already doing it. Just query hci_core.c always using the
bt_pub_key_get() API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If PB-GATT is disabled while there are connected clients, those
clients must be disconnected. Add a 'disconnect` parameter to
bt_mesh_proxy_prov_disable() to handle scenarios when we don't want to
disconnect (e.g. right after successfully finishing provisioning) and
tose where we do want to disconnect (e.g. user requesting to disable
the provisioning bearer).
Also make sure that we always update advertising, so that a stale
advertising set isn't left in the controller.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If both PB-ADV and PB-GATT are supported, we need to properly
re-initialize variables such as link.rx.prev_id and (particularly
importantly) link.rx.buf. If we don't do this it may lead to the
following fault when trying to reprovision again:
***** USAGE FAULT *****
Illegal use of the EPSR
***** Hardware exception *****
Current thread ID = 0x20001f10
Faulting instruction address = 0x0
Fatal fault in thread 0x20001f10! Aborting.
Fixes#14928
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove unnecessary const keywords (the entire struct is const) and use
bool instead of u8_t for the require_link member.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Updated test harness to check for a second instance of
"Watchdog sample application". This is to confirm the
board did reset itself.
Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
The IV Index is always a 32-bit value, so using u16_t for it was
confusing. Create a define for it, similar to other constant values,
to get rid of this confusion.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Using settings_delete() makes it much easier to understand what the
code is doing, and actually also reduces the amount of code.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add error checking, remove redundant code, and improve the logging for
settings related functionality.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The read() callback of attributes returns ssize_t and not size_t. Fix
this, which also fixes a Coverity warning.
Fixes Coverity CID 197457
Fixes#14958
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The convention in the code is to use the appropriate address copying
functions instead of direct assignments. Even when a specific copying
function doesn't exist the convention is to use memcpy.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We want to enable USB DC at not only VBUS detection event
but also it has been already high.
Signed-off-by: Takumi Ando <takumi.ando@atmark-techno.com>
There are some remaining code from object monitoring which simply
expands to empty loop macros. Remove them as they are not
functional anyway.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Clarify the warning in the help for CONFIG_MULTITHREADING to make it
clear that many things will break if this is set to 'n'.
Signed-off-by: David Brown <david.brown@linaro.org>
nrf52840_pca10056 and nrf52_pca10040 was enabling RTT by default
for all samples. It has some implications like forwarding printk
to logger and that, as a default behavior, may not be welcomed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The master is using unknown rsp to terminate slave side initiated
procedures that has collided with the encryption procedure initiated by
the master.
We need to handle an unknown response that is sent in unencrypted during
the encryption procedure, even though we have already set up to receive
encrypted packets.
Fixes#14044
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Updating the Resolvable Private Address when advertising and
active scanning in progress fails and clears the RPA_VALID
flag; making the next bt_le_scan_start while continuing to
advertise to fail.
This is fixed by keeping the RPA_VALID flag remain set.
Stopping and starting active scanning to update RPA can be
implemented in a separate commit.
Fixes#9463.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>