Commit graph

42567 commits

Author SHA1 Message Date
Daniel Leung 2a706d9f20 benchmarks: latency_measure: set number of CPU to 1
The latency measurement are not designed to run on multiple CPUs,
so limit it to just 1 CPU.

Fixes #26264

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-01 10:13:33 +03:00
Andy Ross b466e579a3 drivers/timer/hpet: Disable FSB interrupts
The front side bus interrupt delivery feature is a somewhat obscure
part of PC history (in some sense a presaging of MSI interrupts) that
we don't use.

But it's part of the spec, works on hardware, has precedence over the
"legacy" interrupt routing feature we do use, and can be legally
enabled by firmware.

Disable at init time.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-06-30 21:37:54 -04:00
Kumar Gala afda728f08 actions: Add some additional labels for devicetree
- Handle name change of labels from 'Device Tree' to Devicetree
- Split out things between "Devicetree" (as a catchall),
  "Devicetree Tooling" (for the scripts) and
  "Devicetree Binding" (for bindings)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-30 18:14:52 -05:00
Anas Nashif b5973930b1 sanitycheck: set selected_plaforms when loading tests from file
Missed the case we use in CI where we pre-generate the testcase list and
load it, this was resulting in empty test reports in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-30 18:34:01 -04:00
Christian Taedcke 7a7c420ca8 kernel: k_poll: Clarify events parameter description
The functions k_work_poll_submit_to_queue(), k_work_poll_submit() and
k_poll() described the parameter events as an "array of pointers to
events" which is not accurate. Replaced the description with "array of
events".

This fixes #23775

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-06-30 13:47:24 -07:00
Kumar Gala 4cc93041db drivers: flash: atmel_sam: Fix build error
There is a typo in the function pointer assigned to get_parameters.  It
should be flash_sam_get_parameters.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-30 12:51:29 -05:00
Artur Lipowski 2cee0b2a4e api: Fix narrowing conversion C++ compilation warning in Z_TIMEOUT_TICKS
Assignement in Z_TIMEOUT_TICKS macro causes narrowing
conversion warning in Z_TIMEOUT_TICKS.
Explicit cast to type of ticks field makes compiler happy.

Fixes #26369

Signed-off-by: Artur Lipowski <Artur.Lipowski@hidglobal.com>
2020-06-30 12:21:41 -05:00
Paul Sokolovsky 1ca1193a9d tests: socket: getaddrinfo: Explicitly ignore return of sys_mutex_lock
This is a test, and the function is called with K_FOREVER, so it's not
supposed to fail.

Fixes: #25735
CID: 210582

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-06-30 10:02:46 -04:00
Marek Porwisz 83f7f81d8d net: openthread: New build options for OpenThread
Some options were available in the options.cmake but were not reflected
in Kconfig.
Added possibility to enable additional configuration options for OT.
Some of the options were left commented out as those options are not
yet supported e.g. require Thread 1.2 or require shim changes.
As openthread has gazillion configuration options that are passed as
define value, created generic option for passing any number of those
values separated with space.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-06-30 07:48:08 -04:00
Marek Porwisz 311dd73517 samples: openthread: remove redundant configuration options
Some of the settings are no longer needed in the sample as OpenThread
configuration manages it by itself.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-06-30 07:48:08 -04:00
Marek Porwisz 81e0a05285 net: openthread: Simplify openthread enabling
Currently user needs to specify quite much additional options to enable
OpenThread support. He also needs to set ip address count,
heap size, etc depending on features enabled.
Nade changes to automatically select/set some of the options on
enabling OpenThread

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-06-30 07:48:08 -04:00
Anas Nashif 9c65a17743 actions: mark pull requests with conflicts
This action will go over pull requests after something was pushed to the
tree and marks pull requests with conflicts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 17:51:56 -04:00
Dominik Ermel 849a5432df drivers/flash/fash_simulator: Fix initialization for non-posix
Simulated flash, in non-POSIX compilation path, has been initialized to
incorrect value.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-06-29 15:48:45 -04:00
Henrik Brix Andersen 45cf142c3a canbus: canopen: fix reference to CAN in Automation draft standard
Fix the reference to the CAN in Automation (CiA) draft standard for
program download (302-3, not 303-2).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-06-29 14:10:56 -04:00
Spoorthy Priya Yerabolu 473ed3412f scripts: tests: sanitycheck: Add testcases for TestCase class
test_testinstance.py: Add testcases to scan file and path for
sub testcases
test_data/testcases: Also added the ztest test files
test_testsuite_class.py: changed get_all_tests() to match
count of sub testcases in ztest files

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2020-06-29 13:15:00 -04:00
Spoorthy Priya Yerabolu ad4d4fc7d1 scripts: tests: sanitycheck: changes to sanitylib to sort the warnings
While testing the warnings in scan_file() format is not the same
everytime we run tests
Added sorted with reverse flag so that warnings are same for
every run

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2020-06-29 13:15:00 -04:00
Anas Nashif 33c21e1f7d ci: do not skip BT simulator tests
BT simulator tests run standalone and independent of sanitycheck and
might be triggered by tests that are not managed by sanitycheck, so
leave it alone.

