Commit graph

41120 commits

Author SHA1 Message Date
Marcin Szymczyk
e13464bda2 usb: hid: add keyboard report macro and enums
Added macro that generates simple report descriptor for keyboard.
Added enums for standard button codes, keyboard modifiers
and keyboard LEDs.

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-03-05 09:35:26 +01:00
Radoslaw Koppel
dbe775838a ext: encoding: tinycbor: Add missing files for pretty printing
This commits adds missing source files for tinycbor
library to allow pretty printing.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-03-05 09:31:48 +01:00
Ulf Magnusson
259c2409c0 doc/CMakeLists.txt: Rename CONFIG_DIR to CONF_DIR
Avoids having it look like a Kconfig symbol reference (which gets
detected by an upcoming CI check).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-04 22:55:29 -05:00
Carles Cufi
05479601b7 segger: sysview: Fix constness of char pointer
To match the signature of k_thread_name_get(), add a const modifier to
the local variable definition.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-04 18:59:55 -08:00
Anas Nashif
3caea8c81e libc: minimal: add prototype of rand()
Add prototype of rand() that can be defined in tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 17:32:08 -08:00
Anas Nashif
99beaed7c0 tests: mbedtls: report results once only
We were reporting results twice, something that might confuse test
systems and end up reporting wrong results. Assert if any self-tests
have failed and report at the very end.

Disable test on x86_64.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 17:32:08 -08:00
Anas Nashif
3b745cc648 mbedtls: enable self-test in config-tls-generic.h
MBEDTLS_SELF_TEST is needed when setting CONFIG_MBEDTLS_TEST

Fixes #13919

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 17:32:08 -08:00
Takumi Ando
1981eef674 net/l2: openthread: Add support for automatic joiner start
We sometimes want to join a device to OpenThread mesh automatically.
This commit adds supports to do by Kconfig.

The default of CONFIG_OPENTHREAD_JOINER_PSKD is based on this page:
https://codelabs.developers.google.com/codelabs/openthread-hardware/

Signed-off-by: Takumi Ando <takumi.ando@atmark-techno.com>
2019-03-04 19:51:10 -05:00
David B. Kinder
739d0b43d6 doc: reduce size of large pictures
Reduce unnecessarily large images of boards (> 1MB)
Also fixed typo in doc title for mec2016evb_assy6797

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-04 19:47:47 -05:00
Geoffroy Van Cutsem
1fc5d94f91 doc: update udev rule instructions for the reel board
The creation of the udev rule requires the user to be root else
it will fail. Update the text of the documentation to make it clearer
and change the shell prompt of the command to '#'

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-03-04 16:10:35 -08:00
Maksim Masalski
b324f35e61 macros: deleted macros SECONDS(), MSEC(), USEC()
Changed everywhere these macros to the K_MSEC(), K_SECONDS()

Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-03-04 19:04:21 -05:00
David B. Kinder
b1944bc669 doc: fix broken internal link in app dev doc
Reference to internal page link was incorrect (looked like a reference
to an external page).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-04 18:42:00 -05:00
Adithya Baglody
aee196d597 tests: benchmarks: timing_info: Print all measurements.
All measurements will now be printed irrespective of the validity.

Fixes: GH-12900

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-03-04 14:16:13 -05:00
Anas Nashif
f4d8eccb70 sanitycheck: fixed handling of retries
When re-running failed tests, do not go through any filtering, just load
the failed tests directly and execute them. The filtering was done based
on default platforms and any tests that were failing on non-default
platforms were ignored.

Fixes #13956

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 14:08:12 -05:00
Anas Nashif
c9d1bb90d8 ci: add option to specify custom range
This is useful when running the script locally on a set of commits to
reproduce how things are run in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 14:08:12 -05:00
Piotr Zierhoffer
8642be070c m2gl025_miv: Ignore lifo_usage tests
These tests fail on hardware. An appropriate issue will be filed on
GitHub, but it doesn't make sense to hold the CI from going green.

Fixes #13960.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-03-04 12:39:09 -05:00
Krzysztof Chruscinski
ba991c3be1 logging: Add assert when no backends defined
Added an assert in the logger thread in case there
is no backends, instead of having that thread spinning
forever. Disabled log in qemu_xtensa board due to lack
of backends.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 11:47:34 -05:00
Andrew Boie
7707060959 userspace: get rid of app section placeholders
We used to leave byte-long placeholder symbols to ensure
that empty application memory sections did not cause
build errors that were very difficult to understand.

Now we use some relatively portable inline assembly to
generate a symbol, but don't take up any extra space.

The malloc and libc partitions are now only instantiated
if there is some data to put in them.

