Commit graph

41120 commits

Author SHA1 Message Date
Luiz Augusto von Dentz
ef25b864e2 Bluetooth: hci_core: Fix invalid if LE Read PHY
If LE Read PHY fails the code was still trying to parse the buffer as a
valid response.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-05-15 11:29:41 +03:00
Aastha Grover
a0ae53410e sanitylib: Remove hardcoded sample.yaml & testcase.yaml in TestSuite class
This fix creates class variables SAMPLE_FILENAME & TESTCASE_FILENAME
in Class TestSuite and remove the hardcoded sample.yaml & testcase.yaml
from add_testcases function. This makes testing for sanitylib script
easier so that shippable do not detect the test_data for sanitylib
as actual zephyr testcases.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2020-05-14 22:48:09 +02:00
Kumar Gala
5496ea2d9b soc: x86: apollo_lake: Fix incorrect DTS gpio nodelabel references
The nodelabel references for the GPIO region MMU setup were incorrect.
The nodelabel names didn't match what is in the dts.  Fix this otherwise
we get a compile error when enabling the functionality.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-14 18:00:37 +02:00
Wentong Wu
845abb04cf boards: qemu_xtensa: enable icount mode
Enable icount mode for qemu_xtensa platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
bb80d3528e boards: hifive1: enable icount mode
Enable icount mode for hifive1 platform, The icount shift value is
selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
49bf0ff1ff boards: qemu_riscv64: enable icount mode
Enable icount mode for qemu_riscv64 platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
589a0c22ff boards: qemu_riscv32: enable icount mode
Enable icount mode for qemu_riscv32 platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
559238a1f7 boards: qemu_cortex_a53: enable icount mode
Enable icount mode for qemu_cortex_a53 platform, The icount shift
value is selectd based on cpu clock frequency of this platform.
The virtual cpu will execute one instruction every 2^shift ns of
virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
7bc807e478 boards: qemu_cortex_m3: enable icount mode
Enable icount mode for qemu_cortex_m3 platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
1080e8d875 boards: qemu_cortex_m0: enable icount mode
Enable icount mode for qemu_cortex_m0 platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
56c8f49b5c boards: qemu_x86: enable icount mode
Enable icount mode for qemu_x86 platform, The icount shift value is
selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
0d619aefd8 sanitycheck: Add cpu time for QEMUHandler
Add cpu time for QEMUHandler because the guest virtual time
in QEMU icount mode isn't host time and it's maintained by
counting guest instructions, we use QEMU process CPU time to
mostly simulate the time of guest OS.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
7ec57b4666 scripts: sanitylib.py: enhancement for QEMUHandler
Sometimes QEMU can't handle SIGTERM signal correctly and just
run as normal, in that case kill -9 QEMU process directly and
leave sanitycheck judge the testing result by console output.

