Commit graph

99049 commits

Author SHA1 Message Date
Ulf Magnusson
d2d5fae838 west: runners: core.py: Remove no-op try-excepts
Removing these doesn't change behavior, since the
subprocess.CalledProcessError is just immediately re-raised when caught.

Fixes this pylint warning:

    W0706: The except handler raises immediately (try-except-raise)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:06:51 -04:00
Ulf Magnusson
4094ee686e west: runners: Remove unnecessary constructors
These just pass their arguments through to the base class constructor.
Removing them means the base class constructor gets called directly
instead.

Fixes this pylint warning:

    W0235: Useless super delegation in method '__init__'
    (useless-super-delegation)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:06:51 -04:00
Ulf Magnusson
bf128d09b3 west: runners: Fix typo'd log.wrn() call
Should be wrn() instead of warn(). Reported by pylint.

Also remove a {} from the message. It's not being formatted.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:05:57 -04:00
Ulf Magnusson
11d98ae9de scripts: gen_relocate_app.py: Simplify test with 'in'
Getting slightly subjective, but fixes this pylint warning:

    scripts/gen_relocate_app.py:228:38: R1714: Consider merging these
    comparisons with "in" to "region in ('data', 'bss')"
    (consider-using-in)

Use a set literal instead of a tuple literal, as recent Python 3
versions optimize set literals with constant keys nicely.

Getting rid of pylint warnings for a CI check. I could disable any
controversial ones (it's already a list of warnings to enable anyway).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:05:22 -04:00
Ulf Magnusson
bb634167ae west: commands: Make functions that don't use 'self' static
Fixes this pylint warning:

    R0201: Method could be a function (no-self-use)

Another option would be to turn them into regular functions, but that'd
be a bigger change.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:04:58 -04:00
Ulf Magnusson
e3ff959d30 intel_s1000_crb: messenger.py: Make endian_swap() static
Doesn't use 'self'. Fixes this pylint warning:

    boards/xtensa/intel_s1000_crb/support/messenger.py:50:4: R0201:
    Method could be a function (no-self-use)

If this function is meant to be internal to messenger.py, then a better
option than @staticmethod might be to turn it into a regular function.

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:04:15 -04:00
Ulf Magnusson
4cac371d43 scripts: Suppress/fix undefined variable pylint warnings
dtlib.py and guiconfig.py do some hackery to build token and image
variable names, which triggers spurious pylint warnings like

    scripts/dts/dtlib.py:243:28: E0602: Undefined variable '_T_LABEL'
    (undefined-variable)

Suppress the warning for those files. The generated names get used in
lots of places.

Also suppress some warnings in doc/conf.py ('tags' is from Sphinx), and
fix a legitimate issue in scripts/dts/testdtlib.py.

This pylint check is useful enough to want enabled in the upcoming CI
check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:03:04 -04:00
Ulf Magnusson
3feb8f96f6 scripts: gen_kobject_list.py: Simplify test with 'in'
Getting slightly subjective, but fixes this pylint warning:

    scripts/gen_kobject_list.py:308:11: R1714: Consider merging these
    comparisons with "in" to "kobj in ('device',
    '_k_thread_stack_element')" (consider-using-in)

Use a set literal instead of a tuple literal, as recent Python 3
versions optimize set literals with constant keys nicely.

