Commit graph

41120 commits

Author SHA1 Message Date
Kumar Gala
bf3850c270 github: Add debug to try diagnose workflow failure
The doc publish workflow is failing in the AWS S3 push.  Add more
debug output in that section to see what's going on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-14 22:32:48 +02:00
Carles Cufi
b470fe54ea boards: xt-sim_intel_s1000: Fix board definition
Fix up the board definition so that the actual board can at least be
processed by Kconfig.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
dbe7338ca2 boards: xt-sim*: Conditionally set IPM console stack size
Set the IPM console stack size only when the console is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
52298c2b61 boards: sam4s_xplained: Enable generic GPIO
In the default configuration we want to enable the generic GPIO module
so that we avoid Kconfig warnings.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
9ebafcca36 boards: qemu_xtensa: Conditionally set IPM console stack size
Set the IPM console stack size only when the console is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
55cb11b6fd boards: qemu_cortex_m0: Set log buffer size conditionally
Override the default log buffer size only when logging is actually
enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
6bc0ff2dd9 boards: olimex_stm32_p405: Remove stale entropy Kconfig settings
This board now has an entropy driver, no need to use the test one
anymore.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
0154fb2ac8 boards: olimex_stm32_e407: Remove stale entropy Kconfig settings
This board now has an entropy driver, no need to use the test one
anymore.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
5954f2905d boards: odroid_go: Conditionally enable RNG
Enable RNG only if the actual entropy generator is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
4eef725886 boards: mps2_an385: Conditionally set ztest stack size
Set the ztest stack size only when ztest itself is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
f55fcc9fd2 boards: frdm_kw41z: Override ADC vref choice properly
In order to overrdie a choice one needs to define it again. Override it
by redefining it in the .defconfig file.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
d79062516e boards: esp32: Conditionally enable RNG
Enable RNG only if the actual entropy generator is enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
1ce8dbf7c5 boards: em_starterkit: Enable ARC_HAS_SECURE in normal image
For the non-secure image, the architecture still supports secure
execution, so express that in the defconfig.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Carles Cufi
b81f29d17e boards: bbc_microbit: Set log buffer size conditionally
Override the default log buffer size only when logging is actually
enabled.

See #22474.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-14 22:12:21 +02:00
Kumar Gala
e143036b11 ci: Bump to SDK 0.11.2 and CI image 0.11.4
Update to SDK 0.11.2 now that its out.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-14 20:54:33 +02:00
Ioannis Glaropoulos
3a3364eef8 kernel: fatal: unlock IRQs in early return points in z_fatal_error
We need to unlock IRQs in early return points of
z_fatal_error() functions; not only at the normal
return point.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-14 20:47:37 +02:00
Vinayak Kariappa Chettimada
23c5003d12 Bluetooth: controller: split: Fix regression in privacy port
Fix regression due to addition of conditional compilations
while porting the privacy feature from legacy to split
controller.

Fixes #22801.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-02-14 18:21:16 +01:00
Andrew Boie
2c9f42100c tests: syscalls: exclude one case on nsim_sem
This works around an issue with this emulator's configuration where
there is no memory address that can be poked to generate a fault,
it is simulating memory for the entire address space.

Fixes: #22561

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-02-14 09:02:38 -08:00
Stephanos Ioannidis
ecfd78776d tests: lib: mem_alloc: Increase malloc heap size for newlib test
The newlib full malloc implementation (i.e. non-nano) requests a
relatively large 4096-byte memory chunk through `_sbrk`, which exceeds
the configured 512-byte heap size.

This commit changes `CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE` from 512 to
8192 in order to increase the size of the heap memory used by the
newlib malloc function.

For more details, refer to the issue #21167.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-14 10:52:53 -06:00
Stephanos Ioannidis
e7617cfdd8 tests: lib: mem_alloc: Fix incorrect newlib variant usage
NEWLIB_LIBC_NANO defaults to y when building with a toolchain that
supports nano.specs and this was causing the libraries.libc.newlib
test to link with the newlib nano variant (libc_nano.a) when it should
be linking with the normal newlib (libc.a).