Fixes #26508

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 12:16:37 -04:00
Anas Nashif a6e7d95a26 actions: only mark bugs as stale
Bugs are being looked at on a weekly basis, we still did not go through
many of the enhancements and long term feature issues, so do not mark
those as stale yet, this will otherwise mark more than 50% of open GH
issues as stale...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 12:10:38 -04:00
Anas Nashif 183585c810 actions: action for processing stale PRs/Issues
Mark stale PRs/Issues and close them after a period of inactivity.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:59:18 -04:00
Anas Nashif 2f350dfe43 actions: add automatic labeler action
Add action to labler pull requests on a regular basis. This will replace
the current labler implemented in ci-tools and will operate on a
schedule rather than on pull request trigger.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:27:57 -04:00
Anas Nashif 5f200ee8bf ci: do not run sanitycheck on action changes
changes to actions should not trigger sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-29 10:27:57 -04:00
Kumar Gala 5dcc6ba529 ci: Add a daily full build workflow
We use a seperate pipeline step and try and reuse the run.sh script with
some minor modifications.  There's a seperate pipeline for this purpose
that does the schedule build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-29 08:11:46 -05:00
Martí Bolívar 6e4c2b9be9 scripts: clean up west build/flash/debug help
Just changes to the west help output; no functional changes expected.

Make option descriptions lowercase to match the argparse module's
conventions. When multiple sentences are required, move them to parser
prolog/epilog or argument group description sections.

Clarify some points that have confused multiple people.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-29 08:47:04 -04:00
Marcin Niestroj 79a8d0f616 net: l2: ppp: reject unsupported options
Both ASYNC_CTRL_CHAR_MAP and MAGIC_NUMBER are not supported right
now. Send Configure-Reject for them instead of Configure-Nak, as we
don't even propose new values in reply (which should be part of
Configure-Nak).

Send also Configure-Reject for MRU option, as we don't respect it
either.

Drop both count_rej and count_nack, as we can rely solely on nack_idx to
send Configure-Reject or not.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-29 08:26:53 -04:00
Andries Kruithof ed85577a22 Bluetooth: controller: Increase timeout for babblesim
The timeout for testing advertisement extensions in babblesim
was set to 30 seconds. Depending on the hardware used for
testing this may be too low. Increased to 120 seconds

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-06-29 09:27:09 +02:00
Christian Taedcke b5fb9497b6 samples/drivers/spi_flash: fix sample regex
The sample.yml regex did not match the implementation anymore.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-06-28 23:51:23 -04:00
Sandeep Tripathy ccb4b1ec47 drivers: interrupt_controller: GIC barrier before EOI
It is desired to have the peripheral writes completed to clear the
interrupt condition and de-assert the interrupt request to GIC before
EOI write. Failing which spurious interrupt will occur.

A barrier is needed to ensure peripheral register write transfers are
complete before EOI is done.

GICv2 memory mapped DEVICE nGnR(n)E writes are ordered from core point
of view. However these writes may pass over different interconnects,
bridges, buffers leaving some rare chances for the actual write to
complete out of order.

GICv3 ICC EOI system register writes have no ordering against nGnR(n)E
memory writes as they are over different interfaces.