Getting rid of pylint warnings for a CI check. I could disable any
controversial ones (it's already a list of warnings to enable anyway).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:01:31 -04:00
Ulf Magnusson
89efaeda74 west: build.py: Rename unused variable from unpacking to _
This is a common Python idiom, and it's easy to look up what the unused
value is in this case if you need to. Fixes this pylint warning:

    scripts/west_commands/build.py:227:15: W0612: Unused variable
    'origin' (unused-variable)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:00:57 -04:00
Ulf Magnusson
883b53101c menuconfig: Suppress spurious pylint tuple unpacking warning
pylint might be afraid that there'd be less than three elements in
'args', but there never is. Fixes this warning:

    scripts/kconfig/menuconfig.py:3184:8: W0632: Possible unbalanced
    tuple unpacking with sequence: left side has 3 label(s), right side
    has 0 value(s) (unbalanced-tuple-unpacking)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:00:30 -04:00
Ulf Magnusson
47ef9ba6c2 scripts: sanitycheck: Remove redundant ifs
Fixes these pylint warnings:

    scripts/sanity_chk/ini2yaml.py:25:22: R1719: The if expression can
    be replaced with 'test' (simplifiable-if-expression)

    scripts/sanity_chk/expr_parser.py:208:15: R1719: The if expression
    can be replaced with 'bool(test)' (simplifiable-if-expression)

    scripts/sanity_chk/expr_parser.py:210:15: R1719: The if expression
    can be replaced with 'bool(test)' (simplifiable-if-expression)

Also replace a redundant re.compile().match() with re.match(). compile()
doesn't help when re-compiling the regular expression each time through.

(compile() often doesn't help much in general, because the 're' module
caches compiled regexes.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:59:53 -04:00
Ulf Magnusson
16b548fcc7 gen_gcov_files.py: Replace bare 'except' with 'except Exception'
A bare 'except:' can do some annoying stuff like eat Ctrl-C (because it
catches KeyboardInterrupt). Better to use 'except Exception:' as a
catch-all.

Even better might be to catch some more specific exception, because even
'except Exception:' eats stuff like misspelled identifiers.

Fixes this pylint warning:

    scripts/gen_gcov_files.py:54:12: W0702: No exception type(s)
    specified (bare-except)

Piggyback a formatting nit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:58:16 -04:00
Ulf Magnusson
4699375162 west: run_common.py: Remove redundant 'if'
Fixes this pylint warning:

    scripts/west_commands/run_common.py:175:12: R1719: The if expression
    can be replaced with 'test' (simplifiable-if-expression)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:57:46 -04:00
Ulf Magnusson
a07c3dc46f doc: conf.py: Replace bare 'except' with 'except Exception'
A bare 'except:' can do some annoying stuff like eat Ctrl-C (because it
catches KeyboardInterrupt). Better to use 'except Exception:' as a
catch-all.

Even better might be to catch some more specific exception, because even
'except Exception:' eats stuff like misspelled identifiers.

Fixes this pylint warning:

    doc/conf.py:99:0: W0702: No exception type(s) specified
    (bare-except)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:56:58 -04:00
Ulf Magnusson
53ce10814d doc: application.py: Remove unused variables
Reported by pylint. Fixing warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:56:09 -04:00
Ulf Magnusson
a3793098cb xtensa: xtensa_intgen.py: Change 'not lvl in ...' to 'lvl not in ...'
Use the 'not in' operator. Fixes this pylint warning:

    arch/xtensa/core/xtensa_intgen.py:77:7: C0113: Consider changing
    "not lvl in ints_by_lvl" to "lvl not in ints_by_lvl" (unneeded-not)

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:55:01 -04:00
Ulf Magnusson
0d39a10fbb scripts: Fix random typo'd whitespace
Reported by pylint's 'bad-whitespace' warning.

Not gonna enable this warning in the CI check, because it flags stuff
like deliberately aligning assignments and gets too cultish. Just a
cleanup pass.

For whatever reason, the common convention in Python is to skip spaces
around '=' when passing keyword arguments and giving default arguments:

    f(x=3, y=4)
    def f(x, y=8):
        ...

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:54:17 -04:00
Ioannis Glaropoulos
46263acd5a release: Post-release patch level update
Set the patch level correctly, after the 2.0.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-07 12:29:56 +02:00
Ioannis Glaropoulos
7c0ec4358a release: Zephyr 2.0.0
Bump version to 2.0.0 final.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-07 00:40:33 +02:00
David B. Kinder
624ac4801b doc: remove licensing for moved ext/ components
ext/fs/fat and ext/hal/nordic were moved out of the ext folder and into
external modules so we should remove the licensing exceptions noted in
this document.

kconfig and kbuild were removed from the zephyr repo too.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-07 00:17:15 +02:00
Carles Cufi
c1d87a5be9 dts: bindings: spi: nrf: Set license to Apache 2.0
The file contained an invalid license which came from a Nordic custom
repository. Switch it to Apache 2.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-09-06 23:35:39 +02:00
Ioannis Glaropoulos
0ea5f84143 doc: release notes: style update; Zephyr Kernel to Zephyr RTOS
Zephyr is more than a kernel, so we update the title of
the release notes' section accordingly.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 23:34:18 +02:00
David B. Kinder
02ee3754c6 west: update requirements.txt to avoid west 0.6.1
Update scripts/requirements.txt to use 0.6.2 or later (avoiding 0.6.1
that has an known issue)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 19:12:33 +02:00
Ioannis Glaropoulos
9f7d4bc475 release: adding 2.0.0 doc link
Add 2.0.0 release to the list and remove
the last release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 19:11:59 +02:00
Ioannis Glaropoulos
07d750efb3 doc: release notes: add list of issues for 2.0.0
Adding the list of closed issues for v2.0.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 18:01:26 +02:00
David B. Kinder
168751a7b7 doc: fix broken doc links
The project's README.rst references the support board docs with an URL
that's not working these days (see
https://github.com/zephyrproject-rtos/infrastructure/issues/134) so fix
that URL reference.  While looking for other similar linking cases, I
found a hard URL references that should be using :ref: role, and a
release notes reference to a (now) broken link (fixing that in the
/latest/ version of the 1.10 release notes).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 16:14:39 +02:00
David B. Kinder
891e50e088 doc: fix misspellings in documentation
Fix some misspellings found in .rst files missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 16:13:15 +02:00
Anas Nashif
053ab4ac41 release: update sanitycheck release file
Update release file used by sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-06 13:31:04 +02:00
Marti Bolivar
4b3f89646d doc: getting_started: run west update after pulling zephyr
This is causing confusion.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-06 12:14:20 +02:00
Nathaniel Graff
bce38ba98c doc: release notes: RISC-V release notes for 2.0
Adds 2.0 release notes for the RISC-V architecture.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-09-06 10:46:45 +02:00
David B. Kinder
d0ef464201 doc: editor pass on release notes
Do a review and editor pass on the release notes, reduce length of some
lists by using hlist extension, tweak css for appearance of hlist in a
bullet list. Update entries to be in past tense (Added vs. Add).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-05 23:38:34 +02:00
Ioannis Glaropoulos
f9c94d49e8 doc: release notes: add HAL section
Adding a minor section about HAL changes
in the 2.0.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-05 20:42:35 +02:00
Kevin Townsend
79f362760e arm: mps: docs: note on qemu usage of boards
This commit adds a note alluding to the fact that these two boards are
primarily included for use with QEMU, but have been tested on actual
hardware as well where appropriate.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2019-09-05 15:53:48 +02:00
Kevin Townsend
03f14f2e6c arm: mps: docs: note on qemu usage of boards
This commit adds a note alluding to the fact that these two boards are
primarily included for use with QEMU, but have been tested on actual
hardware as well where appropriate.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2019-09-05 15:53:48 +02:00
Marti Bolivar
cc8d92c088 doc: west: v0.6.2 fixes a critical v0.6.1 bug
All v0.6.1 users must upgrade. Add release notes blurb.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-05 07:28:07 +02:00
David Brown
f14e024c39 doc: releases: Add CVE-2019-9506 to release notes
Add section about security vulnerability issues in the 2.0.0 release
notes.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-09-04 21:17:47 +02:00
Michael Scott
ee57741c8c doc: net: Update LwM2M block of overview document
Re-word the support block for LwM2M:
- the supported interfaces
- change wording of supported LwM2M objects to include the "required"
  keyword instead of explicitly listing them
- mention several IPSO Smart Objects

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16327

Signed-off-by: Michael Scott <mike@foundries.io>
2019-09-04 18:27:02 +02:00
Charles E. Youse
c02288b245 docs: fix errors/ambiguities in docs for Apollo Lake boards
The documentation for the GPMRB incorrectly made reference to the
up_squared board in its high-speed UART configuration section. We
consolidate the related documentation for all boards based on the
Apollo Lake SoC and adjust the language to be more generic.

Fixes: #18808

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-04 10:02:25 +02:00
Ioannis Glaropoulos
58fa1a1f8f doc: release notes: add comment about tests
Adding a note about new tests and expanded
test case list for 2.0.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-04 10:00:35 +02:00
Ioannis Glaropoulos
929d9d5e1a release: Zephyr 2.0.0-rc3
Bump to 2.0.0-rc3.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 22:52:08 +02:00
Peter Bigot
a6067a38f8 kernel: reimplement k_uptime_get_32()
The current implementation does not return the low 32 bits of
k_uptime_get() as suggested by it's documentation; it returns the number
of milliseconds represented by the low 32-bits of the underlying system
clock.  The truncation before translation results in discontinuities at
every point where the system clock increments bit 33.

Reimplement it using the full-precision value, and update the
documentation to note that this variant has little value for
long-running applications.

Closes #18739.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-03 22:50:41 +02:00
Carles Cufi
64841fb457 doc: release notes: 2.0 Kernel release notes
Add a section for the kernel release notes for the 2.0 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-09-03 21:17:14 +02:00
Scott Worley
26c411f6bd drivers : timer : MEC1501 RTOS timer load delay work-around.
MEC1501 RTOS timer internal counter is on the 32KHz clock domain.
The register interface is on the AHB clock. When the timer is started
hardware synchronizes to the next 32KHz clock edge resulting is a
variable delay moving the value in the preload register into the
count register. The maximum delay is one 32KHz clock period (30.5 us).
We work-around this delay by checking if the timer has been started
and not using the count value which is still 0. Instead we state zero
counts have elapsed.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-09-03 18:37:46 +02:00
Alex Porosanu
daa0eb3359 west.yml: update nxp_hal SHA to latest commit
Commit 5852d8f from https://github.com/zephyrproject-rtos/hal_nxp
fixed the import script, but there's no corresponding update for the
west.yml configuration file. As such, if one attempts to add support
for new drivers, they'll be copied in the wrong places
(under $ZEPHYR_BASE). As such, modify the west.yml file to point to
the HEAD of the master branch of the hal_nxp repo.

Fixes: 5852d8f mcux: adjust paths in import script after moving
               HAL to module

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-09-03 17:41:12 +02:00
Ioannis Glaropoulos
ee74098450 tests: exclude twr_ke18f platform from several user mode tests
Several user mode tests cannot run on twr_ke18f because
either the platform does not have a sufficient number of
MPU regions required for the tests, or, the tests also
require HW stack protection (which has been, by default,
excluded in user mode tests for twr_ke18f board). We
excluded the board from all those tests.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 16:44:22 +02:00
Ioannis Glaropoulos
31f8b6f17d tests: kernel: replace CONFIG_USERSPACE with CONFIG_TEST_USERSPACE
This commit replaces several CONFIG_USERSPACE=y
settings with CONFIG_TEST_USERSPACE=y. This allows
the test sub-system Kconfig structure to control
the settings of USERSPACE and HW_STACK_PROTECTION
in the various tests suites.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 16:44:22 +02:00
Ioannis Glaropoulos
861fc23d70 soc: arm: ke1xf: do not enable stack prot on tests with user mode.
This commit enabled TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION
Kconfig option by default for ke1xf SoC Series, which instructs
the build to disable HW stack protection from tests that are to
run with User Mode enabled. This is done because this platform
does not have a sufficient number of MPU regions to support HW
stack protection (Stack Guards) and User Mode simultaneously.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 16:44:22 +02:00
Ioannis Glaropoulos
912c55847c testsuite: allow disabling stack protection in usermode tests
This commit introduces a new Kconfig option in the testsuite
sub-system, which allows us to disable HW stack protection from
tests that run with user mode enabled.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-03 16:44:22 +02:00
Johan Hedberg
b0b4597ff1 Bluetooth: UUID: Fix confusing documentation of bt_uuid_create()
Remove any references to internal usage, which were both confusing and
unnecessary.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-09-03 16:41:00 +02:00
Luiz Augusto von Dentz
51ffabfa56 Bluetooth: UUID: Add test for bt_uuid_create
This adds test for bt_uuid_create APIs using a byte array in LE/BE
format as it is expected and then proceed to compare with matching and
unmatching UUID declared in host byte order.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-09-03 16:41:00 +02:00