By setting CONFIG_NEWLIB_LIBC_NANO=n in prj_newlib.conf, we make sure
that the libraries.libc.newlib test links with the normal newlib.

For more details, refer to the issue #21167.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-14 10:52:53 -06:00
Stephanos Ioannidis
0e3bc28633 arch: arm: cortex_r: linker.ld: Fix ROM section names
This commit fixes the improper naming of the ROM sections.

1. Rename the first ROM section, which was previously named using the
  `_TEXT_SECTION_NAME` definition, to `rom_start`, as this section does
  not actually represent the text section.

2. Rename the second ROM section, which was previously named
  `_TEXT_SECTION_NAME_2` which supposedly refers to the definition of
  the same name that does not exist, to `_TEXT_SECTION_NAME`. Note that
  this is indeed the section that contains the text section from the
  source image.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-14 17:50:47 +01:00
Stephanos Ioannidis
f053f1b25d arch: arm: cortex_r: linker.ld: Clean-up
This commit cleans up the linker.ld file for the Cortex-R arch.

* Convert all TAB characters to SPACE.
* Fix insane placement of curly brackets.
* Fix overall text alignments.
* Remove the special handlings for the Cortex-M devices that were
  copied from `include/arm/aarch32/cortex_m/scripts/linker.ld`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-14 17:50:47 +01:00
Trond Einar Snekvik
d55c8ead03 Bluetooth: Mesh: GATT Proxy Spec 1.0.1 changes
Backport of https://github.com/apache/mynewt-nimble/pull/724

Mesh spec 1.0.1 changes proxy disabling behavior to only affect the
relaying from proxy nodes. Previously, disabling proxy would shut down
all proxy and node activity.

Tweaks from the original commit:
- Removed redundant call to bt_mesh_adv_update() in gatt_proxy_set()
- Removed invalid ref to 4.2.11.1 in node_identity_set()

---

According to Mesh Profile Spec 1.0.1, Section 4.2.11:
"If the Proxy feature is disabled, a GATT client device can connect
over GATT to that node for configuration and control. Messages from
the GATT bearer are not relayed to the advertising bearer."

Moreover some notes have been removed from the spec compared to
version 1.0:

Mesh Profile Spec 1.0, Section 4.2.11:

"Upon transition from GATT Proxy state 0x01 to GATT Proxy state 0x00
the GATT Bearer Server shall disconnect all GATT Bearer Clients."

"The Configuration Client should turn off the Proxy state as the last
step in the configuration process."

Mesh Profile Spec 1.0, Section 4.2.11.1:

"When the GATT Proxy state is set to 0x00, the Node Identity state
for all subnets shall be set to 0x00 and shall not be changed."

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-02-14 14:43:06 +02:00
Luiz Augusto von Dentz
bd5048c251 Bluetooth: Setting: Make bt_settings_encode_key take a const address
This removes the need to cast in case the address is already const.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-14 14:15:11 +02:00
Luiz Augusto von Dentz
4edfd45c6d Bluetooth: GATT: Fix not clearing SC when disconnecting
SC config data is no longer stored within the CCC config itself
therefore it must be cleared separately.

Fixes #22539

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-14 14:15:11 +02:00
Luiz Augusto von Dentz
b6825ffc31 Bluetooth: GATT: Fix not clearing stored data when unpairing
GATT data shall not be considered conditional to BT_SETTINGS since
the data is stored in RAM it must also be cleared when unpairing.

Fixes #22514

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-14 14:15:11 +02:00
Luiz Augusto von Dentz
730989078c Bluetooth: GATT: Move functions related to bt_gatt_clear
These functions shall not be conditional to BT_SETTINGS.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-14 14:15:11 +02:00
Luiz Augusto von Dentz
1156412904 Bluetooth: SMP: Fix failing to pass SM/MAS/PROT/BV-01-C
smp_pairing_complete does actually clears flags so setting
SMP_FLAG_TIMEOUT must come after that.

Fixes #22786

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-02-14 11:55:14 +02:00
Kumar Gala
49bf8b1d54 github: Fix daily/release doc publish workflow
We now need pyelftools to build the docs.  See the following commit:

