With a clean Ubuntu install, following the getting started page
instructions for linux, only python3 is installed. Apparently (by
design), a python3 install does not create the symbolic link for
/usr/bin/python so the doc/Makefile complains.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
External serial flash on this board is 4MB.
Previously, this was confused with internal flash, which is 1MB.
Fixes#1270
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
When exporting flags to an external build system we need to deal with
the fact that we sometimes use generator expressions. Specifically, we
use generator expressions that look like this:
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
This patch replaces the old API with a new one where users can ask for
compile options for specific languages, like this:
zephyr_get_compile_options_for_lang_as_string(CXX x)
The existing API would have either crashed or silently omitted flags
when a COMPILE_LANG generator expression was present.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The following files didn't have any copyright or license headers on them
when they got contributed. So add the SPDX Apache license and
appropriate copyright info:
boards/arm/stm32l476g_disco/pinmux.c
samples/basic/threads/src/main.c
tests/net/socket/tcp/src/main.c
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The reachable calculation for ND is using fractions combined with
integers and getting rounded to very small results (1ms or 0ms).
Let's split up the fraction into it's numerator and denominator
and perform the math in a better way to get the correct results.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
It is supported to add give extra flags to the linker from the
commandline like this:
cmake -DEXTRA_LDFLAGS=-Lmy_dir path
But unfortunately this was broken during the CMake
migration. Interestingly, the reason that it was broken is that KBuild
was also partially broken. KBuild would pass on EXTRA_LDFLAGS when
object files were linked together into built-in.o files, but it would
not use EXTRA_LDFLAGS for the final link into an elf file.
This patch fixes EXTRA_LDFLAGS.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The logic for choosing to relay from the GATT bearer to the
advertising bearer was still buggy. This patch refactors the logic to
a separate helper function to make it clearer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5008.
It does so by splitting up gen_syscalls.py into two scripts with a
json metadata file to communicate syscall metadata between them. The
parsing script parses header files from include/ and writes syscall
metadata to a file if the contents changed. The generation script
reads from the json file and generates syscall code.
The build system DAG now looks like this:
always_rebuild -> json -> syscalls -> offset.o
The script for generating json will do so only if the content changes,
this ensures that the entire DAG does not always do a full rebuild.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Testcase developed x86mmu specific, to validate
existing APIs. This checks for the PDE/PTE set
on the address and returns if some violation occurs or not.
Signed-off-by: Akhilesh Kumar Upadhyay <akhilesh.kumarx.upadhyay@intel.com>
The command handler already has support for decoding from hex, however
it was not using the decoded value when calling the client API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In uart_nrf5.c the IRQ masks for the TX READY and ERROR events are
incorrect. This pull request fixes the mask values so they are
according to the nRF51/nRF52832/nRF52840 product specification.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
If relaying is not supported, or disabled, the Relay Transmit state
will normally be 0, which is not what we want to use when proxying out
packets from GATT clients. The bt_mesh_net_relay() function is also
used for sending out locally originated packets, in which case the
Relay Retransmit state is also the wrong one to use (the Network
Transmit state should be used instead).
This patch makes sure we only use the Relay Retransmit state for
packets originating from the advertising bearer, and for all other
packets use the Network Transmit state.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The bt_mesh_net_relay() function was missing several important checks
for whether a PDU should be relayed or not. In particular, it would
relay a packet from adv to adv even if the Relay state was set to
disabled, as long as GATT Proxy was set to enabled. The code would
also relay packets to the GATT Proxy bearer if the Relay state was set
to enabled but GATT Proxy was set to disabled. This patch addresses
both of these issues.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the Relay state is set to Not Supported (0x02) the Config Relay Set
message should not change the state, rather just return its current
value.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The genrest.py script used to create configuration options documentation
from the KConfig files generates slightly incorrect OPTION directives
(with an extra colon at the end). Sphinx 1.5 didn't care, but Sphinx
1.6 does, so fix this now in preparation for upgrading Sphinx to the
current version.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Since we moved around where yaml, dts, and fixup files exist we need to
update the docs to reflect those changes. Also, try and make the docs
at little more generic to changes that are occuring.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some API material (from doxygen comments) wasn't included in the
generated documentation because there was no doxygengroup Sphinx
directive to display them. This PR add content into appropriate places
in existing documentation (e.g., Bluetooth Cryptography APIs into the
Bluetooth API doc) and creates two new collections for Display and
Miscellaneous APIs.
Comments added to the .rst files to mention doxygengroups that are
intentionally excluded (because they're organizational groups containing
subgroups that are included).
Sorted the Bluetooth API list, mostly.
Fixed a couple doxygen group titles defined in the include files, and
added a few patterns to filter new "expected" errors from the document
generation process.
Legacy and deprecated APIs remain left out, as intended:
http_legacy (net/http_legacy.h)
spi_interface_legacy (spi_legacy.h)
zoap (net/zoap.h)
fixes: Issue #5051
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The beacon cache handling was severely broken in the way that the
cache_add() function was incorrectly mapping net_idx to array index,
which could have lead to array overflows.
To fix this, while also cleaning things up, move the cache to the
actual bt_mesh_subnet struct. This e.g. lets us avoid having to track
the net_idx twice.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
https://www.bluetooth.org/errata/errata_view.cfm?errata_id=9807
"If the computed Beacon Interval is less than 10 seconds, it should be
set to 10 seconds. If the computed Beacon Interval is greater than 600
seconds, it should be set to 600 seconds."
The lower limit is already covered by how frequently the delayed work
callback gets called, so we just need enforce the 600 second maximum.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Whenever there's a security change (Key Refresh or IV Update) we
should immediately send beacons to any Friend Queues or connected GATT
clients. Introduce a helper function to do this, and make sure it's
called from all places that change the Key Refresh or IV Update
states.
This fixes test case MESH/SR/PROX/PB-12-C.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Added Inter-IC Sound driver (based on SSC module) for Atmel
SAM MCU family.
Tested on Atmel SMART SAM E70 Xplained board
Origin: Original
Jira: ZEP-2509
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Added DMA (XDMAC) driver for Atmel SAM MCU family. The driver provides
private DMA API to be used by the SAM family device drivers. Public
DMA API to be used by user space programs is currently missing.
Tested on Atmel SMART SAM E70 Xplained board
Origin: Original
Jira: ZEP-1609
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Getting warnings from Kconfig after generalising how CPU_HAS_FPU is
configured on the architecture level. 2 Boards were settings this value
in the wrong place.
Fixes#5211.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This makes it clear why 18 is a valid minimum network PDU length to
enforce. This is particularly important since as of writing this patch
there's at least one PTS test case which sends too small PDUs, which
could potentially lead to people thinking the implementation is at
fault (it's not).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/5186
The script that generates syscall_macros.h is moved from Configuration
time to build time. This allows us to express to the build system that
syscall_macros.h depends on the script that generates it.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The jailhouse board's build is currently broken.
It wants to depend on the qemu board's devicetree, but can no longer
do so since the board-level dts files were moved into individual board
directories.
To restore the build, insert the qemu_x86.dts contents into
x86_jailhouse.dts.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
The core kernel is built with the --no-whole-archive linker option.
For all the individual .o files which make up the kernel, if there
are no external references to symbols within these object files,
everything in the object file is dropped.
This has a subtle interaction with system call handlers. If an object
file has system call handlers inside it, and nothing else in the
object file is referenced, then the linker will prefer the weak
version of the handler in the generated syscall_dispatch.c. The
user will get an "unimplemented system call" error if the associated
system call for that handler is made.
Fix this by making a fake reference to the handler function at the
system call site. The address gets stored inside a special section
"hndlr_ref". This is enough to prevent the handlers from being
dropped, and the hndlr_ref section is itself dropped from the binary
from gc-sections; these references will not consume space.
Handlers for system calls that are never invoked anywhere will still be
dropped if nothing else in their containing C files is used, which is
a good thing. A future enhancement could be to split out all handlers
into individual object files, such that we can guarantee that any system
call that is not made somewhere in the application will have its handler
dropped. This will need to be extended to driver subsystems as well.
This won't be pretty but will ensure the tightest binary size.
Fixes#5184.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some Transport Layer tests (MESH/NODE/TNPT/BV-13-C in particular)
require manual clearing of the RPL. Introduce an API for it as well as
a command to the mesh shell to call the API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>