Hence a dsb can ensure from core no writes are issued before the
previous writes are *complete*.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
2020-06-28 23:47:58 -04:00
Scott Worley 9b6ab5b6ab boards: mec1501modular_assy6885: Add support for UART0
Add options to configure UART0 and pins based upon device
tree settings.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2020-06-28 23:45:27 -04:00
Nicolas Pitre 1e52b1123e tests/lib/heap_align: improve test
Many issues:

- heapmem[] is of type uint64_t meaning that it contains HEAP_SZ * 16
  bytes but the heap is initialized with only 1/16 of that, making
  this test's memory footprint way too large.

- The test to ensure the heap is empty uses an allocation size of
  (heap_end - heap_start - 8) which is wrong as heap_end and heap_start
  are uint64_t pointer types and therefore their difference will be 8x
  smaller than intended. Furthermore, the 8 here is unnessary as the
  chunk header size is already included in the location of heap_start.

- The heap start address misalignment bare no purpose as the misaligned
  start of the free heap is already controlled by the variable prefix
  allocation size.

- Alignment and sizes should rather be expressed in terms of size_t
  rather than uintptr_t.

Fix those issues, and add a few more test angles:

- Make the prefix allocation itterate across the entire alignment range
  to exercize all possible misalignments.

- Vary the aligned allocation size to better exercize the pre-alignment
  allocation and suffix handling.

- Double the aligned allocation to add more variability in the heap
  structure.

- Test the testing of emptiness by making sure that no more allocations
  are possible when we think we allocated it all.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-06-28 23:43:42 -04:00
Kumar Gala 8ca5691a46 sanitycheck: sanitylib: Fix bare --west-flash option
If we pass --west-flash with no additional argument that was getting
treated the same as if it wasn't passed at all.

Change the check to be based on 'None' to handle the bare --west-flash
case properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-28 23:05:36 -04:00
Marcin Niestroj f4896adaa8 samples: lora: don't select NEWLIB_LIBC
This option should be selected by default, as right now LORA=y selects
REQUIRES_FULL_LIBC.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-27 08:19:05 -04:00
Marcin Niestroj 51666b8130 lora: select REQUIRES_FULL_LIBC when LORA=y
Right now we depend on NEWLIB_LIBC to build Zephyr with LORA=y. This
seems to be the only Kconfig option like that. Convert it to select
REQUIRES_FULL_LIBC instead, which will select NEWLIB_LIBC by default and
allow to use external libc as well.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-27 08:19:05 -04:00
Maureen Helm 07f27fe690 boards: arm: Fix kinetis temperature sensor config dependency
Fixes the frdm_k64f and twr_ke18f boards to enable the kinetis
temperature sensor only if the sensor and adc drivers are both enabled.
This fixes a logging error seen at runtime in
samples/bluetooth/peripheral_hr.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-06-27 08:16:46 -04:00
Andy Ross 3f9ad86b1d kernel/printk: Make it synchronous
Currently printk isn't synchronized except at the byte output level,
leading to interleaving of messages on SMP systems that try to log
simultaneously.  This is actually fairly amusing, and actually helpful
occasionally to validate inter-CPU contention down to the "few cycles"
level.

Still, when you're printing data you need to read, you need to be able
to read it.  Put a spinlock around each buffered line.  This has to
happen in a few places, as there are three different code paths taken
for !USERSPACE, syscall, and user mode.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-06-27 08:14:58 -04:00
Andy Ross 472b67e124 tests/kernel/smp: Don't wait so long at startup
Sleeping for a full second at startup is needless.  The currently
enabled subsystems on platforms that run this test don't even have any
other threads running at startup, so we're guaranteed the other core
is in idle before we even reach main().  Just a few ms is plenty.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-06-27 08:14:58 -04:00
Nicolas Pitre ae597c07b6 printk: print %p properly on 32-bit targets
The width for %p on 32-bit targets should be 8 regardless of
CONFIG_PRINTK64. Adjust the test accordingly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-06-27 00:03:58 -04:00
Kumar Gala fdab8f189d Revert "buildkite: Add some debug for looking into rebase issue"
This reverts commit 3b5a43e031.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-26 15:35:10 -05:00
Nicolas Pitre 64af35049c lib/os/heap: debugging facility to dump the heap structure to the cconsole
It is linked in only when used, so handy to always have it around for
analysis purposes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-06-26 11:41:43 -07:00
Christian Taedcke ac108de5d2 checkpatch: Enable check for C99 comments again
When checkpatch was updated, this behavour seems to have changed.
This change re-adds the check for C99 comments to prevent them.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-06-26 13:19:11 -04:00
Andreas Sandberg 2de3e7bd82 boards: arm: b_l072z_lrwan1: Add the SX1276 LoRa radio
Wire up the SX1276 LoRa radio inside the CMWX1ZZABZ module.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-06-26 12:10:43 -05:00
Tobias Svehagen 0171bd9578 tests: fs: nvs: Add two test cases for testing nvs_gc
Add tests for checking that nvs_gc can handle corrupt ate's.