commit 83b346edef
Author: Alexey Brodkin <abrodkin@synopsys.com>
Date:   Fri Feb 7 11:37:25 2020 +0300

    runners: opeocd: Allow loading Elf-files

Match the update to doc-build.yml to `pip3 install pyelftools`.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 20:23:55 -06:00
Johann Fischer
1736cb79c2 usb: loopback: re-trigger usb_write after interface configuration
Re-trigger usb_write after interface configuration event.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-13 22:51:05 +02:00
Peter Bigot
fe266f9d2c gpio: restore missing legacy devicetree direction flag
GPIO_DIR_OUT is deprecated but allowed in devicetree bindings because
some in-tree bindings provided it in the past.  GPIO_DIR_IN was the
former explicit way of representing the default direction.  Put it
back so symmetry is maintained.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-13 22:50:45 +02:00
Maksim Masalski
c25262c829 tests: remove duplicate names for tests
After running command  --list-test-duplicates
I found out that some test cases have same names (duplicated).
To get rid of it, I decided to change names in .yaml files

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-02-13 14:45:56 -06:00
Wayne Ren
0d7769f3b8 arch: arc: fix the bug that idle thread blocks other threads
* for COOP_SCHED case, i.e., PREEMPT_ENABLED is not enabled, the
  idle thread will block other threads which is not correct.

* remove the check of PREEMPT_ENABLED in the epilogue of irq and
  exception handling. Let the scheduler (should_preempt()) decide
  whether the thread should be preempted.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-02-13 09:39:25 -08:00
Andrew Boie
c6d37eba7b samples: arc_secure_services: fix sample.yaml
This test can't be evaluated with sanitycheck, it
requires special set-up on multiple AMP cores to
function properly. Add build_only tag.

Fixes: #19643
Fixes: #22317

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-02-13 12:59:47 +02:00
Peter Bigot
e83c9cc262 drivers: gpio_sx1509b: correct handling of initialized output
The data_first flag was intended to be set when the configuration
requires setting the output value before setting the direction.
Respect the intent.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-13 12:59:16 +02:00
Jukka Rissanen
56a098338f doc: release-note: Move CANBUS to own chapter
CANBUS can be considered a subsystem of its own so moving
it from Networking to own chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-13 12:45:14 +02:00
Jukka Rissanen
b23032fed8 doc: net: Add networking changes to 2.2 release note
Initial set of networking changes in 2.2 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-13 12:45:14 +02:00
Alexey Brodkin
3b8cf7e389 board: arc: Disable gap filling in output .hex
Some ARC deveopment boards have q bit funny memory maps.
For example IoT Development Kit board has those areas
that we use in Zephyr:

 1. 256 KiB of ICCM @ 0x2000_0000 for code
    (i.e. ".text" section goes here)
 2. 128 KiB of DCCM @ 0x8000_0000 for data
    (i.e. ".data" section goes here)

And so objcopy dumps 0x6000_0000 bytes (which is ~ 1.5Gib or raw data)
in zephyr.hex which gives us ~ 4.3 GiB of resulting zephyr.hex size.

W/o gap filling we're back at normal tens of KiB.

Given we have currently no need to fill the gaps anyways we disable it
for all ARC devboards.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
521eb43c60 board: arc: emsdp: Fix JTAG TAP id 0x200444b1 -> 0x200044b1
Otherwise we this annoying message which might mislead people
looking at some unrelated failures:
----------------------------->8---------------------------
JTAG tap: arc-em.cpu tap/device found: 0x200044b1
JTAG tap: arc-em.cpu       UNEXPECTED: 0x200044b1
JTAG tap: arc-em.cpu  expected 1 of 1: 0x200444b1
----------------------------->8---------------------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
7a8c624f53 board: arc: hsdk: Initialize core0 in the end
The last core which gets initilaized is used by default by OpenOCD.
Thus if we leave configuration as it was we'll get single-core
binaries executed by core3 while we expect core0 to be used.

We didn't see that problem reviously because we used to use
GDB for binary (actually Elf) loading and execution and there in GDB
we explicitly connected to the OpenOCD port wired to core 0.