Fixes: #13923

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-04 08:05:16 -08:00
Andrew Boie
475d279382 userspace: clarify memory domain assertions
Some text added to help explain what is going on.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-04 08:05:16 -08:00
Andrew Boie
8207801c9b tests: userspace: remove unused partition
No data was ever being put in part2.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-04 08:05:16 -08:00
Ioannis Glaropoulos
823d86097f arch: arm: MPU-align GCOV section, only if CONFIG_USERSPACE=y
The GCOV section is programmed as a static MPU region, only
in builds with support for User Mode, otherwise it is not
programmed into an MPU region at all. To reflect this in the
linker, the MPU-alignment for GCOV section is enforced only
under CONFIG_USERSPACE=y. Otherwise, single-word alignment
is enforced.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-03-04 16:52:59 +01:00
Andrzej Puzdrowski
b7a20d1ae5 CODEOWNERS: Add owners for tests of settings subsystems
The settings tests was not properly covered in terms of maintainership,
add maintainers for the corresponding subystems.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-03-04 16:51:19 +01:00
Andrzej Puzdrowski
15159dddf1 settings: always uses the storage partition for FCB
It was possible via Kconfig to assign any partition for FCB using
its number. Partitions flash_area_id becomes non predefined
(are auto-generated). So it is possible only to guess which
number will be signed to certain area.

Unfortunately it is not possible to transfer FLASH_AREA_XXX_ID
label via Kconfig.

Patch assigns settings to the storage partition and remove
SETTINGS_FCB_FLASH_AREA property from settings Kconfig.

fixes #13388

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-03-04 16:51:19 +01:00
Anas Nashif
5cf49956e7 logging: add backend for xtensa simulator
Add backend for the xtensa simulator.

Fixes #10164

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 10:35:07 -05:00
Jakub Rzeszutko
4fb20c40a1 shell: fix coverity issue
Fixing a case where variable could be used without an initialization.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-03-04 09:41:13 -05:00
Michael Scott
bc5a3f25ad drivers: modem: fix extra bytes sent by mdm_receiver_send()
mdm_receiver_send() was sending 1 too many bytes of buf.  This ended
up being the NULL terminator.  Size should be reduced prior to the
while check so that this doesn't happen.

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

Signed-off-by: Michael Scott <mike@foundries.io>
2019-03-04 09:40:45 -05:00
Wentong Wu
0ef2408e26 tests: move tests/coverage to subsys/testsuite
This part of tests was forgotten when we move to subsys/

Fixes #13729

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 08:24:42 -05:00
Anas Nashif
dc96f16bcd samples: define harness for samples
Most of the basic tests trigger LEDs or expect button press and would
hang in device testing because we can't parse success or failure from
the console. Define harness for this with the intent to skip those in
sanitycheck device testing and until we have a better way to test those.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 08:14:29 -05:00
Anas Nashif
5923760dd5 sanitycheck: handle serial exception
Do not throw excpetion when there is no serial output, just timeout.

Fixes #13541

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-04 08:14:29 -05:00
Dave Marples
80fd80a8c9 systemview: Use proper task names when these are available.
Trivial patch to recover the task name from the task structure when it
is present and include it in the information returned to SystemView.
When these data are not present patch will revert to old behaviour.

Signed-off-by: Dave Marples <dave@marples.net>
2019-03-03 23:58:08 -05:00
Alexander Wachter
8484855428 drivers: can: stm32_can: Fix shifting zero width or out of bounds
When attaching the filters in a way that the filter width dos not change
but the type, CAN_NO_FREE_FILTER was returned when the new filter is at
the end. Also shifting is not necessary when the start is already out
of bounds.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-03-03 23:57:25 -05:00
Vinayak Kariappa Chettimada
4fb64d11c8 Bluetooth: controller: Fix disabled clear text DLE for nRF51 series
Due to regression the option to enable Data Length Update
Procedure for nRF51 series was disable.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-03-03 23:56:16 -05:00
Pushpal Sidhu
309c39f40f clock_control: stm32_ll_clock: Enable MSI autocal when PLL source
Allow for the MSI to be auto-cal'd via an LSE when enabled, even when
being used as a source for the PLL as the sysclock.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2019-03-03 23:55:00 -05:00
Sebastian Bøe
8730854206 cmake: Don't assert when empty libraries are detected
The empty-library check was introduced because in earlier versions of
CMake the error message for empty libraries was very cryptic. But in
3.13.2 CMake now reports:

-- Configuring done
CMake Error at ../../cmake/extensions.cmake:357 (add_library):
  No SOURCES given to target: drivers__entropy
Call Stack (most recent call first):
  ../../cmake/extensions.cmake:334 (zephyr_library_named)
  ../../drivers/entropy/CMakeLists.txt:1 (zephyr_library)

which should be clear enough.

In addition to being redundant, our empty library check is run earlier
than CMake's check, so it will falsely report libraries to be empty,
when in fact, in an out-of-tree driver use-case, they will not
actually be empty at Generation time.

CMake runs it's check at generation time and is not affected by this
problem, so we remove the check.