Tests #26407

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-06-26 12:07:13 -05:00
Tobias Svehagen 50ed105d05 fs: nvs: Fix handling of corrupt ate's in garbage collector
nvs_gc does not verify the crc8 of close_ate before using
close_ate.offset.  This means that close_ate.offset could contain an
offset that points beyond valid ate's in the sector. For example, there
might be a valid ate at offset 0x100 but close_ate.offset is 0x200.
If that is the case that value will not be moved and so it will be lost.

Solve this by refactoring the recovery loop from nvs_prev_ate into
nvs_recover_last_ate and use that function in nvs_gc if a corrupt
close_ate is found.

The crc8 of gc_ate is not checked before trying to find another ate
with the same id. If there are no valid ate with that id in the whole
fs the inner while(1)-loop will never stop since the break condition
includes a check for a correct crc8.

Solve this by skipping gc_ate's with an invalid crc8.

Fixes #26407

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-06-26 12:07:13 -05:00
Marco Peter 004296ca56 boards: stm32: Extend stm32f746g_disco board with Arduino header
Adding GPIO mapping for Arduino connector.

Signed-off-by: Marco Peter <marco@peter-net.ch>
2020-06-26 12:04:19 -05:00
laurence pasteau 0388a26a19 lis2dw12 : remove useless semi-colons
cleaning commit to remove useless semi-colons in lis2dw12 trigger

Signed-off-by: laurence pasteau <laurence.pasteau@stimio.fr>
2020-06-26 11:18:38 -05:00
laurence pasteau ba3a6dce95 sensors : fix bad pin value when disabling interruption
In sensors drivers, in gpio callback function :
The device structure in parameter is related to the gpio device.

Signed-off-by: laurence pasteau <laurence.pasteau@stimio.fr>
2020-06-26 11:18:38 -05:00
Tomasz Bursztyka 8260736268 drivers: Remove useless device start/end pointers
Commit id a538dcd8f8 got rid of the usage of these pointers so they are
useless now and can be removed in this drivers.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-06-26 11:09:28 -05:00
Jiří Keresteš 0126c9f46a drivers: serial: Fix uart_poll_in() for mcux flexcomm driver
Replaces kUSART_RxFifoFullFlag with kUSART_RxFifoNotEmptyFlag to
prevent Rx FIFO overrun.

Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
2020-06-26 11:00:48 -05:00
Christian Taedcke ba7a5408ab drivers: serial: gecko: Use init macros
Convert the present initialization code into initialization macros.
Since both the uart and the usart peripheral is implemented, two sets
of initialization macros are necessary.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-06-25 23:31:51 -05:00
Anas Nashif a53c813ac5 sanitycheck: reorg junit output for nicer reports
classname in the junit report was not being used correctly since the
beginning. We had the targetname in the classname and put all results in
1 single testsuite.

The new output add 1 single testsuite for each platform and simplifies
the classname so that tests of the same classname can be grouped in
output, producing readable reports.

The current output can be seen here:

https://testing.zephyrproject.org/daily_tests/zephyr-v2.2.0-2533-gdbbf834605/report/index.html

This should much better once we have this change in.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-25 22:36:17 -05:00
Anas Nashif 1200222ff8 test: posix: fix identifier
Follow convention for identifying tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-25 22:36:17 -05:00