Now with "west flash" we use OpenOCD for loading anr running and
we need everything setup correctly from the beginning.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
5bd2857c73 board: arc: Switch to generic OpenOCD runner
We used to use "em-starterkit" runner for ARC which is
basically heavy-modified "openocd" runner tweaked to
use GDB for loading and starting Elf files.

Now when loading and running Elf files is possible with generic
"openocd" runner we may us it. So we switch and get rid of
"em-starterkit" as well since we no longer need it.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
83b346edef runners: opeocd: Allow loading Elf-files
In some cases especially for on-going development & debugging of real
application it might be useful to load and run not from flash but
from RAM in that case there's one catch: we cannot reset the board
after loading memory with our app.

That's because:
 a) RAM we use might be either cleared on reset or might enter
    unpredictable state with portion of previously loaded data
    being corrupted.
 b) Reset vector most probably still point to ROM/flash and so
    our current application won't be executed on reset.

So instead of "run reset" command of OpenOCD we'll use
"resume 0x12345678". Where 0x12345678 is our application's
entry-point (which BTW may very well not match beginning of
the .text section or link base).

Now to extract the entry-point we need our application's zephyr.elf
and since we already have a requirement for Elf we may use it for
loading because OpenOCD does it perfectly fine moreover automatically
detecting loaded image type (binary, hex, Elf etc).

And to use that nice feature just add "--use-elf" to west's
command-line for boards that use "openocd" runner. Like that:
----------->8--------------
west flash --use-elf
----------->8--------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
946ed0e369 board: arc: Enable selection of FTDI instance by its serial number
To be used in setups with multiple boards attached to the same one
host we need to have an ability to specify precisely which JTAG probe
to use for a particular board.

This is done by passing "ftdi_serial XXX" command to OpenOCD.
And the serial ("XXX") is supposed to be passed from higher level,
typically via west's options.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Alexey Brodkin
5a4237ed3b west: openocd: Allow to specify FTDI instance by its serial number
To be used in setups with multiple boards attached to the same one
host we need to have an ability to specify precisely which JTAG probe
to use for a particular board.

This is done by passing "ftdi_serial XXX" command to OpenOCD.
And the serial ("XXX") is supposed to be passed from higher level,
typically via west's options. And exactly for that we add another
"openocd" runner option "--serial=XXX" which sets
a Tcl's "_ZEPHYR_BOARD_SERIAL" variable that later gets passed
to OpenOCD's "ftdi_serial" command.

See more discussions on the matter here:
https://github.com/zephyrproject-rtos/zephyr/issues/22543

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-02-13 10:45:44 +02:00
Kumar Gala
3b60f09583 github: Add GH workflow to build daily docs and docs on release
Add a workflow that will build the docs daily or on release and
publish them to AWS S3.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 02:15:35 -06:00
Kumar Gala
ae380c55c8 github: Update doc build action
Make a few cleanups to the doc build action:

1. Only do action for pull requests - action is meant to test PRs
2. Remove west update / cache of modules as we dont need them for docs

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-13 02:15:35 -06:00
Martí Bolívar
026f7fc97e dts: fix up type comments in binding-template.yaml
List the details for each type in the order they appear in the summary
of all types. Add the missing 'path' value to the summary.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-13 02:14:34 -06:00
Andrew Boie
f1b1332c94 x86: fix large Kconfig values on 64-bit
Use the special x86 operand modifier 'p' to print the raw value.
This fixes an issue on x86-64 where errors were generated
if a constant larger than INT_MAX was used.

Values larger than UINT_MAX are still unsupported (on any arch).

Fixes: #22542

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-02-13 09:03:03 +02:00
Joakim Andersson
1f0f3ca9ba Bluetooth: GATT: Fix gatt indicate using wrong pointer for attribute
Fix bt_gatt_indicate using the wrong attribute pointer when a uuid was
provided as input.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-12 20:28:32 +02:00
Ulf Magnusson
378d6b137a kconfig: Replace non-defconfig single-symbol 'if's with 'depends on'
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.

Will do the defconfigs separately in case there are any complaints
there.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:34 -06:00