This is a step, but not a complete solution, to resolving #8379.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-03 23:54:00 -05:00
Sebastian Bøe
ea7babba13 cmake: Rename CMake variable out of the reserved CONFIG_ namespace
Rename the poorly named CMake variable 'CONFIG_LIST' to
'LIST_OF_CONFIGS' to take it out of the Kconfig-reserved namespace
'CONFIG_*'.

This is a small step towards resolving #12144

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-03 23:52:29 -05:00
Sebastian Bøe
244451b64f cmake: Rename CMake variable out of the reserved CONFIG_ namespace
Rename the poorly named CMake variable 'CONFIG_COMPILER_OPT_AS_LIST'
to 'COMPILER_OPT_AS_LIST' to take it out of the Kconfig-reserved
namespace 'CONFIG_*'.

This is a small step towards resolving #12144

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-03 23:52:29 -05:00
Jukka Rissanen
2610c09f0f doc: net: Move net-shell to system management page
The net-shell is more logically part of system management page.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-03 23:50:17 -05:00
Jukka Rissanen
575040496d doc: net: Add table of contents to networking docs
This allows easy access to different part of the page.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-03 23:50:17 -05:00
Aaron Tsui
92f5cd147b samples: threads: Fix ASSERTION FAIL without gpio driver
Some boards' configuration does not enable GPIO by default,
like nrf52_pca10056, it causes ASSERTION FAIL when running
this application. This fix is to enable GPIO by default for
the basic threads sample, like basic blinky sample does.

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-03-03 23:48:11 -05:00
Tedd Ho-Jeong An
378cc3d57b Bluetooth: btp: Add overlay for nrf52 and reel boards
This patch adds overlay for nrf52_pca10040 and reel board to use
btp tester. These are based on nrf52840.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-03-03 23:46:00 -05:00
Andrew Boie
92da519d45 tests: userspace: add some more scenarios
We want to show that performing various memory domain
operations, and then either dropping to user mode, or
swapping to a user thread in the same domain, has the
correct memory policy for the user context.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-03 23:44:13 -05:00
Andrew Boie
6dc3fd8e50 userspace: fix x86 issue with adding partitions
On x86, if a supervisor thread belonging to a memory domain
adds a new partition to that domain, subsequent context switches
to another thread in the same domain, or dropping itself to user
mode, does not have the correct setup in the page tables.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-03 23:44:13 -05:00
Ulf Magnusson
c5592de5ae uart/ns16550: Give CONFIG_NS16550_REG_SHIFT a DT_* prefix instead
This value always comes from DTS. No Kconfig symbol named
NS16550_REG_SHIFT ever existed.

Might've been missed in commit 603f068690 ("uart/ns16550: Use DT_ prefix
for remaining device configs").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-03 23:43:27 -05:00
Michael Scott
3f400e4d9a CODEOWNERS: add modem ownership
Add @mike-scott as modem drivers maintainer

Signed-off-by: Michael Scott <mike@foundries.io>
2019-03-03 23:42:39 -05:00
Andrew Boie
1459bed346 x86: fix pte corruption when setting large regions
We need a copy of the flags field for ever PTE we are
updating, we can't just keep OR-ing in the address
field.

Fixes issues seen when setting flags for memory regions
larger than a page.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-03 22:34:25 -05:00
Torsten Rasmussen
605ae101eb cmake: remove debug message if no modules are included in build.
Fixes: #13245

Remove the printing of: 'Including module(s)' when no modules are
included into the CMake build.

Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-03-03 17:43:47 -05:00
Anas Nashif
ed20fc9f30 doc: remove CONFIG_UART_QMSI_1_BAUDRATE from doc
This is now set by DTS.

Fixes #13752

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-03 13:09:48 -08:00
Maksim Masalski
039d8ecf6a drivers: Changed return statement in function get_timeout()
According to the Coverity issue 188890 (github issue #10705)
Fix for overflowed or truncated value  count-1U used as return value.
I decided to use a saturating subtract to avoid a vulnerability.
It will always return 0 or bigger value according to the conditions.
Now if count value is 0, function will return 0, not -1 as before.

Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
2019-03-03 10:44:06 -05:00
Tim Sørensen (TIMS)
630af8a65f misc: assert_post_action: Added __weak keyword.
Added __weak keyword to to support overriding assert_post_action().
This allows system designers to change/augment the assert behaviour,
i.e. add logging to persistant storage of program counter, line
number etc, and/or change reboot behaviour.

Signed-off-by: Tim Sørensen (TIMS) <tims@oticon.com>
2019-03-02 12:26:21 -05:00
Vincent Wan
5c4a2193cd drivers: wifi: simplelink: Remove SO_REUSEADDR and TCP_NODELAY
The SimpleLink driver has been defining these macros for its local use.
Given these have been defined in a recent commit in Zephyr
(9c86dbfd8e), we should now avoid
redefining them to prevent build errors.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-02 12:21:21 -05:00