For failures caused by other reasons, terminate all releated
processes to avoid CI waits 2 hours and reports timeout.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
9189acba03 tests: kernel: reduce test interval to save execution time
In Qemu icount mode, busy wait will cause lots of wall time and it's
very easy to get sanitycheck timeout(this case will be successful if
given enough timeout value for sanitycheck), so reduce test interval
to save execution time.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
72227574d8 timer: remove QEMU_TICKLESS_WORKAROUND
Qemu icount mode enabled, remove QEMU_TICKLESS_WORKAROUND.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
b8724377e8 tests: lib: heap: exclude qemu_riscv32 platform
This CPU-bound test on qemu_riscv32 platform is very slow when
QEMU icount mode enabled, taking upwards of several minutes.
There's little value here, this is a unit test of library code
and we have coverage of the RISC-V 32 bit arch via hifive1.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Wentong Wu
0b2e633ce3 boards: remove the existing qemu icount configuration
Remove the existing qemu icount configuration because icount mode
will be controlled by Kconfig QEMU_ICOUNT so that none suitable
cases(especially networking cases) can exclude icount configuration

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-05-14 13:52:07 +02:00
Marek Pieta
6da15634bf drivers: usb_dc_nrfx: Abort write on ep_ctx_reset
Change adds abort of ongoing write operation in ep_ctx_reset. This is
required to keep the state of Zephyr driver consistent with state of
nrfx driver. This fixes a bug where nrfx_usbd was stuck in busy state.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2020-05-14 13:28:46 +02:00
Christoph Reiter
c8a30ecacc sensor: add sample for Infineon DPS310
Add an example on how to use the DPS310 sensor.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2020-05-14 11:02:29 +02:00
Christoph Reiter
d49e7da7da sensor: add sensor driver for Infineon DPS310
Add driver for Infineon DPS310 temperature and pressure sensor.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2020-05-14 11:02:29 +02:00
Daniel Leung
ba5b141e2f gpio: mchp_xec: fix erroneous interrupt triggers
If interrupt is previously enabled and triggering condition
changes, it might fire callback based on previous condition.
To avoid this issue, disable interrupt before trying to
change settings, and enable afterwards.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-05-14 10:48:26 +02:00
Ioannis Glaropoulos
f95aed10cc doc: contribute: project roles: modify description of release team
We modify the content around the Release Team formation,
and maintenance, describing in detail how maintainers
may be added to the team. Add a comment about Release
Managers that stresses that they must be members of the
team. Add details on how the TSC shall ensure a functional
release team. Add details on how the release team will
be picking release managers (cadence and selection process).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Ioannis Glaropoulos
182f7f88e7 doc: contribute: project roles: add section about retirement
We add a section that clarifies how the project
roles may be removed. We stress that the rules
will apply to elected project roles that the TSC
may define in the future.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Ioannis Glaropoulos
f554516801 doc: contribute: project roles: clarify how maintainers can be in TSC
We need to clarify how Maintainers may become voting
TSC member, and direct this to the Charter guidelines.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Andrew Boie
3f00daea1e tests: userspace: check for TLS leakage
TLS data set when a thread is in supervisor mode should not
leak if it drops later to user mode.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-13 22:02:48 +02:00
Andrew Boie
743ff98f51 kernel: wipe TLS before dropping to user mode
Ensures that TLS from when the thread was in supervisor mode
is erased, rather than rely on the arch code to do it.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-13 22:02:48 +02:00
Peter Bigot
0a07a29c74 boards: fix misleading size for partition
The length field for the MCUBOOT slot partitions in Nordic platforms
has always had an extra leading zero suggesting it's a 40-bit value,
being stored in a 32-bit field.  Remove the incorrect leading zero to
reduce misunderstanding of the field.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-13 21:25:29 +02:00
Ruslan Mstoi
81bca72676 doc: sanitycheck: typo fix
Fix "text execution coverage" as "test execution coverage"

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-05-13 21:24:03 +02:00
Andrew Boie
d149909b03 x86: properly align initial dummy thread
x86-32 thread objects require special alignment since they
contain a buffer that is passed to fxsave/fxrstor instructions.
This fell over if the dummy thread is created in a stack frame.

Implement a custom swap to main for x86 which still uses a
dummy thread, but in an unused part of the interrupt stack
with proper alignment.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-13 21:23:52 +02:00
Andrew Boie
468efadd47 kernel: simplify dummy thread implementation
- simplify dummy thread initialization to a kswap.h
  inline function

- use the same inline function for both early boot and
  SMP setup

- add a note on necessity of the dummy thread even if
  a custom swap to main is implemented

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-13 21:23:52 +02:00
Joakim Andersson
a1b8cc2671 Bluetooth: host: Fix extended advertiser address with privacy disabled
Fix extended advertiser not using correct set random address command
to set private (NRPA) address when privacy feature has been disabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-13 21:23:20 +02:00
Kumar Gala
9fa3048d62 tests: deprecated: dts: Test deprecated DTS functionality
This this covers two small aspects of DTS functionality: first ensuring
the legacy generation script continues to generally function and second
that FLASH_AREA id's are the same between the old and new generator.

This test will be removed when the legacy generator is removed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
43cbb59db2 Kconfig: Default to 'n' for LEGACY_DEVICETREE_MACROS
Set LEGACY_DEVICETREE_MACROS to default to no since we are deprecating
the old macro style and all in tree users are now converted.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
f03633294b west.yml: Update mcumgr/mcuboot to pickup changes to match new dts
Update mcumgr/mcuboot for changes to DT_FLASH_AREA -> FLASH_AREA macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
ff579a3af3 flash: Convert DT_FLASH_AREA to FLASH_AREA macros
Convert with a combo of scripts and by hand fixups:

git grep -l DT_FLASH_AREA_.*_ID | \
 xargs sed -i -r 's/DT_FLASH_AREA_(.*)_ID/FLASH_AREA_ID(\L\1)/'

git grep -l DT_FLASH_AREA_.*_OFFSET | \
 xargs sed -i -r 's/DT_FLASH_AREA_(.*)_OFFSET/FLASH_AREA_OFFSET(\L\1)/'

git grep -l DT_FLASH_AREA_.*_SIZE | \
 xargs sed -i -r 's/DT_FLASH_AREA_(.*)_SIZE/FLASH_AREA_SIZE(\L\1)/'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
7310eb9e4a storage: flash_map_default: Convert to new dts macros
Convert to use new DTS macros to populate default flash map

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
6133d51ef7 storage: flash_map: Add macros to get FLASH_AREA info
Add macros that we'll utilize instead of DT_FLASH_AREA_

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
bd97378870 devicetree: Add support for fixed-partitions
Add DT_NODE_BY_FIXED_PARTITION_LABEL that given a "label" in any
fixed-partitions map will return the node_id for that partition node.

Add DT_NODE_HAS_FIXED_PARTITION_LABEL that will test if a given
fixed-partitions "label" is valid.

Add DT_FIXED_PARTITION_ID that will return an unique ordinal value for
the partition give a node_id to the partition.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
4a5a90aef8 gen_defines: Rework implementation of write_child_functions
Rework how write_child_functions to match how we do the code for
DT_FOREACH_OKAY_INST.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
3a68566d40 edtlib: add a flag for old fixed-partitions behavior
allow the old generator to act as it did.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
058842b353 edtlib: handle match of fixed-partition on any bus
If we have a fixed-partition on a flash device that is for example on
a spi controller we will not get a binding match currently.  This is
because we expect a match between both the compatible and the fact that
fixed-partition node is a decendant of the spi bus.

To address this we treat fixed-partitions as if they are on no bus.
This has the effect of causing a binding match as well as ensuring that
when we process the fixed-partition node we will do anything special to
it because of the bus it happens to be under (for example SPI CS_GPIO
processing).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Kumar Gala
06edcb11db edtlib: Initialize node.compats earlier
Setup node.compats right after we create the Node.  This allows access
to the compats information in _bus_node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Gerard Marull-Paretas
b35152ed4b devicetree: add DT_INST_FOREACH_CHILD macro
The macro iterates through the list of child nodes in a DT_DRV_COMPAT
instance and invokes provided macro for each node.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-13 21:22:06 +02:00
Martí Bolívar
f83ecb7bc6 samples: hid-mouse: cleanups
Similar cleanups as done to other samples.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
59e63845d1 samples: hid-cdc: cleanups
Similar cleanups to other samples.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
8970e13f63 samples: lwm2m_client: cleanups
Make this code access the common led0 sample alias in the usual way.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
6c3fb76698 samples: mesh_badge: remove dead code
PULL_UP is not used. The sw0 flags are read directly in
configure_button().

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
d42ef5e5da samples: bbc_microbit: cleanups
Clean up the board specific samples:

- Do not hard-code the i2c0 device label in the line follower sample.
- Miscellaneous docs cleanups.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
c58db0c995 samples: threads: cleanups
Align the docs and source code with other changes done to the basic
samples.

Use numbers 0 and 1 to refer to the LEDs consistently. This matches
the generic devicetree aliases used by Zephyr, instead of using USR1
and USR2, which are specific to 96b_carbon.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
Martí Bolívar
e959386bd2 samples: servo_motor: cleanups and changes
Align the sample with changes made to other basic samples.

Move away from 'pwm-0' as a devicetree alias, requiring applications
to define a 'pwm-servo' alias. We are getting rid of the aliases that
just bounce through to node labels as soon as we can, might as well
get the applications ready now.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00